http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/inline-view.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/inline-view.test b/testdata/workloads/functional-planner/queries/PlannerTest/inline-view.test index 2c866e3..55660cb 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/inline-view.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/inline-view.test @@ -336,7 +336,7 @@ PLAN-ROOT SINK | |--03:HASH JOIN [INNER JOIN] | | hash predicates: a.smallint_col = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--02:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB @@ -345,7 +345,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypesagg a] | partitions=1/11 files=1 size=73.39KB | predicates: a.int_col > 899 -| runtime filters: RF001 -> a.smallint_col +| runtime filters: RF002 -> a.smallint_col | 00:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -378,7 +378,7 @@ PLAN-ROOT SINK | | | 03:HASH JOIN [INNER JOIN, PARTITIONED] | | hash predicates: b.id = a.smallint_col -| | runtime filters: RF001 <- a.smallint_col +| | runtime filters: RF002 <- a.smallint_col | | | |--06:EXCHANGE [HASH(a.smallint_col)] | | | @@ -391,7 +391,7 @@ PLAN-ROOT SINK | 02:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB | predicates: b.float_col > 4.5 -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 07:EXCHANGE [HASH(c.id)] | @@ -742,14 +742,14 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: a.smallint_col = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--02:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB | 01:SCAN HDFS [functional.alltypesagg a] partitions=11/11 files=11 size=814.73KB - runtime filters: RF000 -> a.tinyint_col, RF001 -> a.smallint_col + runtime filters: RF000 -> a.tinyint_col, RF002 -> a.smallint_col ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -778,7 +778,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: a.smallint_col = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--06:EXCHANGE [BROADCAST] | | @@ -787,7 +787,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypesagg a] partitions=11/11 files=11 size=814.73KB - runtime filters: RF000 -> a.tinyint_col, RF001 -> a.smallint_col + runtime filters: RF000 -> a.tinyint_col, RF002 -> a.smallint_col ==== # complex join, having joined subquery on the lhs, and predicate # at multiple subquery level @@ -823,7 +823,7 @@ PLAN-ROOT SINK | |--02:HASH JOIN [INNER JOIN] | | hash predicates: a.smallint_col = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--01:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB @@ -832,7 +832,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypesagg a] | partitions=1/11 files=1 size=73.39KB | predicates: a.int_col > 899 -| runtime filters: RF001 -> a.smallint_col +| runtime filters: RF002 -> a.smallint_col | 03:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -852,7 +852,7 @@ PLAN-ROOT SINK | | | 02:HASH JOIN [INNER JOIN, PARTITIONED] | | hash predicates: b.id = a.smallint_col -| | runtime filters: RF001 <- a.smallint_col +| | runtime filters: RF002 <- a.smallint_col | | | |--06:EXCHANGE [HASH(a.smallint_col)] | | | @@ -865,7 +865,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB | predicates: b.float_col > 4.5 -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 07:EXCHANGE [HASH(c.id)] | @@ -902,14 +902,14 @@ PLAN-ROOT SINK | | | 03:HASH JOIN [INNER JOIN] | | hash predicates: a.smallint_col = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--02:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB | | | 01:SCAN HDFS [functional.alltypesagg a] | partitions=11/11 files=11 size=814.73KB -| runtime filters: RF001 -> a.smallint_col +| runtime filters: RF002 -> a.smallint_col | 00:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -947,7 +947,7 @@ PLAN-ROOT SINK | | | 03:HASH JOIN [INNER JOIN, BROADCAST] | | hash predicates: a.smallint_col = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--07:EXCHANGE [BROADCAST] | | | @@ -956,7 +956,7 @@ PLAN-ROOT SINK | | | 01:SCAN HDFS [functional.alltypesagg a] | partitions=11/11 files=11 size=814.73KB -| runtime filters: RF001 -> a.smallint_col +| runtime filters: RF002 -> a.smallint_col | 00:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -1103,14 +1103,14 @@ PLAN-ROOT SINK | 03:HASH JOIN [LEFT SEMI JOIN] | hash predicates: x.id = a -| runtime filters: RF001 <- a +| runtime filters: RF002 <- a | |--01:UNION | constant-operands=2 | 00:SCAN HDFS [functional.alltypessmall x] partitions=4/4 files=4 size=6.32KB - runtime filters: RF000 -> x.id + 2, RF001 -> x.id + runtime filters: RF000 -> x.id + 2, RF002 -> x.id ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -1127,7 +1127,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [LEFT SEMI JOIN, BROADCAST] | hash predicates: x.id = a -| runtime filters: RF001 <- a +| runtime filters: RF002 <- a | |--05:EXCHANGE [BROADCAST] | | @@ -1136,7 +1136,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypessmall x] partitions=4/4 files=4 size=6.32KB - runtime filters: RF000 -> x.id + 2, RF001 -> x.id + runtime filters: RF000 -> x.id + 2, RF002 -> x.id ==== # Tests that views correctly reanalyze cloned exprs. (IMPALA-984) select b.* from functional.decimal_tbl a left outer join @@ -1224,7 +1224,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: a.id = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--01:SCAN HDFS [functional.alltypes b] | partitions=24/24 files=24 size=478.45KB @@ -1232,7 +1232,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypes a] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> a.id, RF001 -> a.id + runtime filters: RF000 -> a.id, RF002 -> a.id ==== # IMPALA-2665: Test correct assignment of On-clause predicate from an enclosing block # inside an inline view with an outer join.
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test b/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test index a525f91..3330b2e 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test @@ -42,7 +42,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: l.l_orderkey = o.o_orderkey -| runtime filters: RF001 <- o.o_orderkey +| runtime filters: RF002 <- o.o_orderkey | |--01:SCAN HDFS [tpch.orders o] | partitions=1/1 files=1 size=162.56MB @@ -52,7 +52,7 @@ PLAN-ROOT SINK 02:SCAN HDFS [tpch.lineitem l] partitions=1/1 files=1 size=718.94MB predicates: l_shipdate > '1995-03-15' - runtime filters: RF001 -> l.l_orderkey + runtime filters: RF002 -> l.l_orderkey ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -85,7 +85,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: l.l_orderkey = o.o_orderkey -| runtime filters: RF001 <- o.o_orderkey +| runtime filters: RF002 <- o.o_orderkey | |--07:EXCHANGE [BROADCAST] | | @@ -97,7 +97,7 @@ PLAN-ROOT SINK 02:SCAN HDFS [tpch.lineitem l] partitions=1/1 files=1 size=718.94MB predicates: l_shipdate > '1995-03-15' - runtime filters: RF001 -> l.l_orderkey + runtime filters: RF002 -> l.l_orderkey ==== # Q3 - Shipping Priority Query # straight_join prevents join order optimization @@ -143,7 +143,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: c.c_custkey = o.o_custkey -| runtime filters: RF001 <- o.o_custkey +| runtime filters: RF002 <- o.o_custkey | |--01:SCAN HDFS [tpch.orders o] | partitions=1/1 files=1 size=162.56MB @@ -153,7 +153,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [tpch.customer c] partitions=1/1 files=1 size=23.08MB predicates: c.c_mktsegment = 'BUILDING' - runtime filters: RF001 -> c.c_custkey + runtime filters: RF002 -> c.c_custkey ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -186,7 +186,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: c.c_custkey = o.o_custkey -| runtime filters: RF001 <- o.o_custkey +| runtime filters: RF002 <- o.o_custkey | |--07:EXCHANGE [BROADCAST] | | @@ -198,7 +198,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [tpch.customer c] partitions=1/1 files=1 size=23.08MB predicates: c.c_mktsegment = 'BUILDING' - runtime filters: RF001 -> c.c_custkey + runtime filters: RF002 -> c.c_custkey ==== # Q5 - Local Supplier Volume Query # Modifications: Added round() call, converted selects from multiple tables @@ -246,7 +246,7 @@ PLAN-ROOT SINK | 09:HASH JOIN [INNER JOIN] | hash predicates: s_nationkey = n_nationkey -| runtime filters: RF001 <- n_nationkey +| runtime filters: RF002 <- n_nationkey | |--04:SCAN HDFS [tpch.nation] | partitions=1/1 files=1 size=2.15KB @@ -254,32 +254,32 @@ PLAN-ROOT SINK | 08:HASH JOIN [INNER JOIN] | hash predicates: c_nationkey = s_nationkey, l_suppkey = s_suppkey -| runtime filters: RF002 <- s_nationkey, RF003 <- s_suppkey +| runtime filters: RF004 <- s_nationkey, RF005 <- s_suppkey | |--03:SCAN HDFS [tpch.supplier s] | partitions=1/1 files=1 size=1.33MB -| runtime filters: RF001 -> s_nationkey +| runtime filters: RF002 -> s_nationkey | 07:HASH JOIN [INNER JOIN] | hash predicates: o_custkey = c_custkey -| runtime filters: RF004 <- c_custkey +| runtime filters: RF008 <- c_custkey | |--00:SCAN HDFS [tpch.customer] | partitions=1/1 files=1 size=23.08MB -| runtime filters: RF001 -> tpch.customer.c_nationkey, RF002 -> c_nationkey +| runtime filters: RF002 -> tpch.customer.c_nationkey, RF004 -> c_nationkey | 06:HASH JOIN [INNER JOIN] | hash predicates: l_orderkey = o_orderkey -| runtime filters: RF005 <- o_orderkey +| runtime filters: RF010 <- o_orderkey | |--01:SCAN HDFS [tpch.orders o] | partitions=1/1 files=1 size=162.56MB | predicates: o_orderdate < '1995-01-01', o_orderdate >= '1994-01-01' -| runtime filters: RF004 -> o_custkey +| runtime filters: RF008 -> o_custkey | 02:SCAN HDFS [tpch.lineitem l] partitions=1/1 files=1 size=718.94MB - runtime filters: RF003 -> l_suppkey, RF005 -> l_orderkey + runtime filters: RF005 -> l_suppkey, RF010 -> l_orderkey ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -312,7 +312,7 @@ PLAN-ROOT SINK | 09:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: s_nationkey = n_nationkey -| runtime filters: RF001 <- n_nationkey +| runtime filters: RF002 <- n_nationkey | |--16:EXCHANGE [BROADCAST] | | @@ -322,38 +322,38 @@ PLAN-ROOT SINK | 08:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: c_nationkey = s_nationkey, l_suppkey = s_suppkey -| runtime filters: RF002 <- s_nationkey, RF003 <- s_suppkey +| runtime filters: RF004 <- s_nationkey, RF005 <- s_suppkey | |--15:EXCHANGE [BROADCAST] | | | 03:SCAN HDFS [tpch.supplier s] | partitions=1/1 files=1 size=1.33MB -| runtime filters: RF001 -> s_nationkey +| runtime filters: RF002 -> s_nationkey | 07:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: o_custkey = c_custkey -| runtime filters: RF004 <- c_custkey +| runtime filters: RF008 <- c_custkey | |--14:EXCHANGE [BROADCAST] | | | 00:SCAN HDFS [tpch.customer] | partitions=1/1 files=1 size=23.08MB -| runtime filters: RF001 -> tpch.customer.c_nationkey, RF002 -> c_nationkey +| runtime filters: RF002 -> tpch.customer.c_nationkey, RF004 -> c_nationkey | 06:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: l_orderkey = o_orderkey -| runtime filters: RF005 <- o_orderkey +| runtime filters: RF010 <- o_orderkey | |--13:EXCHANGE [BROADCAST] | | | 01:SCAN HDFS [tpch.orders o] | partitions=1/1 files=1 size=162.56MB | predicates: o_orderdate < '1995-01-01', o_orderdate >= '1994-01-01' -| runtime filters: RF004 -> o_custkey +| runtime filters: RF008 -> o_custkey | 02:SCAN HDFS [tpch.lineitem l] partitions=1/1 files=1 size=718.94MB - runtime filters: RF003 -> l_suppkey, RF005 -> l_orderkey + runtime filters: RF005 -> l_suppkey, RF010 -> l_orderkey ==== # Q2 - Minimum Cost Supplier Query select @@ -393,7 +393,7 @@ PLAN-ROOT SINK | 07:HASH JOIN [INNER JOIN] | hash predicates: s.s_nationkey = n.n_nationkey -| runtime filters: RF001 <- n.n_nationkey +| runtime filters: RF002 <- n.n_nationkey | |--03:SCAN HDFS [tpch.nation n] | partitions=1/1 files=1 size=2.15KB @@ -401,11 +401,11 @@ PLAN-ROOT SINK | 06:HASH JOIN [INNER JOIN] | hash predicates: s.s_suppkey = ps.ps_suppkey -| runtime filters: RF002 <- ps.ps_suppkey +| runtime filters: RF004 <- ps.ps_suppkey | |--05:HASH JOIN [INNER JOIN] | | hash predicates: ps.ps_partkey = p.p_partkey -| | runtime filters: RF003 <- p.p_partkey +| | runtime filters: RF006 <- p.p_partkey | | | |--00:SCAN HDFS [tpch.part p] | | partitions=1/1 files=1 size=22.83MB @@ -413,11 +413,11 @@ PLAN-ROOT SINK | | | 02:SCAN HDFS [tpch.partsupp ps] | partitions=1/1 files=1 size=112.71MB -| runtime filters: RF003 -> ps.ps_partkey +| runtime filters: RF006 -> ps.ps_partkey | 01:SCAN HDFS [tpch.supplier s] partitions=1/1 files=1 size=1.33MB - runtime filters: RF001 -> s.s_nationkey, RF002 -> s.s_suppkey + runtime filters: RF002 -> s.s_nationkey, RF004 -> s.s_suppkey ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -435,7 +435,7 @@ PLAN-ROOT SINK | 07:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: s.s_nationkey = n.n_nationkey -| runtime filters: RF001 <- n.n_nationkey +| runtime filters: RF002 <- n.n_nationkey | |--11:EXCHANGE [BROADCAST] | | @@ -445,13 +445,13 @@ PLAN-ROOT SINK | 06:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: s.s_suppkey = ps.ps_suppkey -| runtime filters: RF002 <- ps.ps_suppkey +| runtime filters: RF004 <- ps.ps_suppkey | |--10:EXCHANGE [BROADCAST] | | | 05:HASH JOIN [INNER JOIN, BROADCAST] | | hash predicates: ps.ps_partkey = p.p_partkey -| | runtime filters: RF003 <- p.p_partkey +| | runtime filters: RF006 <- p.p_partkey | | | |--09:EXCHANGE [BROADCAST] | | | @@ -461,11 +461,11 @@ PLAN-ROOT SINK | | | 02:SCAN HDFS [tpch.partsupp ps] | partitions=1/1 files=1 size=112.71MB -| runtime filters: RF003 -> ps.ps_partkey +| runtime filters: RF006 -> ps.ps_partkey | 01:SCAN HDFS [tpch.supplier s] partitions=1/1 files=1 size=1.33MB - runtime filters: RF001 -> s.s_nationkey, RF002 -> s.s_suppkey + runtime filters: RF002 -> s.s_nationkey, RF004 -> s.s_suppkey ==== # Q4 - Order Priority Checking Query # the largest input is prevented from becoming the leftmost input by the semi-join @@ -684,7 +684,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [RIGHT OUTER JOIN] | hash predicates: o_custkey = c_custkey -| runtime filters: RF001 <- c_custkey +| runtime filters: RF002 <- c_custkey | |--00:SCAN HDFS [tpch.customer] | partitions=1/1 files=1 size=23.08MB @@ -692,7 +692,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [tpch.orders] partitions=1/1 files=1 size=162.56MB - runtime filters: RF001 -> o_custkey + runtime filters: RF002 -> o_custkey ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -716,7 +716,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED] | hash predicates: o_custkey = c_custkey -| runtime filters: RF001 <- c_custkey +| runtime filters: RF002 <- c_custkey | |--07:EXCHANGE [HASH(c_custkey)] | | @@ -728,7 +728,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [tpch.orders] partitions=1/1 files=1 size=162.56MB - runtime filters: RF001 -> o_custkey + runtime filters: RF002 -> o_custkey ==== # order does not become the leftmost input because of the cross join; # the join with nation is done first because it reduces the intermediate output @@ -835,7 +835,7 @@ PLAN-ROOT SINK | |--09:HASH JOIN [INNER JOIN] | | hash predicates: t4.id = t6.id -| | runtime filters: RF001 <- t6.id +| | runtime filters: RF002 <- t6.id | | | |--05:SCAN HDFS [functional.alltypestiny t6] | | partitions=4/4 files=4 size=460B @@ -845,27 +845,27 @@ PLAN-ROOT SINK | | | |--07:HASH JOIN [INNER JOIN] | | | hash predicates: t3.id = t2.id -| | | runtime filters: RF002 <- t2.id +| | | runtime filters: RF004 <- t2.id | | | | | |--06:HASH JOIN [INNER JOIN] | | | | hash predicates: t2.id = t1.id -| | | | runtime filters: RF003 <- t1.id +| | | | runtime filters: RF006 <- t1.id | | | | | | | |--00:SCAN HDFS [functional.alltypestiny t1] | | | | partitions=4/4 files=4 size=460B -| | | | runtime filters: RF001 -> t1.id +| | | | runtime filters: RF002 -> t1.id | | | | | | | 01:SCAN HDFS [functional.alltypes t2] | | | partitions=24/24 files=24 size=478.45KB -| | | runtime filters: RF001 -> t2.id, RF003 -> t2.id +| | | runtime filters: RF002 -> t2.id, RF006 -> t2.id | | | | | 02:SCAN HDFS [functional.alltypessmall t3] | | partitions=4/4 files=4 size=6.32KB -| | runtime filters: RF001 -> t3.id, RF002 -> t3.id +| | runtime filters: RF002 -> t3.id, RF004 -> t3.id | | | 03:SCAN HDFS [functional.alltypesagg t4] | partitions=11/11 files=11 size=814.73KB -| runtime filters: RF001 -> t4.id +| runtime filters: RF002 -> t4.id | 04:SCAN HDFS [functional.alltypes t5] partitions=24/24 files=24 size=478.45KB @@ -895,30 +895,30 @@ PLAN-ROOT SINK | | | |--10:HASH JOIN [RIGHT SEMI JOIN] | | | hash predicates: t4.id = t3.id -| | | runtime filters: RF001 <- t3.id +| | | runtime filters: RF002 <- t3.id | | | | | |--09:HASH JOIN [INNER JOIN] | | | | hash predicates: t3.id = t2.id -| | | | runtime filters: RF002 <- t2.id +| | | | runtime filters: RF004 <- t2.id | | | | | | | |--08:HASH JOIN [RIGHT OUTER JOIN] | | | | | hash predicates: t2.id = t1.id -| | | | | runtime filters: RF003 <- t1.id +| | | | | runtime filters: RF006 <- t1.id | | | | | | | | | |--00:SCAN HDFS [functional.alltypestiny t1] | | | | | partitions=4/4 files=4 size=460B | | | | | | | | | 01:SCAN HDFS [functional.alltypes t2] | | | | partitions=24/24 files=24 size=478.45KB -| | | | runtime filters: RF003 -> t2.id +| | | | runtime filters: RF006 -> t2.id | | | | | | | 02:SCAN HDFS [functional.alltypessmall t3] | | | partitions=4/4 files=4 size=6.32KB -| | | runtime filters: RF002 -> t3.id +| | | runtime filters: RF004 -> t3.id | | | | | 03:SCAN HDFS [functional.alltypesagg t4] | | partitions=11/11 files=11 size=814.73KB -| | runtime filters: RF001 -> t4.id +| | runtime filters: RF002 -> t4.id | | | 04:SCAN HDFS [functional.alltypes t5] | partitions=24/24 files=24 size=478.45KB @@ -948,38 +948,38 @@ PLAN-ROOT SINK | |--11:HASH JOIN [RIGHT SEMI JOIN] | | hash predicates: t5.id = t4.id -| | runtime filters: RF001 <- t4.id +| | runtime filters: RF002 <- t4.id | | | |--10:HASH JOIN [INNER JOIN] | | | hash predicates: t3.id = t2.id -| | | runtime filters: RF002 <- t2.id +| | | runtime filters: RF004 <- t2.id | | | | | |--09:HASH JOIN [INNER JOIN] | | | | hash predicates: t4.id = t2.id -| | | | runtime filters: RF003 <- t2.id +| | | | runtime filters: RF006 <- t2.id | | | | | | | |--08:HASH JOIN [RIGHT OUTER JOIN] | | | | | hash predicates: t2.id = t1.id -| | | | | runtime filters: RF004 <- t1.id +| | | | | runtime filters: RF008 <- t1.id | | | | | | | | | |--00:SCAN HDFS [functional.alltypestiny t1] | | | | | partitions=4/4 files=4 size=460B | | | | | | | | | 01:SCAN HDFS [functional.alltypes t2] | | | | partitions=24/24 files=24 size=478.45KB -| | | | runtime filters: RF004 -> t2.id +| | | | runtime filters: RF008 -> t2.id | | | | | | | 03:SCAN HDFS [functional.alltypessmall t4] | | | partitions=4/4 files=4 size=6.32KB -| | | runtime filters: RF003 -> t4.id +| | | runtime filters: RF006 -> t4.id | | | | | 02:SCAN HDFS [functional.alltypesagg t3] | | partitions=11/11 files=11 size=814.73KB -| | runtime filters: RF002 -> t3.id +| | runtime filters: RF004 -> t3.id | | | 04:SCAN HDFS [functional.alltypes t5] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> t5.id +| runtime filters: RF002 -> t5.id | 05:SCAN HDFS [functional.alltypestiny t6] partitions=4/4 files=4 size=460B @@ -1008,30 +1008,30 @@ PLAN-ROOT SINK | | | |--10:HASH JOIN [INNER JOIN] | | | hash predicates: t3.id = t2.id -| | | runtime filters: RF001 <- t2.id +| | | runtime filters: RF002 <- t2.id | | | | | |--09:HASH JOIN [INNER JOIN] | | | | hash predicates: t4.id = t2.id -| | | | runtime filters: RF002 <- t2.id +| | | | runtime filters: RF004 <- t2.id | | | | | | | |--08:HASH JOIN [RIGHT OUTER JOIN] | | | | | hash predicates: t2.id = t1.id -| | | | | runtime filters: RF003 <- t1.id +| | | | | runtime filters: RF006 <- t1.id | | | | | | | | | |--00:SCAN HDFS [functional.alltypestiny t1] | | | | | partitions=4/4 files=4 size=460B | | | | | | | | | 01:SCAN HDFS [functional.alltypes t2] | | | | partitions=24/24 files=24 size=478.45KB -| | | | runtime filters: RF003 -> t2.id +| | | | runtime filters: RF006 -> t2.id | | | | | | | 03:SCAN HDFS [functional.alltypessmall t4] | | | partitions=4/4 files=4 size=6.32KB -| | | runtime filters: RF002 -> t4.id +| | | runtime filters: RF004 -> t4.id | | | | | 02:SCAN HDFS [functional.alltypesagg t3] | | partitions=11/11 files=11 size=814.73KB -| | runtime filters: RF001 -> t3.id +| | runtime filters: RF002 -> t3.id | | | 04:SCAN HDFS [functional.alltypes t5] | partitions=24/24 files=24 size=478.45KB @@ -1067,11 +1067,11 @@ PLAN-ROOT SINK | 11:HASH JOIN [RIGHT OUTER JOIN] | hash predicates: t3.id = a.id -| runtime filters: RF001 <- a.id +| runtime filters: RF002 <- a.id | |--10:HASH JOIN [INNER JOIN] | | hash predicates: a.id = count(a.id) -| | runtime filters: RF002 <- count(a.id) +| | runtime filters: RF004 <- count(a.id) | | | |--04:AGGREGATE [FINALIZE] | | | output: count(a.id) @@ -1081,14 +1081,14 @@ PLAN-ROOT SINK | | | | | 02:HASH JOIN [INNER JOIN] | | | hash predicates: a.id = b.id -| | | runtime filters: RF003 <- b.id +| | | runtime filters: RF006 <- b.id | | | | | |--01:SCAN HDFS [functional.alltypestiny b] | | | partitions=4/4 files=4 size=460B | | | | | 00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF003 -> a.id +| | runtime filters: RF006 -> a.id | | | 07:HASH JOIN [LEFT OUTER JOIN] | | hash predicates: b.id = a.id @@ -1096,14 +1096,14 @@ PLAN-ROOT SINK | | | |--05:SCAN HDFS [functional.alltypes a] | | partitions=0/24 files=0 size=0B -| | runtime filters: RF002 -> a.id +| | runtime filters: RF004 -> a.id | | | 06:SCAN HDFS [functional.alltypestiny b] | partitions=4/4 files=4 size=460B | 08:SCAN HDFS [functional.alltypes t3] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> t3.id, RF001 -> t3.id + runtime filters: RF000 -> t3.id, RF002 -> t3.id ==== # Same as above but with full outer joins. select 1 from @@ -1135,7 +1135,7 @@ PLAN-ROOT SINK | |--10:HASH JOIN [INNER JOIN] | | hash predicates: a.id = count(a.id) -| | runtime filters: RF001 <- count(a.id) +| | runtime filters: RF002 <- count(a.id) | | | |--04:AGGREGATE [FINALIZE] | | | output: count(a.id) @@ -1145,14 +1145,14 @@ PLAN-ROOT SINK | | | | | 02:HASH JOIN [INNER JOIN] | | | hash predicates: a.id = b.id -| | | runtime filters: RF002 <- b.id +| | | runtime filters: RF004 <- b.id | | | | | |--01:SCAN HDFS [functional.alltypestiny b] | | | partitions=4/4 files=4 size=460B | | | | | 00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF002 -> a.id +| | runtime filters: RF004 -> a.id | | | 07:HASH JOIN [FULL OUTER JOIN] | | hash predicates: b.id = a.id @@ -1160,7 +1160,7 @@ PLAN-ROOT SINK | | | |--05:SCAN HDFS [functional.alltypes a] | | partitions=0/24 files=0 size=0B -| | runtime filters: RF001 -> a.id +| | runtime filters: RF002 -> a.id | | | 06:SCAN HDFS [functional.alltypestiny b] | partitions=4/4 files=4 size=460B @@ -1196,11 +1196,11 @@ PLAN-ROOT SINK | 11:HASH JOIN [RIGHT SEMI JOIN] | hash predicates: t3.id = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--10:HASH JOIN [INNER JOIN] | | hash predicates: b.id = count(a.id) -| | runtime filters: RF002 <- count(a.id) +| | runtime filters: RF004 <- count(a.id) | | | |--04:AGGREGATE [FINALIZE] | | | output: count(a.id) @@ -1210,30 +1210,30 @@ PLAN-ROOT SINK | | | | | 02:HASH JOIN [INNER JOIN] | | | hash predicates: a.id = b.id -| | | runtime filters: RF004 <- b.id +| | | runtime filters: RF008 <- b.id | | | | | |--01:SCAN HDFS [functional.alltypestiny b] | | | partitions=4/4 files=4 size=460B | | | | | 00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF004 -> a.id +| | runtime filters: RF008 -> a.id | | | 07:HASH JOIN [LEFT SEMI JOIN] | | hash predicates: b.id = a.id -| | runtime filters: RF003 <- a.id +| | runtime filters: RF006 <- a.id | | | |--05:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF000 -> a.id, RF002 -> a.id +| | runtime filters: RF000 -> a.id, RF004 -> a.id | | | 06:SCAN HDFS [functional.alltypes b] | partitions=2/24 files=2 size=40.32KB -| runtime filters: RF000 -> b.id, RF002 -> b.id, RF003 -> b.id +| runtime filters: RF000 -> b.id, RF004 -> b.id, RF006 -> b.id | 08:SCAN HDFS [functional.alltypes t3] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> t3.id, RF001 -> t3.id + runtime filters: RF000 -> t3.id, RF002 -> t3.id ==== # Same as above but with anti joins. select 1 from @@ -1265,7 +1265,7 @@ PLAN-ROOT SINK | |--10:HASH JOIN [INNER JOIN] | | hash predicates: b.id = count(a.id) -| | runtime filters: RF001 <- count(a.id) +| | runtime filters: RF002 <- count(a.id) | | | |--04:AGGREGATE [FINALIZE] | | | output: count(a.id) @@ -1275,25 +1275,25 @@ PLAN-ROOT SINK | | | | | 02:HASH JOIN [INNER JOIN] | | | hash predicates: a.id = b.id -| | | runtime filters: RF002 <- b.id +| | | runtime filters: RF004 <- b.id | | | | | |--01:SCAN HDFS [functional.alltypestiny b] | | | partitions=4/4 files=4 size=460B | | | | | 00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF002 -> a.id +| | runtime filters: RF004 -> a.id | | | 07:HASH JOIN [LEFT ANTI JOIN] | | hash predicates: b.id = a.id | | | |--05:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF000 -> a.id, RF001 -> a.id +| | runtime filters: RF000 -> a.id, RF002 -> a.id | | | 06:SCAN HDFS [functional.alltypes b] | partitions=2/24 files=2 size=40.32KB -| runtime filters: RF000 -> b.id, RF001 -> b.id +| runtime filters: RF000 -> b.id, RF002 -> b.id | 08:SCAN HDFS [functional.alltypes t3] partitions=24/24 files=24 size=478.45KB @@ -1342,7 +1342,7 @@ PLAN-ROOT SINK | |--03:HASH JOIN [INNER JOIN] | | hash predicates: t1.bigint_col = t2.smallint_col -| | runtime filters: RF001 <- t2.smallint_col +| | runtime filters: RF002 <- t2.smallint_col | | limit: 1 | | | |--02:SCAN HDFS [functional.alltypestiny t2] @@ -1350,7 +1350,7 @@ PLAN-ROOT SINK | | | 01:SCAN HDFS [functional.alltypes t1] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> t1.bigint_col +| runtime filters: RF002 -> t1.bigint_col | 00:SCAN HDFS [functional.alltypestiny t4] partitions=4/4 files=4 size=460B @@ -1398,14 +1398,14 @@ PLAN-ROOT SINK | |--03:HASH JOIN [RIGHT OUTER JOIN] | | hash predicates: b.id = a.id -| | runtime filters: RF001 <- a.id +| | runtime filters: RF002 <- a.id | | | |--00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B | | | 01:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 02:SCAN HDFS [functional.alltypes c] partitions=24/24 files=24 size=478.45KB @@ -1430,14 +1430,14 @@ PLAN-ROOT SINK | |--03:HASH JOIN [INNER JOIN] | | hash predicates: b.id = a.id -| | runtime filters: RF001 <- a.id +| | runtime filters: RF002 <- a.id | | | |--00:SCAN HDFS [functional.alltypestiny a] | | partitions=4/4 files=4 size=460B | | | 01:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 02:SCAN HDFS [functional.alltypes c] partitions=24/24 files=24 size=478.45KB http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/joins.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/joins.test b/testdata/workloads/functional-planner/queries/PlannerTest/joins.test index 6c42545..c85a5d1 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/joins.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/joins.test @@ -86,7 +86,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: functional.alltypestiny.id = functional.alltypestiny.id -| runtime filters: RF001 <- functional.alltypestiny.id +| runtime filters: RF002 <- functional.alltypestiny.id | |--01:SCAN HDFS [functional.alltypestiny] | partitions=4/4 files=4 size=460B @@ -94,7 +94,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny] partitions=4/4 files=4 size=460B - runtime filters: RF000 -> coalesce(functional.alltypestiny.id, functional.alltypestiny.id), RF001 -> functional.alltypestiny.id + runtime filters: RF000 -> coalesce(functional.alltypestiny.id, functional.alltypestiny.id), RF002 -> functional.alltypestiny.id ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -111,7 +111,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: functional.alltypestiny.id = functional.alltypestiny.id -| runtime filters: RF001 <- functional.alltypestiny.id +| runtime filters: RF002 <- functional.alltypestiny.id | |--05:EXCHANGE [BROADCAST] | | @@ -121,7 +121,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny] partitions=4/4 files=4 size=460B - runtime filters: RF000 -> coalesce(functional.alltypestiny.id, functional.alltypestiny.id), RF001 -> functional.alltypestiny.id + runtime filters: RF000 -> coalesce(functional.alltypestiny.id, functional.alltypestiny.id), RF002 -> functional.alltypestiny.id ==== # multiple join predicates; # scan predicates get propagated correctly; @@ -450,22 +450,22 @@ PLAN-ROOT SINK | |--05:HASH JOIN [RIGHT OUTER JOIN] | | hash predicates: b.id = c.id -| | runtime filters: RF001 <- c.id +| | runtime filters: RF002 <- c.id | | | |--02:SCAN HDFS [functional.alltypesnopart c] | | partitions=1/1 files=0 size=0B | | | 04:HASH JOIN [INNER JOIN] | | hash predicates: a.id = b.id, a.int_col = b.int_col -| | runtime filters: RF002 <- b.id, RF003 <- b.int_col +| | runtime filters: RF004 <- b.id, RF005 <- b.int_col | | | |--01:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB -| | runtime filters: RF001 -> b.id +| | runtime filters: RF002 -> b.id | | | 00:SCAN HDFS [functional.alltypesagg a] | partitions=11/11 files=11 size=814.73KB -| runtime filters: RF001 -> a.id, RF002 -> a.id, RF003 -> a.int_col +| runtime filters: RF002 -> a.id, RF004 -> a.id, RF005 -> a.int_col | 03:SCAN HDFS [functional.alltypesagg d] partitions=11/11 files=11 size=814.73KB @@ -498,7 +498,7 @@ PLAN-ROOT SINK | | | 05:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED] | | hash predicates: b.id = c.id -| | runtime filters: RF001 <- c.id +| | runtime filters: RF002 <- c.id | | | |--13:EXCHANGE [HASH(c.id)] | | | @@ -509,17 +509,17 @@ PLAN-ROOT SINK | | | 04:HASH JOIN [INNER JOIN, BROADCAST] | | hash predicates: a.id = b.id, a.int_col = b.int_col -| | runtime filters: RF002 <- b.id, RF003 <- b.int_col +| | runtime filters: RF004 <- b.id, RF005 <- b.int_col | | | |--11:EXCHANGE [BROADCAST] | | | | | 01:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB -| | runtime filters: RF001 -> b.id +| | runtime filters: RF002 -> b.id | | | 00:SCAN HDFS [functional.alltypesagg a] | partitions=11/11 files=11 size=814.73KB -| runtime filters: RF001 -> a.id, RF002 -> a.id, RF003 -> a.int_col +| runtime filters: RF002 -> a.id, RF004 -> a.id, RF005 -> a.int_col | 03:SCAN HDFS [functional.alltypesagg d] partitions=11/11 files=11 size=814.73KB @@ -580,7 +580,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: t1.id = t2.id -| runtime filters: RF001 <- t2.id +| runtime filters: RF002 <- t2.id | |--01:SCAN HDFS [functional.testtbl t2] | partitions=1/1 files=0 size=0B @@ -588,7 +588,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.testtbl t1] partitions=1/1 files=0 size=0B - runtime filters: RF000 -> t1.id, RF001 -> t1.id + runtime filters: RF000 -> t1.id, RF002 -> t1.id ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -605,7 +605,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: t1.id = t2.id -| runtime filters: RF001 <- t2.id +| runtime filters: RF002 <- t2.id | |--05:EXCHANGE [BROADCAST] | | @@ -615,7 +615,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.testtbl t1] partitions=1/1 files=0 size=0B - runtime filters: RF000 -> t1.id, RF001 -> t1.id + runtime filters: RF000 -> t1.id, RF002 -> t1.id ==== # join involving a table with no table stats (functional.emptytable) # tests that the default join strategy is broadcast @@ -729,7 +729,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: a.id = b.id, a.int_col = b.int_col -| runtime filters: RF002 <- b.id, RF003 <- b.int_col +| runtime filters: RF004 <- b.id, RF005 <- b.int_col | |--01:SCAN HDFS [functional.alltypes b] | partitions=24/24 files=24 size=478.45KB @@ -737,7 +737,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypes a] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> a.id, RF001 -> a.int_col, RF002 -> a.id, RF003 -> a.int_col + runtime filters: RF000 -> a.id, RF001 -> a.int_col, RF004 -> a.id, RF005 -> a.int_col ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -754,7 +754,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: a.id = b.id, a.int_col = b.int_col -| runtime filters: RF002 <- b.id, RF003 <- b.int_col +| runtime filters: RF004 <- b.id, RF005 <- b.int_col | |--06:EXCHANGE [HASH(b.id,b.int_col)] | | @@ -766,7 +766,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypes a] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> a.id, RF001 -> a.int_col, RF002 -> a.id, RF003 -> a.int_col + runtime filters: RF000 -> a.id, RF001 -> a.int_col, RF004 -> a.id, RF005 -> a.int_col ==== # Tests that the partitioned join between a and b exploits the existing # data partition of its rhs input. @@ -841,7 +841,7 @@ PLAN-ROOT SINK | 04:HASH JOIN [INNER JOIN] | hash predicates: a.bool_col = bool_col, a.int_col = int_col -| runtime filters: RF002 <- bool_col, RF003 <- int_col +| runtime filters: RF004 <- bool_col, RF005 <- int_col | |--03:AGGREGATE [FINALIZE] | | output: count(*) @@ -853,7 +853,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypes a] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> a.bool_col, RF001 -> a.int_col, RF002 -> a.bool_col, RF003 -> a.int_col + runtime filters: RF000 -> a.bool_col, RF001 -> a.int_col, RF004 -> a.bool_col, RF005 -> a.int_col ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -870,7 +870,7 @@ PLAN-ROOT SINK | 04:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: a.bool_col = bool_col, a.int_col = int_col -| runtime filters: RF002 <- bool_col, RF003 <- int_col +| runtime filters: RF004 <- bool_col, RF005 <- int_col | |--07:AGGREGATE [FINALIZE] | | output: count:merge(*) @@ -890,7 +890,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypes a] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> a.bool_col, RF001 -> a.int_col, RF002 -> a.bool_col, RF003 -> a.int_col + runtime filters: RF000 -> a.bool_col, RF001 -> a.int_col, RF004 -> a.bool_col, RF005 -> a.int_col ==== # Tests that all predicates from the On-clause are applied (IMPALA-805) # and that slot equivalences are enforced at lowest possible plan node. @@ -964,14 +964,14 @@ PLAN-ROOT SINK | |--03:HASH JOIN [INNER JOIN] | | hash predicates: a.id = b.id, a.int_col = b.int_col -| | runtime filters: RF002 <- b.id, RF003 <- b.int_col +| | runtime filters: RF004 <- b.id, RF005 <- b.int_col | | | |--01:SCAN HDFS [functional.alltypestiny b] | | partitions=4/4 files=4 size=460B | | | 00:SCAN HDFS [functional.alltypes a] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF002 -> a.id, RF003 -> a.int_col +| runtime filters: RF004 -> a.id, RF005 -> a.int_col | 02:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -999,7 +999,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: b.int_col = a.id -| runtime filters: RF001 <- a.id +| runtime filters: RF002 <- a.id | |--00:SCAN HDFS [functional.alltypestiny a] | partitions=4/4 files=4 size=460B @@ -1007,7 +1007,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypes b] partitions=24/24 files=24 size=478.45KB - runtime filters: RF000 -> b.int_col, RF001 -> b.int_col + runtime filters: RF000 -> b.int_col, RF002 -> b.int_col ==== # Tests elimination of redundant join predicates (IMPALA-912) # and that slot equivalences are enforced at the lowest possible plan node. @@ -1072,7 +1072,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [RIGHT OUTER JOIN] | hash predicates: t2.smallint_col = t1.smallint_col -| runtime filters: RF002 <- t1.smallint_col +| runtime filters: RF004 <- t1.smallint_col | |--00:SCAN HDFS [functional.alltypes t1] | partitions=24/24 files=24 size=478.45KB @@ -1080,7 +1080,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypesagg t2] partitions=11/11 files=11 size=814.73KB - runtime filters: RF000 -> t2.smallint_col, RF001 -> t2.bigint_col, RF002 -> t2.smallint_col + runtime filters: RF000 -> t2.smallint_col, RF001 -> t2.bigint_col, RF004 -> t2.smallint_col ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -1098,7 +1098,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED] | hash predicates: t2.smallint_col = t1.smallint_col -| runtime filters: RF002 <- t1.smallint_col +| runtime filters: RF004 <- t1.smallint_col | |--06:EXCHANGE [HASH(t1.smallint_col)] | | @@ -1110,7 +1110,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypesagg t2] partitions=11/11 files=11 size=814.73KB - runtime filters: RF000 -> t2.smallint_col, RF001 -> t2.bigint_col, RF002 -> t2.smallint_col + runtime filters: RF000 -> t2.smallint_col, RF001 -> t2.bigint_col, RF004 -> t2.smallint_col ==== # Test correct removal of redundant join predicates (IMPALA-1353): # Equivalences among inline-view slots are enforced. The predicates @@ -1257,7 +1257,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: t1.tinyint_col = t3.smallint_col, t1.string_col = t3.date_string_col -| runtime filters: RF001 <- t3.smallint_col, RF002 <- t3.date_string_col +| runtime filters: RF002 <- t3.smallint_col, RF003 <- t3.date_string_col | |--01:SCAN HDFS [functional.alltypestiny t3] | partitions=4/4 files=4 size=460B @@ -1265,7 +1265,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypesagg t1] partitions=11/11 files=11 size=814.73KB - runtime filters: RF000 -> t1.string_col, RF001 -> t1.tinyint_col, RF002 -> t1.string_col + runtime filters: RF000 -> t1.string_col, RF002 -> t1.tinyint_col, RF003 -> t1.string_col ==== # Regression test for IMPALA-935. select 1 from @@ -1589,7 +1589,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: a.id = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--05:EXCHANGE [BROADCAST] | | @@ -1599,7 +1599,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny a] partitions=4/4 files=4 size=460B - runtime filters: RF000 -> a.id, RF001 -> a.id + runtime filters: RF000 -> a.id, RF002 -> a.id ==== # Test traditional commented join hints. select /* +straight_join */ * from functional.alltypestiny a @@ -1623,7 +1623,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: a.id = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--05:EXCHANGE [BROADCAST] | | @@ -1633,7 +1633,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny a] partitions=4/4 files=4 size=460B - runtime filters: RF000 -> a.id, RF001 -> a.id + runtime filters: RF000 -> a.id, RF002 -> a.id ==== # Test end-of-line commented join hints. select @@ -1663,7 +1663,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: a.id = b.id -| runtime filters: RF001 <- b.id +| runtime filters: RF002 <- b.id | |--05:EXCHANGE [BROADCAST] | | @@ -1673,7 +1673,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny a] partitions=4/4 files=4 size=460B - runtime filters: RF000 -> a.id, RF001 -> a.id + runtime filters: RF000 -> a.id, RF002 -> a.id ==== # Regression test for IMPALA-1289. Predicates should be assigned correctly # to inverted joins. @@ -1962,7 +1962,7 @@ PLAN-ROOT SINK | 06:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: int_col = int_col, string_col = string_col -| runtime filters: RF002 <- int_col, RF003 <- string_col +| runtime filters: RF004 <- int_col, RF005 <- string_col | |--12:EXCHANGE [HASH(string_col,int_col,int_col)] | | @@ -1990,7 +1990,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypessmall] partitions=4/4 files=4 size=6.32KB predicates: functional.alltypessmall.smallint_col = functional.alltypessmall.int_col - runtime filters: RF000 -> functional.alltypessmall.int_col, RF001 -> functional.alltypessmall.string_col, RF002 -> functional.alltypessmall.int_col, RF003 -> functional.alltypessmall.string_col + runtime filters: RF000 -> functional.alltypessmall.int_col, RF001 -> functional.alltypessmall.string_col, RF004 -> functional.alltypessmall.int_col, RF005 -> functional.alltypessmall.string_col ==== # Assignment of predicates from the On-clause of an # anti join; inner join followed by anti join (IMPALA-1387) @@ -2057,7 +2057,7 @@ PLAN-ROOT SINK | 06:HASH JOIN [INNER JOIN] | | hash predicates: b.id = a.id | | other predicates: a.float_col < b.float_col -| | runtime filters: RF001 <- a.id +| | runtime filters: RF002 <- a.id | | | |--00:SCAN HDFS [functional.alltypes a] | | partitions=24/24 files=24 size=478.45KB @@ -2065,7 +2065,7 @@ PLAN-ROOT SINK | | | 01:SCAN HDFS [functional.alltypes b] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 03:SCAN HDFS [functional.alltypesagg d] partitions=11/11 files=11 size=814.73KB http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-delete.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-delete.test b/testdata/workloads/functional-planner/queries/PlannerTest/kudu-delete.test index 3a4b97a..2120c3e 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-delete.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/kudu-delete.test @@ -31,13 +31,13 @@ DELETE FROM KUDU [functional_kudu.testtbl] | |--03:HASH JOIN [INNER JOIN] | | hash predicates: b.id = a.id -| | runtime filters: RF001 <- a.id +| | runtime filters: RF002 <- a.id | | | |--00:SCAN KUDU [functional_kudu.testtbl a] | | | 01:SCAN HDFS [functional.alltypes b] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 02:SCAN HDFS [functional.alltypes] partitions=24/24 files=24 size=478.45KB @@ -53,7 +53,7 @@ DELETE FROM KUDU [functional_kudu.testtbl] | | | 03:HASH JOIN [INNER JOIN, BROADCAST] | | hash predicates: b.id = a.id -| | runtime filters: RF001 <- a.id +| | runtime filters: RF002 <- a.id | | | |--05:EXCHANGE [BROADCAST] | | | @@ -61,7 +61,7 @@ DELETE FROM KUDU [functional_kudu.testtbl] | | | 01:SCAN HDFS [functional.alltypes b] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 06:EXCHANGE [HASH(id)] | http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-update.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-update.test b/testdata/workloads/functional-planner/queries/PlannerTest/kudu-update.test index b779ee3..5fe40ac 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/kudu-update.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/kudu-update.test @@ -45,6 +45,7 @@ UPDATE KUDU [functional_kudu.testtbl] | 02:HASH JOIN [INNER JOIN] | hash predicates: a.id = b.id +| runtime filters: RF001 <- b.id | |--01:SCAN HDFS [functional.testtbl b] | partitions=1/1 files=0 size=0B @@ -52,11 +53,13 @@ UPDATE KUDU [functional_kudu.testtbl] | 00:SCAN KUDU [functional_kudu.testtbl a] kudu predicates: a.id = 10 + runtime filters: RF001 -> a.id ---- DISTRIBUTEDPLAN UPDATE KUDU [functional_kudu.testtbl] | 02:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: a.id = b.id +| runtime filters: RF001 <- b.id | |--03:EXCHANGE [BROADCAST] | | @@ -66,6 +69,7 @@ UPDATE KUDU [functional_kudu.testtbl] | 00:SCAN KUDU [functional_kudu.testtbl a] kudu predicates: a.id = 10 + runtime filters: RF001 -> a.id ==== update a set a.name = 'values' @@ -85,6 +89,7 @@ UPDATE KUDU [functional_kudu.testtbl] | 02:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: a.id = ids +| runtime filters: RF001 <- ids | |--04:EXCHANGE [HASH(ids)] | | @@ -94,6 +99,7 @@ UPDATE KUDU [functional_kudu.testtbl] 03:EXCHANGE [HASH(a.id)] | 00:SCAN KUDU [functional_kudu.testtbl a] + runtime filters: RF001 -> a.id ==== update a set a.name = 'values' @@ -104,17 +110,20 @@ UPDATE KUDU [functional_kudu.testtbl] | 02:HASH JOIN [LEFT SEMI JOIN] | hash predicates: a.zip = zip +| runtime filters: RF001 <- zip | |--01:SCAN HDFS [functional.testtbl] | partitions=1/1 files=0 size=0B | limit: 10 | 00:SCAN KUDU [functional_kudu.testtbl a] + runtime filters: RF001 -> a.zip ---- DISTRIBUTEDPLAN UPDATE KUDU [functional_kudu.testtbl] | 02:HASH JOIN [LEFT SEMI JOIN, BROADCAST] | hash predicates: a.zip = zip +| runtime filters: RF001 <- zip | |--04:EXCHANGE [BROADCAST] | | @@ -126,6 +135,7 @@ UPDATE KUDU [functional_kudu.testtbl] | limit: 10 | 00:SCAN KUDU [functional_kudu.testtbl a] + runtime filters: RF001 -> a.zip ==== update functional_kudu.testtbl set zip = 94546 where false ---- PLAN http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/kudu.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/kudu.test b/testdata/workloads/functional-planner/queries/PlannerTest/kudu.test index e620ad6..053fe72 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/kudu.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/kudu.test @@ -344,6 +344,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: a.id = b.id +| runtime filters: RF001 <- b.id | |--01:SCAN KUDU [functional_kudu.alltypessmall b] | predicates: CAST(b.id AS STRING) > '123' @@ -352,6 +353,7 @@ PLAN-ROOT SINK 00:SCAN KUDU [functional_kudu.alltypes a] predicates: CAST(a.id AS STRING) > '123' kudu predicates: a.id > 10 + runtime filters: RF001 -> a.id ==== # IMPALA-4662: Kudu analysis failure for NULL literal in IN list # NULL literal in values list results in applying predicate at scan node http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test index d563444..fe7e25f 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test @@ -21,7 +21,7 @@ Per-Host Resources: mem-estimate=40.94MB mem-reservation=16.94MB 02:HASH JOIN [INNER JOIN, BROADCAST] | hash predicates: c_nationkey = n_nationkey | fk/pk conjuncts: c_nationkey = n_nationkey -| runtime filters: RF000 <- n_nationkey +| runtime filters: RF000[bloom] <- n_nationkey | mem-estimate=16.94MB mem-reservation=16.94MB spill-buffer=64.00KB | tuple-ids=0,1 row-size=355B cardinality=150000 | @@ -41,7 +41,7 @@ Per-Host Resources: mem-estimate=40.94MB mem-reservation=16.94MB | 00:SCAN HDFS [tpch_parquet.customer, RANDOM] partitions=1/1 files=1 size=12.34MB - runtime filters: RF000 -> c_nationkey + runtime filters: RF000[bloom] -> c_nationkey stats-rows=150000 extrapolated-rows=disabled table stats: rows=150000 size=12.34MB column stats: all @@ -186,7 +186,7 @@ Per-Host Resources: mem-estimate=85.12MB mem-reservation=65.00MB 02:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: l_orderkey = o_orderkey | fk/pk conjuncts: l_orderkey = o_orderkey -| runtime filters: RF000 <- o_orderkey +| runtime filters: RF000[bloom] <- o_orderkey | mem-estimate=31.00MB mem-reservation=31.00MB spill-buffer=1.00MB | tuple-ids=0,1 row-size=33B cardinality=5757710 | @@ -212,7 +212,7 @@ F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3 Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM] partitions=1/1 files=3 size=193.92MB - runtime filters: RF000 -> l_orderkey + runtime filters: RF000[bloom] -> l_orderkey stats-rows=6001215 extrapolated-rows=disabled table stats: rows=6001215 size=193.92MB column stats: all http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test b/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test new file mode 100644 index 0000000..13e3014 --- /dev/null +++ b/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test @@ -0,0 +1,142 @@ +# basic filter +select count(*) from functional_kudu.alltypes a, functional_kudu.alltypestiny b +where a.int_col = b.tinyint_col + 1 and a.string_col = b.string_col +---- PLAN +F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1 +| Per-Host Resources: mem-estimate=11.94MB mem-reservation=1.94MB +PLAN-ROOT SINK +| mem-estimate=0B mem-reservation=0B +| +03:AGGREGATE [FINALIZE] +| output: count(*) +| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB +| tuple-ids=2 row-size=8B cardinality=1 +| +02:HASH JOIN [INNER JOIN] +| hash predicates: a.string_col = b.string_col, a.int_col = b.tinyint_col + 1 +| fk/pk conjuncts: none +| runtime filters: RF002[min_max] <- b.string_col, RF003[min_max] <- b.tinyint_col + 1 +| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB +| tuple-ids=0,1 row-size=39B cardinality=5840 +| +|--01:SCAN KUDU [functional_kudu.alltypestiny b] +| mem-estimate=0B mem-reservation=0B +| tuple-ids=1 row-size=18B cardinality=8 +| +00:SCAN KUDU [functional_kudu.alltypes a] + runtime filters: RF002[min_max] -> a.string_col, RF003[min_max] -> a.int_col + mem-estimate=0B mem-reservation=0B + tuple-ids=0 row-size=21B cardinality=7300 +==== +# Filters are not created if the target isn't a bare Kudu column or if 'is (not) distinct' +# is used. +select count(*) from functional_kudu.alltypes a, functional_kudu.alltypestiny b +where a.int_col + 1 = b.int_col + and a.string_col is distinct from b.string_col + and a.tinyint_col is not distinct from b.tinyint_col +---- PLAN +F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1 +| Per-Host Resources: mem-estimate=11.94MB mem-reservation=1.94MB +PLAN-ROOT SINK +| mem-estimate=0B mem-reservation=0B +| +03:AGGREGATE [FINALIZE] +| output: count(*) +| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB +| tuple-ids=2 row-size=8B cardinality=1 +| +02:HASH JOIN [INNER JOIN] +| hash predicates: a.tinyint_col IS NOT DISTINCT FROM b.tinyint_col, a.int_col + 1 = b.int_col +| fk/pk conjuncts: assumed fk/pk +| other predicates: a.string_col IS DISTINCT FROM b.string_col +| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB +| tuple-ids=0,1 row-size=44B cardinality=7300 +| +|--01:SCAN KUDU [functional_kudu.alltypestiny b] +| mem-estimate=0B mem-reservation=0B +| tuple-ids=1 row-size=22B cardinality=8 +| +00:SCAN KUDU [functional_kudu.alltypes a] + mem-estimate=0B mem-reservation=0B + tuple-ids=0 row-size=22B cardinality=7300 +==== +# Filters are only assigned when the target expr is cast if its an implicit integer cast. +select count(*) from functional_kudu.alltypes a, functional_kudu.alltypestiny b +where a.tinyint_col = b.bigint_col + and cast(a.int_col as smallint) = b.smallint_col + and a.string_col = b.timestamp_col + and cast(a.float_col as double) = b.double_col +---- PLAN +F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1 +| Per-Host Resources: mem-estimate=11.94MB mem-reservation=1.94MB +PLAN-ROOT SINK +| mem-estimate=0B mem-reservation=0B +| +03:AGGREGATE [FINALIZE] +| output: count(*) +| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB +| tuple-ids=2 row-size=8B cardinality=1 +| +02:HASH JOIN [INNER JOIN] +| hash predicates: CAST(a.float_col AS DOUBLE) = b.double_col, CAST(a.int_col AS SMALLINT) = b.smallint_col, a.string_col = b.timestamp_col, a.tinyint_col = b.bigint_col +| fk/pk conjuncts: a.string_col = b.timestamp_col, a.tinyint_col = b.bigint_col +| runtime filters: RF007[min_max] <- b.bigint_col +| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB +| tuple-ids=0,1 row-size=60B cardinality=1460 +| +|--01:SCAN KUDU [functional_kudu.alltypestiny b] +| mem-estimate=0B mem-reservation=0B +| tuple-ids=1 row-size=34B cardinality=8 +| +00:SCAN KUDU [functional_kudu.alltypes a] + runtime filters: RF007[min_max] -> a.tinyint_col + mem-estimate=0B mem-reservation=0B + tuple-ids=0 row-size=26B cardinality=7300 +==== +# Query with both Kudu and HDFS filter targets. +select count(*) from functional_kudu.alltypes a, functional_parquet.alltypes b, + functional_kudu.alltypes c +where a.int_col = b.int_col and a.int_col = c.int_col +---- PLAN +F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1 +| Per-Host Resources: mem-estimate=2.02GB mem-reservation=35.94MB +PLAN-ROOT SINK +| mem-estimate=0B mem-reservation=0B +| +05:AGGREGATE [FINALIZE] +| output: count(*) +| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB +| tuple-ids=3 row-size=8B cardinality=1 +| +04:HASH JOIN [INNER JOIN] +| hash predicates: a.int_col = c.int_col +| fk/pk conjuncts: none +| runtime filters: RF000[bloom] <- c.int_col, RF001[min_max] <- c.int_col +| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB +| tuple-ids=0,1,2 row-size=12B cardinality=5329000 +| +|--02:SCAN KUDU [functional_kudu.alltypes c] +| mem-estimate=0B mem-reservation=0B +| tuple-ids=2 row-size=4B cardinality=7300 +| +03:HASH JOIN [INNER JOIN] +| hash predicates: a.int_col = b.int_col +| fk/pk conjuncts: assumed fk/pk +| runtime filters: RF003[min_max] <- b.int_col +| mem-estimate=2.00GB mem-reservation=34.00MB spill-buffer=2.00MB +| tuple-ids=0,1 row-size=8B cardinality=7300 +| +|--01:SCAN HDFS [functional_parquet.alltypes b] +| partitions=24/24 files=24 size=179.70KB +| runtime filters: RF000[bloom] -> b.int_col +| stats-rows=unavailable extrapolated-rows=disabled +| table stats: rows=unavailable size=unavailable +| column stats: unavailable +| mem-estimate=16.00MB mem-reservation=0B +| tuple-ids=1 row-size=4B cardinality=unavailable +| +00:SCAN KUDU [functional_kudu.alltypes a] + runtime filters: RF001[min_max] -> a.int_col, RF003[min_max] -> a.int_col + mem-estimate=0B mem-reservation=0B + tuple-ids=0 row-size=4B cardinality=7300 +==== http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test b/testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test index da2e17f..3646146 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test @@ -86,7 +86,7 @@ PLAN-ROOT SINK | 07:HASH JOIN [INNER JOIN] | hash predicates: c.c_nationkey = s.s_nationkey, c_comment = s_comment -| runtime filters: RF002 <- s.s_nationkey, RF003 <- s_comment +| runtime filters: RF004 <- s.s_nationkey, RF005 <- s_comment | |--06:SCAN HDFS [tpch_nested_parquet.supplier s] | partitions=1/1 files=1 size=111.08MB @@ -94,7 +94,7 @@ PLAN-ROOT SINK | 05:SCAN HDFS [tpch_nested_parquet.customer c] partitions=1/1 files=4 size=577.87MB - runtime filters: RF000 -> c_nationkey, RF001 -> c.c_comment, RF002 -> c.c_nationkey, RF003 -> c_comment + runtime filters: RF000 -> c_nationkey, RF001 -> c.c_comment, RF004 -> c.c_nationkey, RF005 -> c_comment ==== # Test subplans: Cross join of parent and relative ref. select a.id, b.item from functional.allcomplextypes a cross join a.int_array_col b @@ -695,7 +695,7 @@ PLAN-ROOT SINK | | | |--05:HASH JOIN [RIGHT OUTER JOIN] | | | hash predicates: b.id = a.id -| | | runtime filters: RF001 <- a.id +| | | runtime filters: RF002 <- a.id | | | | | |--00:SCAN HDFS [functional.allcomplextypes a] | | | partitions=0/0 files=0 size=0B @@ -704,7 +704,7 @@ PLAN-ROOT SINK | | | | | 01:SCAN HDFS [functional.alltypestiny b] | | partitions=4/4 files=4 size=460B -| | runtime filters: RF001 -> b.id +| | runtime filters: RF002 -> b.id | | | 02:SCAN HDFS [functional.alltypessmall c] | partitions=4/4 files=4 size=6.32KB @@ -782,7 +782,7 @@ PLAN-ROOT SINK | 10:HASH JOIN [RIGHT OUTER JOIN] | | hash predicates: c.id = b.item | | other predicates: c.int_col > 30 -| | runtime filters: RF001 <- b.item +| | runtime filters: RF002 <- b.item | | | |--01:SUBPLAN | | | @@ -800,7 +800,7 @@ PLAN-ROOT SINK | 05:SCAN HDFS [functional.alltypessmall c] | partitions=4/4 files=4 size=6.32KB | predicates: c.id < 10, c.int_col > 30 -| runtime filters: RF001 -> c.id +| runtime filters: RF002 -> c.id | 06:SCAN HDFS [functional.alltypes e] partitions=24/24 files=24 size=478.45KB @@ -1966,22 +1966,22 @@ PLAN-ROOT SINK | |--05:HASH JOIN [INNER JOIN] | | hash predicates: t3.r_comment = t2.c_address -| | runtime filters: RF001 <- t2.c_address +| | runtime filters: RF002 <- t2.c_address | | | |--04:HASH JOIN [INNER JOIN] | | | hash predicates: t2.c_custkey = t5.r_regionkey -| | | runtime filters: RF002 <- t5.r_regionkey +| | | runtime filters: RF004 <- t5.r_regionkey | | | | | |--03:SCAN HDFS [tpch_nested_parquet.region t5] | | | partitions=1/1 files=1 size=4.18KB | | | | | 01:SCAN HDFS [tpch_nested_parquet.customer t2] | | partitions=1/1 files=4 size=577.87MB -| | runtime filters: RF002 -> t2.c_custkey +| | runtime filters: RF004 -> t2.c_custkey | | | 02:SCAN HDFS [tpch_nested_parquet.region t3] | partitions=1/1 files=1 size=4.18KB -| runtime filters: RF001 -> t3.r_comment +| runtime filters: RF002 -> t3.r_comment | 00:SCAN HDFS [tpch_nested_parquet.region.r_nations t1] partitions=1/1 files=1 size=4.18KB http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/order.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/order.test b/testdata/workloads/functional-planner/queries/PlannerTest/order.test index 4f51a2a..c64be15 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/order.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/order.test @@ -359,7 +359,7 @@ PLAN-ROOT SINK | |--03:HASH JOIN [INNER JOIN] | | hash predicates: a.smallint_col = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--01:SCAN HDFS [functional.alltypessmall b] | | partitions=4/4 files=4 size=6.32KB @@ -368,7 +368,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypesagg a] | partitions=1/11 files=1 size=73.39KB | predicates: a.int_col > 899 -| runtime filters: RF001 -> a.smallint_col +| runtime filters: RF002 -> a.smallint_col | 02:SCAN HDFS [functional.alltypessmall c] partitions=4/4 files=4 size=6.32KB @@ -392,7 +392,7 @@ PLAN-ROOT SINK | | | 03:HASH JOIN [INNER JOIN, PARTITIONED] | | hash predicates: b.id = a.smallint_col -| | runtime filters: RF001 <- a.smallint_col +| | runtime filters: RF002 <- a.smallint_col | | | |--07:EXCHANGE [HASH(a.smallint_col)] | | | @@ -405,7 +405,7 @@ PLAN-ROOT SINK | 01:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB | predicates: b.float_col > 4.5 -| runtime filters: RF001 -> b.id +| runtime filters: RF002 -> b.id | 08:EXCHANGE [HASH(c.id)] | http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/outer-joins.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/outer-joins.test b/testdata/workloads/functional-planner/queries/PlannerTest/outer-joins.test index 51989cd..4f7b809 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/outer-joins.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/outer-joins.test @@ -220,7 +220,7 @@ PLAN-ROOT SINK 03:HASH JOIN [RIGHT OUTER JOIN] | hash predicates: t1.id - 1 = t2.id + 1 | other join predicates: t1.zip = 94611, t2.zip = 94104 -| runtime filters: RF001 <- t2.id + 1 +| runtime filters: RF002 <- t2.id + 1 | |--01:SCAN HDFS [functional.testtbl t2] | partitions=1/1 files=0 size=0B @@ -229,7 +229,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.testtbl t1] partitions=1/1 files=0 size=0B predicates: t1.id IS NOT NULL, t1.id > 0 - runtime filters: RF000 -> t1.id, RF001 -> t1.id - 1 + runtime filters: RF000 -> t1.id, RF002 -> t1.id - 1 ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -252,7 +252,7 @@ PLAN-ROOT SINK 03:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED] | hash predicates: t1.id - 1 = t2.id + 1 | other join predicates: t1.zip = 94611, t2.zip = 94104 -| runtime filters: RF001 <- t2.id + 1 +| runtime filters: RF002 <- t2.id + 1 | |--06:EXCHANGE [HASH(t2.id + 1)] | | @@ -265,7 +265,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.testtbl t1] partitions=1/1 files=0 size=0B predicates: t1.id IS NOT NULL, t1.id > 0 - runtime filters: RF000 -> t1.id, RF001 -> t1.id - 1 + runtime filters: RF000 -> t1.id, RF002 -> t1.id - 1 ==== # the same thing with subqueries; should produce the same result select * @@ -291,7 +291,7 @@ PLAN-ROOT SINK 03:HASH JOIN [RIGHT OUTER JOIN] | hash predicates: a1.id - 1 = a2.id + 1 | other join predicates: a1.zip = 94611, a2.zip = 94104 -| runtime filters: RF001 <- a2.id + 1 +| runtime filters: RF002 <- a2.id + 1 | |--01:SCAN HDFS [functional.testtbl a2] | partitions=1/1 files=0 size=0B @@ -300,7 +300,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.testtbl a1] partitions=1/1 files=0 size=0B predicates: a1.id IS NOT NULL, a1.id > 0 - runtime filters: RF000 -> a1.id, RF001 -> a1.id - 1 + runtime filters: RF000 -> a1.id, RF002 -> a1.id - 1 ---- DISTRIBUTEDPLAN PLAN-ROOT SINK | @@ -323,7 +323,7 @@ PLAN-ROOT SINK 03:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED] | hash predicates: a1.id - 1 = a2.id + 1 | other join predicates: a1.zip = 94611, a2.zip = 94104 -| runtime filters: RF001 <- a2.id + 1 +| runtime filters: RF002 <- a2.id + 1 | |--06:EXCHANGE [HASH(a2.id + 1)] | | @@ -336,7 +336,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.testtbl a1] partitions=1/1 files=0 size=0B predicates: a1.id IS NOT NULL, a1.id > 0 - runtime filters: RF000 -> a1.id, RF001 -> a1.id - 1 + runtime filters: RF000 -> a1.id, RF002 -> a1.id - 1 ==== # right outer join requires the join op to be partitioned, otherwise non-matches cause # duplicates @@ -661,7 +661,7 @@ PLAN-ROOT SINK | |--04:HASH JOIN [INNER JOIN] | | hash predicates: a.id = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--01:SCAN HDFS [functional.alltypes b] | | partitions=24/24 files=24 size=478.45KB @@ -669,7 +669,7 @@ PLAN-ROOT SINK | | | 00:SCAN HDFS [functional.alltypes a] | partitions=24/24 files=24 size=478.45KB -| runtime filters: RF001 -> a.id +| runtime filters: RF002 -> a.id | 02:SCAN HDFS [functional.alltypes c] partitions=24/24 files=24 size=478.45KB @@ -800,7 +800,7 @@ PLAN-ROOT SINK | |--04:HASH JOIN [RIGHT OUTER JOIN] | | hash predicates: a.id = b.id -| | runtime filters: RF001 <- b.id +| | runtime filters: RF002 <- b.id | | | |--01:SCAN HDFS [functional.alltypestiny b] | | partitions=4/4 files=4 size=460B @@ -809,7 +809,7 @@ PLAN-ROOT SINK | 00:SCAN HDFS [functional.alltypestiny a] | partitions=4/4 files=4 size=460B | predicates: a.int_col > 10 -| runtime filters: RF001 -> a.id +| runtime filters: RF002 -> a.id | 02:SCAN HDFS [functional.alltypestiny c] partitions=4/4 files=4 size=460B http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test b/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test index bd2d705..cc29c8c 100644 --- a/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test +++ b/testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test @@ -219,7 +219,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: a.id = b.id, a.month = b.month, a.year = b.year, a.tinyint_col = b.smallint_col -| runtime filters: RF004 <- b.id, RF005 <- b.month, RF006 <- b.year, RF007 <- b.smallint_col +| runtime filters: RF008 <- b.id, RF009 <- b.month, RF010 <- b.year, RF011 <- b.smallint_col | |--01:SCAN HDFS [functional.alltypessmall b] | partitions=2/4 files=2 size=3.16KB @@ -229,7 +229,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes a] partitions=2/24 files=2 size=38.07KB predicates: a.id = 17, CAST(sin(a.tinyint_col) AS BOOLEAN) = TRUE - runtime filters: RF000 -> a.id, RF001 -> a.month, RF002 -> a.year, RF003 -> a.tinyint_col, RF004 -> a.id, RF005 -> a.month, RF006 -> a.year, RF007 -> a.tinyint_col + runtime filters: RF000 -> a.id, RF001 -> a.month, RF002 -> a.year, RF003 -> a.tinyint_col, RF008 -> a.id, RF009 -> a.month, RF010 -> a.year, RF011 -> a.tinyint_col ---- SCANRANGELOCATIONS NODE 0: HDFS SPLIT hdfs://localhost:20500/test-warehouse/alltypes/year=2009/month=1/090101.txt 0:20433 @@ -257,7 +257,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: a.id = b.id, a.month = b.month, a.year = b.year, a.tinyint_col = b.smallint_col -| runtime filters: RF004 <- b.id, RF005 <- b.month, RF006 <- b.year, RF007 <- b.smallint_col +| runtime filters: RF008 <- b.id, RF009 <- b.month, RF010 <- b.year, RF011 <- b.smallint_col | |--06:EXCHANGE [HASH(b.id,b.month,b.year,b.smallint_col)] | | @@ -271,7 +271,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes a] partitions=2/24 files=2 size=38.07KB predicates: a.id = 17, CAST(sin(a.tinyint_col) AS BOOLEAN) = TRUE - runtime filters: RF000 -> a.id, RF001 -> a.month, RF002 -> a.year, RF003 -> a.tinyint_col, RF004 -> a.id, RF005 -> a.month, RF006 -> a.year, RF007 -> a.tinyint_col + runtime filters: RF000 -> a.id, RF001 -> a.month, RF002 -> a.year, RF003 -> a.tinyint_col, RF008 -> a.id, RF009 -> a.month, RF010 -> a.year, RF011 -> a.tinyint_col ==== # basic propagation between equivalence classes, with partition pruning; # variation with inline views @@ -296,7 +296,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: functional.alltypes.id = functional.alltypessmall.id, functional.alltypes.month = functional.alltypessmall.month, functional.alltypes.year = functional.alltypessmall.year, functional.alltypes.tinyint_col = functional.alltypessmall.smallint_col -| runtime filters: RF004 <- functional.alltypessmall.id, RF005 <- functional.alltypessmall.month, RF006 <- functional.alltypessmall.year, RF007 <- functional.alltypessmall.smallint_col +| runtime filters: RF008 <- functional.alltypessmall.id, RF009 <- functional.alltypessmall.month, RF010 <- functional.alltypessmall.year, RF011 <- functional.alltypessmall.smallint_col | |--01:SCAN HDFS [functional.alltypessmall] | partitions=2/4 files=2 size=3.16KB @@ -306,7 +306,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes] partitions=2/24 files=2 size=38.07KB predicates: functional.alltypes.id = 17, CAST(sin(functional.alltypes.tinyint_col) AS BOOLEAN) = TRUE - runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.month, RF002 -> functional.alltypes.year, RF003 -> functional.alltypes.tinyint_col, RF004 -> functional.alltypes.id, RF005 -> functional.alltypes.month, RF006 -> functional.alltypes.year, RF007 -> functional.alltypes.tinyint_col + runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.month, RF002 -> functional.alltypes.year, RF003 -> functional.alltypes.tinyint_col, RF008 -> functional.alltypes.id, RF009 -> functional.alltypes.month, RF010 -> functional.alltypes.year, RF011 -> functional.alltypes.tinyint_col ---- SCANRANGELOCATIONS NODE 0: HDFS SPLIT hdfs://localhost:20500/test-warehouse/alltypes/year=2009/month=1/090101.txt 0:20433 @@ -334,7 +334,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN, PARTITIONED] | hash predicates: functional.alltypes.id = functional.alltypessmall.id, functional.alltypes.month = functional.alltypessmall.month, functional.alltypes.year = functional.alltypessmall.year, functional.alltypes.tinyint_col = functional.alltypessmall.smallint_col -| runtime filters: RF004 <- functional.alltypessmall.id, RF005 <- functional.alltypessmall.month, RF006 <- functional.alltypessmall.year, RF007 <- functional.alltypessmall.smallint_col +| runtime filters: RF008 <- functional.alltypessmall.id, RF009 <- functional.alltypessmall.month, RF010 <- functional.alltypessmall.year, RF011 <- functional.alltypessmall.smallint_col | |--06:EXCHANGE [HASH(functional.alltypessmall.id,functional.alltypessmall.month,functional.alltypessmall.year,functional.alltypessmall.smallint_col)] | | @@ -348,7 +348,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes] partitions=2/24 files=2 size=38.07KB predicates: functional.alltypes.id = 17, CAST(sin(functional.alltypes.tinyint_col) AS BOOLEAN) = TRUE - runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.month, RF002 -> functional.alltypes.year, RF003 -> functional.alltypes.tinyint_col, RF004 -> functional.alltypes.id, RF005 -> functional.alltypes.month, RF006 -> functional.alltypes.year, RF007 -> functional.alltypes.tinyint_col + runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.month, RF002 -> functional.alltypes.year, RF003 -> functional.alltypes.tinyint_col, RF008 -> functional.alltypes.id, RF009 -> functional.alltypes.month, RF010 -> functional.alltypes.year, RF011 -> functional.alltypes.tinyint_col ==== # propagation between outer-joined tables only goes in one direction: # - predicates on a.year and a.tinyint_col are propagated to b @@ -824,14 +824,14 @@ PLAN-ROOT SINK 02:HASH JOIN [INNER JOIN] | hash predicates: a.int_col = b.int_col, a.year = b.year | other predicates: a.id + b.id = 17 -| runtime filters: RF001 <- b.int_col, RF002 <- b.year +| runtime filters: RF002 <- b.int_col, RF003 <- b.year | |--01:SCAN HDFS [functional.alltypessmall b] | partitions=4/4 files=4 size=6.32KB | 00:SCAN HDFS [functional.alltypes a] partitions=12/24 files=12 size=238.68KB - runtime filters: RF000 -> a.id, RF001 -> a.int_col, RF002 -> a.year + runtime filters: RF000 -> a.id, RF002 -> a.int_col, RF003 -> a.year ==== # correct placement of predicates in the presence of aggregation in an inline view select straight_join a.id, b.id @@ -1051,7 +1051,7 @@ PLAN-ROOT SINK | 03:HASH JOIN [INNER JOIN] | hash predicates: t1.id = t2.id, t1.tinyint_col = t2.smallint_col -| runtime filters: RF003 <- t2.id, RF004 <- t2.smallint_col +| runtime filters: RF006 <- t2.id, RF007 <- t2.smallint_col | |--01:SCAN HDFS [functional.alltypessmall t2] | partitions=4/4 files=4 size=6.32KB @@ -1061,7 +1061,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes t1] partitions=24/24 files=24 size=478.45KB predicates: t1.id + t1.tinyint_col > 10 - runtime filters: RF001 -> t1.id, RF002 -> t1.tinyint_col, RF003 -> t1.id, RF004 -> t1.tinyint_col + runtime filters: RF001 -> t1.id, RF002 -> t1.tinyint_col, RF006 -> t1.id, RF007 -> t1.tinyint_col ==== # basic propagation of multi-slot, single-tuple predicates with aggregates select straight_join 1 from @@ -1096,7 +1096,7 @@ PLAN-ROOT SINK | 05:HASH JOIN [INNER JOIN] | hash predicates: t1.id = count(tinyint_col), t1.tinyint_col = max(smallint_col) -| runtime filters: RF001 <- count(tinyint_col), RF002 <- max(smallint_col) +| runtime filters: RF002 <- count(tinyint_col), RF003 <- max(smallint_col) | |--02:AGGREGATE [FINALIZE] | | output: count(tinyint_col), max(smallint_col), min(int_col) @@ -1109,7 +1109,7 @@ PLAN-ROOT SINK 00:SCAN HDFS [functional.alltypes t1] partitions=24/24 files=24 size=478.45KB predicates: t1.id + t1.tinyint_col > 10, t1.id + t1.tinyint_col > 20 - runtime filters: RF000 -> t1.tinyint_col, RF001 -> t1.id, RF002 -> t1.tinyint_col + runtime filters: RF000 -> t1.tinyint_col, RF002 -> t1.id, RF003 -> t1.tinyint_col ==== # assignment of multi-slot, single-tuple predicates with outer-joined tuple (IMPALA-824) select straight_join 1