diff --git a/common/storages/hive/src/hive_table.rs b/common/storages/hive/src/hive_table.rs index 29c7a6852df0..bb144ddd91b3 100644 --- a/common/storages/hive/src/hive_table.rs +++ b/common/storages/hive/src/hive_table.rs @@ -213,12 +213,6 @@ impl HiveTable { if let Some(partition_keys) = &self.table_options.partition_keys { if !partition_keys.is_empty() { let filter_expression = if let Some(extras) = push_downs { - if extras.filters.len() > 1 { - return Err(ErrorCode::UnImplement(format!( - "more than one filters, {:?}", - extras.filters - ))); - }; extras.filters.get(0).cloned() } else { None diff --git a/query/src/sql/optimizer/heuristic/mod.rs b/query/src/sql/optimizer/heuristic/mod.rs index e2bf96c09093..f72a3229f263 100644 --- a/query/src/sql/optimizer/heuristic/mod.rs +++ b/query/src/sql/optimizer/heuristic/mod.rs @@ -54,6 +54,7 @@ pub static DEFAULT_REWRITE_RULES: Lazy> = Lazy::new(|| { RuleID::PushDownFilterProject, RuleID::PushDownFilterJoin, RuleID::SplitAggregate, + RuleID::PushDownFilterScan, ] }); diff --git a/query/src/sql/planner/format/display_rel_operator.rs b/query/src/sql/planner/format/display_rel_operator.rs index dd6cc3f2fd4d..8ecdbbe3e7be 100644 --- a/query/src/sql/planner/format/display_rel_operator.rs +++ b/query/src/sql/planner/format/display_rel_operator.rs @@ -231,8 +231,19 @@ pub fn format_physical_scan( let table = metadata.read().table(op.table_index).clone(); write!( f, - "Scan: {}.{}.{}", - &table.catalog, &table.database, &table.name + "Scan: {}.{}.{}, filters: [{}]", + &table.catalog, + &table.database, + &table.name, + op.push_down_predicates.as_ref().map_or_else( + || "".to_string(), + |predicates| { + predicates + .iter() + .map(|pred| format_scalar(metadata, pred)) + .join(", ") + } + ) ) } diff --git a/query/tests/it/sql/optimizer/heuristic/testdata/exchange.test b/query/tests/it/sql/optimizer/heuristic/testdata/exchange.test index 53e3abccb59e..9f62af99eebc 100644 --- a/query/tests/it/sql/optimizer/heuristic/testdata/exchange.test +++ b/query/tests/it/sql/optimizer/heuristic/testdata/exchange.test @@ -3,9 +3,9 @@ select * from numbers(1) t, numbers(2) t1 where t.number = t1.number Exchange(Merge) HashJoin: INNER, build keys: [t1.number (#1)], probe keys: [t.number (#0)], join filters: [] Exchange(Hash): keys: [t.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t1.number (#1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Result of t1 join t is distributed on t.number @@ -15,11 +15,11 @@ Exchange(Merge) HashJoin: INNER, build keys: [t2.number (#2)], probe keys: [t.number (#0)], join filters: [] HashJoin: INNER, build keys: [t1.number (#1)], probe keys: [t.number (#0)], join filters: [] Exchange(Hash): keys: [t.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t1.number (#1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t2.number (#2)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] select * from (select number as a, number+1 as b from numbers(1)) t, numbers(2) t1, numbers(3) t2 where a = t1.number and b = t2.number @@ -30,11 +30,11 @@ Exchange(Merge) HashJoin: INNER, build keys: [t1.number (#3)], probe keys: [t.a (#0)], join filters: [] Exchange(Hash): keys: [t.a (#0)] EvalScalar: [+(numbers.number (#0), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t1.number (#3)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t2.number (#4)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] select * from (select sum(number) as number from numbers(1) group by number) t, numbers(2) t1 where t.number = t1.number @@ -47,8 +47,8 @@ Exchange(Merge) Aggregate(Final): group items: [numbers.number (#0)], aggregate functions: [sum(number)] Aggregate(Partial): group items: [numbers.number (#0)], aggregate functions: [sum(number)] Exchange(Hash): keys: [numbers.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Exchange(Hash): keys: [t1.number (#4)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] diff --git a/query/tests/it/sql/optimizer/heuristic/testdata/join.test b/query/tests/it/sql/optimizer/heuristic/testdata/join.test index 1db0eb5edb2b..a078ce7e5965 100644 --- a/query/tests/it/sql/optimizer/heuristic/testdata/join.test +++ b/query/tests/it/sql/optimizer/heuristic/testdata/join.test @@ -3,16 +3,16 @@ select t.number from numbers(1) as t, numbers(1) as t1 where t.number = t1.numbe ---- Project: [number (#0)] HashJoin: INNER, build keys: [t1.number (#1)], probe keys: [t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] select t.number from numbers(1) as t, numbers(1) as t1 where t.number = t1.number and t.number = t1.number + 1 ---- Project: [number (#0)] HashJoin: INNER, build keys: [t1.number (#1), +(t1.number (#1), 1)], probe keys: [t.number (#0), t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Push predicates down through join @@ -21,9 +21,9 @@ select t.number from numbers(1) as t, numbers(1) as t1 where t.number > 1 and 1 Project: [number (#0)] CrossJoin Filter: [t.number (#0) > 1] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [t.number (#0) > 1] Filter: [1 < t1.number (#1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [1 < t1.number (#1)] select t.number from numbers(1) as t, numbers(1) as t1 where t.number + t1.number = 1 @@ -31,8 +31,8 @@ select t.number from numbers(1) as t, numbers(1) as t1 where t.number + t1.numbe Project: [number (#0)] Filter: [+(t.number (#0), t1.number (#1)) = 1] CrossJoin - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Incompatible join keys, cannot push into join @@ -41,8 +41,8 @@ select t.number from numbers(1) as t, numbers(1) as t1 where t.number = cast(t1. Project: [number (#0)] Filter: [t.number (#0) = CAST(t1.number (#1) AS VARCHAR)] CrossJoin - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Join multiple tables @@ -52,8 +52,8 @@ Project: [number (#0)] HashJoin: INNER, build keys: [t2.number (#2)], probe keys: [t1.number (#1)], join filters: [] CrossJoin Filter: [t.number (#0) = 1] - Scan: default.system.numbers - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [t.number (#0) = 1] + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] diff --git a/query/tests/it/sql/optimizer/heuristic/testdata/prune_columns.test b/query/tests/it/sql/optimizer/heuristic/testdata/prune_columns.test index 64fa8e8b07fc..b28210872703 100644 --- a/query/tests/it/sql/optimizer/heuristic/testdata/prune_columns.test +++ b/query/tests/it/sql/optimizer/heuristic/testdata/prune_columns.test @@ -7,7 +7,7 @@ Project: [number (#0)] EvalScalar: [numbers.a (#0)] Project: [number (#0)] EvalScalar: [numbers.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Prune unused columns from Aggregate @@ -19,7 +19,7 @@ Project: [number (#0)] EvalScalar: [group_item (#0)] Aggregate(Initial): group items: [numbers.number (#0)], aggregate functions: [] EvalScalar: [numbers.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Prune unused columns for simple plan nodes (Project, Filter, Aggregate...) @@ -34,7 +34,7 @@ Limit: [1], Offset: [0] EvalScalar: [group_item (#0)] Aggregate(Initial): group items: [numbers.number (#0), numbers.number (#0), numbers.number (#0), numbers.number (#0)], aggregate functions: [] EvalScalar: [numbers.number (#0), numbers.number (#0), numbers.number (#0), numbers.number (#0), numbers.number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Prune unused columns for join plan nodes (LogicalInnerJoin ...) @@ -48,10 +48,10 @@ Project: [a (#1)] CrossJoin Project: [a (#1),b (#2),c (#3)] EvalScalar: [+(numbers.number (#0), 1), +(numbers.number (#0), 1), +(numbers.number (#0), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Project: [b (#11)] EvalScalar: [+(numbers.number (#9), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Prune unused columns for correlated query @@ -63,7 +63,7 @@ Project: [a (#1)] HashJoin: SINGLE, build keys: [], probe keys: [], join filters: [] Project: [a (#1)] EvalScalar: [+(numbers.number (#0), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Project: [COUNT(*) (#21)] EvalScalar: [COUNT(*) (#22)] Aggregate(Initial): group items: [], aggregate functions: [COUNT(*)] @@ -73,10 +73,10 @@ Project: [a (#1)] CrossJoin Project: [a (#6),b (#7),c (#8)] EvalScalar: [+(numbers.number (#5), 1), +(numbers.number (#5), 1), +(numbers.number (#5), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Project: [b (#16)] EvalScalar: [+(numbers.number (#14), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] # Prune unused columns with order by @@ -85,7 +85,7 @@ select name from system.functions order by example Project: [name (#0)] EvalScalar: [functions.name (#0)] Sort: [example (#7) ASC] - Scan: default.system.functions + Scan: default.system.functions, filters: [] # Prune unused columns with cross join @@ -95,13 +95,13 @@ Project: [number (#0)] EvalScalar: [t.number (#0)] Filter: [subquery_3 (#3)] CrossJoin - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Project: [subquery (#3)] EvalScalar: [count(*) (#2) = 1] Aggregate(Initial): group items: [], aggregate functions: [count(*)] Limit: [1], Offset: [0] Project: [number (#1)] EvalScalar: [numbers.number (#1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] diff --git a/query/tests/it/sql/optimizer/heuristic/testdata/select.test b/query/tests/it/sql/optimizer/heuristic/testdata/select.test index e2237b9d7ab0..728c24262db1 100644 --- a/query/tests/it/sql/optimizer/heuristic/testdata/select.test +++ b/query/tests/it/sql/optimizer/heuristic/testdata/select.test @@ -1,12 +1,12 @@ select * from numbers(1) ---- -Scan: default.system.numbers +Scan: default.system.numbers, filters: [] select * from (select * from numbers(1)) as t1 where number = 1 ---- Filter: [t1.number (#0) = 1] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [t1.number (#0) = 1] # `b = 1` can not be pushed down @@ -14,54 +14,54 @@ select * from (select number as a, number + 1 as b from numbers(1)) as t1 where ---- Filter: [t1.a (#0) = 1, t1.b (#1) = 1] EvalScalar: [+(numbers.number (#0), 1)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] select * from (select number as a, number + 1 as b from numbers(1)) as t1 where a = 1 ---- EvalScalar: [+(numbers.number (#0), 1)] Filter: [t1.a (#0) = 1] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [t1.a (#0) = 1] select * from numbers(1) where number = pow(1, 1 + 1) ---- Filter: [numbers.number (#0) = 1] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [numbers.number (#0) = 1] select * from numbers(1) where TRUE and 1 = 1 ---- -Scan: default.system.numbers +Scan: default.system.numbers, filters: [] select * from numbers(1) where number = 0 and false ---- Filter: [false] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [false] select * from numbers(1) where number = 0 and null ---- Filter: [false] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [false] # If there is only one conjunction and the value is null, then we won't rewrite it select * from numbers(1) where null ---- Filter: [NULL] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [NULL] select a from (select number as a, number as b from numbers(1)) ---- -Scan: default.system.numbers +Scan: default.system.numbers, filters: [] select a from (select number as a, number+1 as b from numbers(1)) ---- Project: [number (#0)] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] diff --git a/query/tests/it/sql/optimizer/heuristic/testdata/subquery.test b/query/tests/it/sql/optimizer/heuristic/testdata/subquery.test index ea3b6c83b816..db6c9fa10c1d 100644 --- a/query/tests/it/sql/optimizer/heuristic/testdata/subquery.test +++ b/query/tests/it/sql/optimizer/heuristic/testdata/subquery.test @@ -5,17 +5,17 @@ Project: [number (#0)] Filter: [t.number (#0) = CAST(if(is_null(scalar_subquery_4 (#4)), 0, scalar_subquery_4 (#4)) AS BIGINT UNSIGNED)] HashJoin: SINGLE, build keys: [subquery_6 (#6)], probe keys: [subquery_0 (#0)], join filters: [] CrossJoin - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] Project: [COUNT(*) (#4),number (#6)] EvalScalar: [COUNT(*) (#5)] Aggregate(Final): group items: [subquery_6 (#6)], aggregate functions: [COUNT(*)] Aggregate(Partial): group items: [subquery_6 (#6)], aggregate functions: [COUNT(*)] HashJoin: INNER, build keys: [t2.number (#2)], probe keys: [subquery_6 (#6)], join filters: [] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] CrossJoin - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Exists correlated subquery with joins @@ -25,9 +25,9 @@ Project: [number (#0)] Filter: [(3 (#3)) OR (t.number (#0) > 1)] HashJoin: MARK, build keys: [subquery_0 (#0)], probe keys: [subquery_2 (#2)], join filters: [] HashJoin: INNER, build keys: [t1.number (#1)], probe keys: [subquery_2 (#2)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Uncorrelated subquery @@ -35,7 +35,7 @@ select t.number from numbers(1) as t where exists (select * from numbers(1) wher ---- Project: [number (#0)] CrossJoin - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Project: [subquery (#3)] Filter: [subquery_3 (#3)] EvalScalar: [count(*) (#2) = 1] @@ -43,7 +43,7 @@ Project: [number (#0)] Aggregate(Partial): group items: [], aggregate functions: [count(*)] Limit: [1], Offset: [0] Filter: [numbers.number (#1) = 0] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [numbers.number (#1) = 0] # Uncorrelated subquery @@ -52,9 +52,9 @@ select t.number from numbers(1) as t where number = (select * from numbers(1) wh Project: [number (#0)] Filter: [t.number (#0) = scalar_subquery_1 (#1)] HashJoin: SINGLE, build keys: [], probe keys: [], join filters: [] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] Filter: [numbers.number (#1) = 0] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [numbers.number (#1) = 0] # Correlated subquery can be translated to SemiJoin @@ -62,8 +62,8 @@ select t.number from numbers(1) as t where exists (select * from numbers(1) wher ---- Project: [number (#0)] HashJoin: SEMI, build keys: [numbers.number (#1)], probe keys: [t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Correlated subquery can be translated to AntiJoin @@ -73,17 +73,17 @@ Project: [number (#0)] Filter: [not(3 (#3))] HashJoin: MARK, build keys: [subquery_0 (#0)], probe keys: [subquery_2 (#2)], join filters: [] HashJoin: INNER, build keys: [numbers.number (#1)], probe keys: [subquery_2 (#2)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] select * from numbers(1) as t where exists (select number as a from numbers(1) where number = t.number) ---- Project: [number (#0)] HashJoin: SEMI, build keys: [numbers.number (#1)], probe keys: [t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Exists with different kinds of predicate @@ -92,9 +92,9 @@ select t.number from numbers(1) as t where exists (select * from numbers(1) wher Project: [number (#0)] HashJoin: SEMI, build keys: [numbers.number (#1)], probe keys: [t.number (#0)], join filters: [] Filter: [t.number (#0) < 10] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [t.number (#0) < 10] Filter: [numbers.number (#1) = 0] - Scan: default.system.numbers + Scan: default.system.numbers, filters: [numbers.number (#1) = 0] # Exists with non-equi predicate @@ -102,8 +102,8 @@ select t.number from numbers(1) as t where exists (select * from numbers(1) wher ---- Project: [number (#0)] HashJoin: SEMI, build keys: [numbers.number (#1)], probe keys: [t.number (#0)], join filters: [t.number (#0) < numbers.number (#1)] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Exists project required columns @@ -111,8 +111,8 @@ select t.number from numbers(1) as t where exists (select number as a, number as ---- Project: [number (#0)] HashJoin: SEMI, build keys: [numbers.number (#1)], probe keys: [t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Push down filter through CrossApply @@ -122,15 +122,15 @@ Project: [number (#0)] Filter: [CAST(if(is_null(scalar_subquery_3 (#3)), 0, scalar_subquery_3 (#3)) AS BIGINT UNSIGNED)] HashJoin: SINGLE, build keys: [subquery_5 (#5)], probe keys: [subquery_0 (#0)], join filters: [] HashJoin: INNER, build keys: [t1.number (#1)], probe keys: [t.number (#0)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] Project: [COUNT(*) = 1 (#3),number (#5)] EvalScalar: [COUNT(*) (#4) = 1] Aggregate(Final): group items: [subquery_5 (#5)], aggregate functions: [COUNT(*)] Aggregate(Partial): group items: [subquery_5 (#5)], aggregate functions: [COUNT(*)] HashJoin: INNER, build keys: [numbers.number (#2)], probe keys: [subquery_5 (#5)], join filters: [] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] # Semi join with other conditions @@ -141,10 +141,10 @@ Project: [number (#0)] HashJoin: MARK, build keys: [subquery_0 (#0)], probe keys: [subquery_3 (#3)], join filters: [] Filter: [subquery_3 (#3) < t1.number (#2)] CrossJoin - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] HashJoin: SEMI, build keys: [], probe keys: [], join filters: [t.number (#0) > t1.number (#1)] - Scan: default.system.numbers - Scan: default.system.numbers + Scan: default.system.numbers, filters: [] + Scan: default.system.numbers, filters: [] diff --git a/query/tests/it/sql/planner/format/mod.rs b/query/tests/it/sql/planner/format/mod.rs index 3516eefdf05e..09825a69e889 100644 --- a/query/tests/it/sql/planner/format/mod.rs +++ b/query/tests/it/sql/planner/format/mod.rs @@ -158,15 +158,15 @@ fn test_format() { let result = tree.format_indent().unwrap(); let expect = r#"HashJoin: INNER, build keys: [plus(col1 (#0), 123)], probe keys: [col2 (#1)], join filters: [] Filter: [true] - Scan: catalog.database.table - Scan: catalog.database.table + Scan: catalog.database.table, filters: [] + Scan: catalog.database.table, filters: [] "#; assert_eq!(result.as_str(), expect); let pretty_result = tree.format_pretty().unwrap(); let pretty_expect = r#"HashJoin: INNER, build keys: [plus(col1 (#0), 123)], probe keys: [col2 (#1)], join filters: [] ├── Filter: [true] -│ └── Scan: catalog.database.table -└── Scan: catalog.database.table +│ └── Scan: catalog.database.table, filters: [] +└── Scan: catalog.database.table, filters: [] "#; assert_eq!(pretty_result.as_str(), pretty_expect); } diff --git a/tests/logictest/suites/base/04_explain/04_0002_explain_v2 b/tests/logictest/suites/base/04_explain/04_0002_explain_v2 index 5b898a352408..d135f7fec734 100644 --- a/tests/logictest/suites/base/04_explain/04_0002_explain_v2 +++ b/tests/logictest/suites/base/04_explain/04_0002_explain_v2 @@ -1,9 +1,5 @@ -- TODO(need fix) -onlyif mysql -statement ok -set enable_planner_v2 = 1; - onlyif mysql statement ok drop table if exists t1 all; @@ -27,7 +23,7 @@ explain select t1.a from t1 where a > 0; ---- Project: [a (#0)] └── Filter: [t1.a (#0) > 0] - └── Scan: default.default.t1 + └── Scan: default.default.t1, filters: [t1.a (#0) > 0] onlyif mysql statement query T @@ -36,8 +32,8 @@ explain select * from t1, t2 where (t1.a = t2.a and t1.a > 3) or (t1.a = t2.a an ---- Filter: [(t1.a (#0) > 3) OR ((t2.a (#2) > 5) AND (t1.a (#0) > 1))] └── HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] - ├── Scan: default.default.t1 - └── Scan: default.default.t2 + ├── Scan: default.default.t1, filters: [] + └── Scan: default.default.t2, filters: [] onlyif mysql statement query T @@ -45,8 +41,8 @@ explain select * from t1, t2 where (t1.a = t2.a and t1.a > 3) or (t1.a = t2.a); ---- HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] -├── Scan: default.default.t1 -└── Scan: default.default.t2 +├── Scan: default.default.t1, filters: [] +└── Scan: default.default.t2, filters: [] onlyif mysql statement ok @@ -55,8 +51,3 @@ drop table t1; onlyif mysql statement ok drop table t2; - -onlyif mysql -statement ok -set enable_planner_v2 = 0; - diff --git a/tests/suites/0_stateless/04_explain/04_0002_explain_v2.result b/tests/suites/0_stateless/04_explain/04_0002_explain_v2.result index 7f63c73bbdfa..27b8e24c383e 100644 --- a/tests/suites/0_stateless/04_explain/04_0002_explain_v2.result +++ b/tests/suites/0_stateless/04_explain/04_0002_explain_v2.result @@ -1,11 +1,11 @@ ===Explain=== Project: [a (#0)] └── Filter: [t1.a (#0) > 0] - └── Scan: default.default.t1 + └── Scan: default.default.t1, filters: [t1.a (#0) > 0] Filter: [(t1.a (#0) > 3) OR ((t2.a (#2) > 5) AND (t1.a (#0) > 1))] └── HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] - ├── Scan: default.default.t1 - └── Scan: default.default.t2 + ├── Scan: default.default.t1, filters: [] + └── Scan: default.default.t2, filters: [] HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] -├── Scan: default.default.t1 -└── Scan: default.default.t2 +├── Scan: default.default.t1, filters: [] +└── Scan: default.default.t2, filters: [] diff --git a/tests/suites/0_stateless/04_explain/04_0002_explain_v2_cluster.result b/tests/suites/0_stateless/04_explain/04_0002_explain_v2_cluster.result index 493bad17f66a..dbd001adcca9 100644 --- a/tests/suites/0_stateless/04_explain/04_0002_explain_v2_cluster.result +++ b/tests/suites/0_stateless/04_explain/04_0002_explain_v2_cluster.result @@ -2,17 +2,17 @@ Exchange(Merge) └── Project: [a (#0)] └── Filter: [t1.a (#0) > 0] - └── Scan: default.default.t1 + └── Scan: default.default.t1, filters: [t1.a (#0) > 0] Exchange(Merge) └── Filter: [(t1.a (#0) > 3) OR ((t2.a (#2) > 5) AND (t1.a (#0) > 1))] └── HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] ├── Exchange(Hash): keys: [t1.a (#0)] - │ └── Scan: default.default.t1 + │ └── Scan: default.default.t1, filters: [] └── Exchange(Hash): keys: [t2.a (#2)] - └── Scan: default.default.t2 + └── Scan: default.default.t2, filters: [] Exchange(Merge) └── HashJoin: INNER, build keys: [t2.a (#2)], probe keys: [t1.a (#0)], join filters: [] ├── Exchange(Hash): keys: [t1.a (#0)] - │ └── Scan: default.default.t1 + │ └── Scan: default.default.t1, filters: [] └── Exchange(Hash): keys: [t2.a (#2)] - └── Scan: default.default.t2 + └── Scan: default.default.t2, filters: []