Repository: incubator-impala
Updated Branches:
  refs/heads/master 265e39f89 -> f992dc7f8


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
index 8453658..43dee70 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
@@ -263,7 +263,7 @@ where t1.year = v.int_col and t1.year = v.id and t1.month = 
v.tinyint_col
 |
 |--05:HASH JOIN [INNER JOIN]
 |  |  hash predicates: t3.int_col = t4.int_col, t2.tinyint_col = t4.tinyint_col
-|  |  runtime filters: RF003 <- t4.tinyint_col, RF002 <- t4.int_col
+|  |  runtime filters: RF002 <- t4.int_col, RF003 <- t4.tinyint_col
 |  |
 |  |--03:SCAN HDFS [functional.alltypesnopart t4]
 |  |     partitions=1/1 files=0 size=0B
@@ -306,6 +306,7 @@ where t1.year = t2.id and t1.year = t3.int_col and t1.year 
= t4.tinyint_col and
 |--02:SCAN HDFS [functional.alltypesnopart t3]
 |     partitions=1/1 files=0 size=0B
 |     predicates: t3.bool_col = TRUE
+|     runtime filters: RF000 -> t3.int_col
 |
 04:HASH JOIN [INNER JOIN]
 |  hash predicates: t1.year = t2.id
@@ -314,6 +315,7 @@ where t1.year = t2.id and t1.year = t3.int_col and t1.year 
= t4.tinyint_col and
 |--01:SCAN HDFS [functional.alltypesnopart t2]
 |     partitions=1/1 files=0 size=0B
 |     predicates: t2.bool_col = FALSE
+|     runtime filters: RF000 -> t2.id, RF001 -> t2.id
 |
 00:SCAN HDFS [functional.alltypesagg t1]
    partitions=11/11 files=11 size=814.73KB
@@ -327,7 +329,7 @@ where t1.year = t2.id and t2.int_col = t3.tinyint_col and 
t3.month = t4.bigint_c
 ---- PLAN
 08:HASH JOIN [INNER JOIN]
 |  hash predicates: t4.smallint_col = t5.smallint_col, t1.month = t5.id
-|  runtime filters: RF001 <- t5.id, RF000 <- t5.smallint_col
+|  runtime filters: RF000 <- t5.smallint_col, RF001 <- t5.id
 |
 |--04:SCAN HDFS [functional.alltypesnopart t5]
 |     partitions=1/1 files=0 size=0B
@@ -426,6 +428,7 @@ where t2.id = 1 and t3.int_col = 1 and t4.bool_col = true 
and t5.bool_col = fals
 |--02:SCAN HDFS [functional.alltypesnopart t3]
 |     partitions=1/1 files=0 size=0B
 |     predicates: t3.int_col = 1
+|     runtime filters: RF000 -> t3.id
 |
 05:HASH JOIN [LEFT OUTER JOIN]
 |  hash predicates: t1.year = t2.int_col
@@ -433,6 +436,7 @@ where t2.id = 1 and t3.int_col = 1 and t4.bool_col = true 
and t5.bool_col = fals
 |--01:SCAN HDFS [functional.alltypesnopart t2]
 |     partitions=1/1 files=0 size=0B
 |     predicates: t2.id = 1
+|     runtime filters: RF000 -> t2.int_col
 |
 00:SCAN HDFS [functional.alltypesagg t1]
    partitions=11/11 files=11 size=814.73KB
@@ -603,6 +607,7 @@ where b.int_col < 10
 |--03:SCAN HDFS [functional.alltypestiny b]
 |     partitions=4/4 files=4 size=460B
 |     predicates: b.int_col < 10
+|     runtime filters: RF000 -> b.year
 |
 05:HASH JOIN [INNER JOIN]
 |  hash predicates: year = a.year
@@ -610,6 +615,7 @@ where b.int_col < 10
 |
 |--02:SCAN HDFS [functional.alltypestiny a]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> a.year, RF001 -> a.year
 |
 01:AGGREGATE [FINALIZE]
 |  group by: id, year, month
@@ -639,7 +645,6 @@ where v1.year = t2.id and v1.int_col = t2.int_col and 
t2.smallint_col = 1
    partitions=11/11 files=11 size=814.73KB
 ====
 # Two-way join query with an inline in the probe side of the join that has a 
union
-# TODO Support runtime filter propagation through all union operands
 select straight_join * from
   (select year from functional.alltypesagg t1 union all
    select year from functional.alltypestiny t2) v,
@@ -658,11 +663,87 @@ where v.year = t3.int_col and t3.bool_col = false
 |
 |--02:SCAN HDFS [functional.alltypestiny t2]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> t2.year
 |
 01:SCAN HDFS [functional.alltypesagg t1]
    partitions=11/11 files=11 size=814.73KB
    runtime filters: RF000 -> t1.year
 ====
+# Query with nested UNION ALL operators
+select straight_join count(*) from
+  (select month, year from functional.alltypes
+   union all
+   (select month, year from functional.alltypes
+    union all
+    select month, year from functional.alltypes)) a
+  join functional.alltypessmall b
+  on a.month = b.month
+where b.int_col = 1
+---- PLAN
+06:AGGREGATE [FINALIZE]
+|  output: count(*)
+|
+05:HASH JOIN [INNER JOIN]
+|  hash predicates: month = b.month
+|  runtime filters: RF000 <- b.month
+|
+|--04:SCAN HDFS [functional.alltypessmall b]
+|     partitions=4/4 files=4 size=6.32KB
+|     predicates: b.int_col = 1
+|
+00:UNION
+|
+|--03:SCAN HDFS [functional.alltypes]
+|     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.month
+|
+|--02:SCAN HDFS [functional.alltypes]
+|     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.month
+|
+01:SCAN HDFS [functional.alltypes]
+   partitions=24/24 files=24 size=478.45KB
+   runtime filters: RF000 -> functional.alltypes.month
+====
+# Query with nested UNION DISTINCT operators
+select straight_join count(*) from
+  (select month, year from functional.alltypes
+   union distinct
+   (select month, year from functional.alltypes
+    union distinct
+    select month, year from functional.alltypes)) a
+  join functional.alltypessmall b
+  on a.month = b.month
+where b.int_col = 1
+---- PLAN
+07:AGGREGATE [FINALIZE]
+|  output: count(*)
+|
+06:HASH JOIN [INNER JOIN]
+|  hash predicates: month = b.month
+|  runtime filters: RF000 <- b.month
+|
+|--05:SCAN HDFS [functional.alltypessmall b]
+|     partitions=4/4 files=4 size=6.32KB
+|     predicates: b.int_col = 1
+|
+04:AGGREGATE [FINALIZE]
+|  group by: month, year
+|
+00:UNION
+|
+|--03:SCAN HDFS [functional.alltypes]
+|     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.month
+|
+|--02:SCAN HDFS [functional.alltypes]
+|     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.month
+|
+01:SCAN HDFS [functional.alltypes]
+   partitions=24/24 files=24 size=478.45KB
+   runtime filters: RF000 -> functional.alltypes.month
+====
 # UNION ALL query
 select straight_join t2.id, t1.year from functional.alltypesagg t1, 
functional.alltypesnopart t2
 where t1.year = t2.int_col and t2.bool_col = false
@@ -696,6 +777,37 @@ where t3.month = t4.smallint_col and t4.bool_col = true
    partitions=11/11 files=11 size=814.73KB
    runtime filters: RF000 -> t1.year
 ====
+# Query with UNION ALL operator on the rhs of a join node
+select straight_join count(*) from functional.alltypes a
+  join [broadcast]
+  (select id, int_col from functional.alltypes
+   union all
+   select id, int_col from functional.alltypes) b
+  on a.id = b.id
+where (b.id - b.id) < 1 AND (b.int_col - b.int_col) < 1
+---- PLAN
+05:AGGREGATE [FINALIZE]
+|  output: count(*)
+|
+04:HASH JOIN [INNER JOIN]
+|  hash predicates: a.id = id
+|  runtime filters: RF000 <- id
+|
+|--01:UNION
+|  |
+|  |--03:SCAN HDFS [functional.alltypes]
+|  |     partitions=24/24 files=24 size=478.45KB
+|  |     predicates: (functional.alltypes.id - functional.alltypes.id) < 1, 
(functional.alltypes.int_col - functional.alltypes.int_col) < 1
+|  |
+|  02:SCAN HDFS [functional.alltypes]
+|     partitions=24/24 files=24 size=478.45KB
+|     predicates: (functional.alltypes.id - functional.alltypes.id) < 1, 
(functional.alltypes.int_col - functional.alltypes.int_col) < 1
+|
+00:SCAN HDFS [functional.alltypes a]
+   partitions=24/24 files=24 size=478.45KB
+   predicates: (a.id - a.id) < 1
+   runtime filters: RF000 -> a.id
+====
 # Two-way join query with an inline view in the probe side of the join where 
the
 # scan node to apply the filter in below an analytic function on the probe 
side of the join
 select straight_join * from
@@ -829,6 +941,7 @@ where t3.int_col = 1
 |
 |--01:SCAN HDFS [functional.alltypestiny t2]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> t2.id
 |
 00:SCAN HDFS [functional.alltypestiny t1]
    partitions=4/4 files=4 size=460B
@@ -853,6 +966,7 @@ where t3.int_col = 1
 |
 |--01:SCAN HDFS [functional.alltypestiny t2]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> t2.id
 |
 00:SCAN HDFS [functional.alltypestiny t1]
    partitions=4/4 files=4 size=460B
@@ -880,7 +994,7 @@ where c_custkey = v.o_orderkey
 |  02:SINGULAR ROW SRC
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
 ====
 # Two-way join query where the build side is optimized into an empty set
 select straight_join 1
@@ -931,6 +1045,7 @@ select straight_join 1 from functional.alltypestiny t1 
join functional.alltypest
 |
 |--02:SCAN HDFS [functional.alltypestiny t3]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> t3.id + t3.id
 |
 04:HASH JOIN [INNER JOIN]
 |  hash predicates: t1.id = t2.id
@@ -938,6 +1053,7 @@ select straight_join 1 from functional.alltypestiny t1 
join functional.alltypest
 |
 |--01:SCAN HDFS [functional.alltypestiny t2]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> t2.id + t2.id, RF001 -> t2.id
 |
 00:SCAN HDFS [functional.alltypestiny t1]
    partitions=4/4 files=4 size=460B

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
index 8115502..fa21c9e 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
@@ -518,7 +518,7 @@ where t.int_col < 10 and t.int_col in
 ---- PLAN
 04:HASH JOIN [LEFT SEMI JOIN]
 |  hash predicates: t.int_col = int_col, t.id = s.id
-|  runtime filters: RF001 <- s.id, RF000 <- int_col
+|  runtime filters: RF000 <- int_col, RF001 <- s.id
 |
 |--02:SCAN HDFS [functional.alltypessmall s]
 |     partitions=4/4 files=4 size=6.32KB
@@ -531,7 +531,7 @@ where t.int_col < 10 and t.int_col in
 |--01:SCAN HDFS [functional.alltypes t]
 |     partitions=24/24 files=24 size=478.45KB
 |     predicates: t.int_col < 10
-|     runtime filters: RF000 -> t.int_col
+|     runtime filters: RF000 -> t.int_col, RF001 -> t.id
 |
 00:SCAN HDFS [functional.alltypesagg a]
    partitions=11/11 files=11 size=814.73KB
@@ -819,6 +819,7 @@ having count(*) < 100
 |  |  |--00:SCAN HDFS [functional.alltypesagg g]
 |  |  |     partitions=11/11 files=11 size=814.73KB
 |  |  |     predicates: g.int_col < 100
+|  |  |     runtime filters: RF003 -> g.id
 |  |  |
 |  |  01:SCAN HDFS [functional.alltypes a]
 |  |     partitions=24/24 files=24 size=478.45KB

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
index 359b029..22032ab 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
@@ -2549,6 +2549,7 @@ limit 100
 |--05:SCAN HDFS [tpcds.date_dim d]
 |     partitions=1/1 files=1 size=9.84MB
 |     predicates: d_month_seq >= 1185, d_month_seq <= 1185 + 11
+|     runtime filters: RF000 -> d.d_week_seq
 |
 06:HASH JOIN [INNER JOIN]
 |  hash predicates: ss_store_sk = s_store_sk
@@ -2643,6 +2644,7 @@ limit 100
 |  05:SCAN HDFS [tpcds.date_dim d]
 |     partitions=1/1 files=1 size=9.84MB
 |     predicates: d_month_seq >= 1185, d_month_seq <= 1185 + 11
+|     runtime filters: RF000 -> d.d_week_seq
 |
 06:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: ss_store_sk = s_store_sk
@@ -2769,6 +2771,7 @@ limit 100
 |  05:SCAN HDFS [tpcds.date_dim d]
 |     partitions=1/1 files=1 size=9.84MB
 |     predicates: d_month_seq >= 1185, d_month_seq <= 1185 + 11
+|     runtime filters: RF000 -> d.d_week_seq
 |
 06:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: ss_store_sk = s_store_sk
@@ -3128,6 +3131,7 @@ limit 100
 |
 |--00:SCAN HDFS [tpcds.store]
 |     partitions=1/1 files=1 size=3.08KB
+|     runtime filters: RF000 -> tpcds.store.s_store_sk
 |
 10:AGGREGATE [FINALIZE]
 |  output: sum(ss_sales_price)
@@ -3210,6 +3214,7 @@ limit 100
 |  |
 |  00:SCAN HDFS [tpcds.store]
 |     partitions=1/1 files=1 size=3.08KB
+|     runtime filters: RF000 -> tpcds.store.s_store_sk
 |
 17:AGGREGATE [FINALIZE]
 |  output: sum:merge(ss_sales_price)
@@ -3316,6 +3321,7 @@ limit 100
 |  |
 |  00:SCAN HDFS [tpcds.store]
 |     partitions=1/1 files=1 size=3.08KB
+|     runtime filters: RF000 -> tpcds.store.s_store_sk
 |
 17:AGGREGATE [FINALIZE]
 |  output: sum:merge(ss_sales_price)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
index f9d0ff0..b91cc04 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
@@ -752,6 +752,7 @@ order by
 |
 |--03:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
+|     runtime filters: RF001 -> s_nationkey
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: o_custkey = c_custkey
@@ -818,6 +819,7 @@ order by
 |  |
 |  03:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
+|     runtime filters: RF001 -> s_nationkey
 |
 07:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: o_custkey = c_custkey
@@ -900,6 +902,7 @@ order by
 |  |
 |  03:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
+|     runtime filters: RF001 -> s_nationkey
 |
 07:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: o_custkey = c_custkey
@@ -1617,7 +1620,7 @@ order by
 |
 |--01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF000 -> s_nationkey
+|     runtime filters: RF000 -> s_nationkey, RF001 -> tpch.supplier.s_suppkey
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: l_orderkey = o_orderkey
@@ -1633,6 +1636,7 @@ order by
 |--00:SCAN HDFS [tpch.part]
 |     partitions=1/1 files=1 size=22.83MB
 |     predicates: p_name LIKE '%green%'
+|     runtime filters: RF002 -> tpch.part.p_partkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
@@ -1680,7 +1684,7 @@ order by
 |  |
 |  01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF000 -> s_nationkey
+|     runtime filters: RF000 -> s_nationkey, RF001 -> tpch.supplier.s_suppkey
 |
 07:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: l_orderkey = o_orderkey
@@ -1702,6 +1706,7 @@ order by
 |  00:SCAN HDFS [tpch.part]
 |     partitions=1/1 files=1 size=22.83MB
 |     predicates: p_name LIKE '%green%'
+|     runtime filters: RF002 -> tpch.part.p_partkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
@@ -1761,7 +1766,7 @@ order by
 |  |
 |  01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF000 -> s_nationkey
+|     runtime filters: RF000 -> s_nationkey, RF001 -> tpch.supplier.s_suppkey
 |
 07:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: l_orderkey = o_orderkey
@@ -1791,6 +1796,7 @@ order by
 |  00:SCAN HDFS [tpch.part]
 |     partitions=1/1 files=1 size=22.83MB
 |     predicates: p_name LIKE '%green%'
+|     runtime filters: RF002 -> tpch.part.p_partkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
@@ -3117,7 +3123,7 @@ limit 100
 |
 |--01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
-|     runtime filters: RF001 -> o_custkey
+|     runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
@@ -3175,7 +3181,7 @@ limit 100
 |  |
 |  01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
-|     runtime filters: RF001 -> o_custkey
+|     runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
 |
 10:EXCHANGE [HASH(l_orderkey)]
 |
@@ -3247,7 +3253,7 @@ limit 100
 |  |
 |  01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
-|     runtime filters: RF001 -> o_custkey
+|     runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
 |
 10:EXCHANGE [HASH(l_orderkey)]
 |
@@ -3430,7 +3436,7 @@ order by
 |  |
 |  02:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
-|     runtime filters: RF003 -> ps_partkey
+|     runtime filters: RF000 -> ps_suppkey, RF003 -> ps_partkey
 |
 05:AGGREGATE [FINALIZE]
 |  output: sum(l_quantity)
@@ -3488,7 +3494,7 @@ order by
 |  |
 |  02:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
-|     runtime filters: RF003 -> ps_partkey
+|     runtime filters: RF000 -> ps_suppkey, RF003 -> ps_partkey
 |
 12:AGGREGATE [FINALIZE]
 |  output: sum:merge(l_quantity)
@@ -3568,7 +3574,7 @@ order by
 |  |
 |  02:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
-|     runtime filters: RF003 -> ps_partkey
+|     runtime filters: RF000 -> ps_suppkey, RF003 -> ps_partkey
 |
 12:AGGREGATE [FINALIZE]
 |  output: sum:merge(l_quantity)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
index c149d25..34bc270 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
@@ -30,7 +30,7 @@ order by
 |  group by: l_returnflag, l_linestatus
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate <= '1998-09-02'
 ---- DISTRIBUTEDPLAN
 05:MERGING-EXCHANGE [UNPARTITIONED]
@@ -50,7 +50,7 @@ order by
 |  group by: l_returnflag, l_linestatus
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate <= '1998-09-02'
 ====
 # TPCH-Q2
@@ -408,7 +408,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: o_orderdate >= '1993-07-01', o_orderdate < '1993-10-01'
    predicates on o_lineitems: l_commitdate < l_receiptdate
@@ -446,7 +446,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: o_orderdate >= '1993-07-01', o_orderdate < '1993-10-01'
    predicates on o_lineitems: l_commitdate < l_receiptdate
@@ -504,6 +504,7 @@ order by
 |
 |--09:SCAN HDFS [tpch_nested_parquet.supplier s]
 |     partitions=1/1 files=1 size=111.08MB
+|     runtime filters: RF000 -> s_nationkey
 |
 01:SUBPLAN
 |
@@ -522,7 +523,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1994-01-01', 
o_orderdate < '1995-01-01'
    runtime filters: RF000 -> c.c_nationkey, RF002 -> c_nationkey
@@ -569,6 +570,7 @@ order by
 |  |
 |  09:SCAN HDFS [tpch_nested_parquet.supplier s]
 |     partitions=1/1 files=1 size=111.08MB
+|     runtime filters: RF000 -> s_nationkey
 |
 01:SUBPLAN
 |
@@ -587,7 +589,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1994-01-01', 
o_orderdate < '1995-01-01'
    runtime filters: RF000 -> c.c_nationkey, RF002 -> c_nationkey
@@ -708,7 +710,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems)
    predicates on l: l_shipdate >= '1995-01-01', l_shipdate <= '1996-12-31'
@@ -775,7 +777,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems)
    predicates on l: l_shipdate >= '1995-01-01', l_shipdate <= '1996-12-31'
@@ -879,7 +881,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1995-01-01', 
o_orderdate <= '1996-12-31'
    runtime filters: RF001 -> c_nationkey
@@ -962,7 +964,7 @@ order by
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1995-01-01', 
o_orderdate <= '1996-12-31'
    runtime filters: RF001 -> c_nationkey
@@ -1045,7 +1047,7 @@ order by
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(o.o_lineitems)
 ---- DISTRIBUTEDPLAN
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1109,7 +1111,7 @@ order by
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(o.o_lineitems)
 ====
 # TPCH-Q10
@@ -1177,7 +1179,7 @@ limit 20
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1993-10-01', 
o_orderdate < '1994-01-01'
    predicates on l: l_returnflag = 'R'
@@ -1226,7 +1228,7 @@ limit 20
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate >= '1993-10-01', 
o_orderdate < '1994-01-01'
    predicates on l: l_returnflag = 'R'
@@ -1442,7 +1444,7 @@ order by
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(o.o_lineitems)
    predicates on l: l_shipmode IN ('MAIL', 'SHIP'), l_commitdate < 
l_receiptdate, l_shipdate < l_commitdate, l_receiptdate >= '1994-01-01', 
l_receiptdate < '1995-01-01'
 ---- DISTRIBUTEDPLAN
@@ -1471,7 +1473,7 @@ order by
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(o.o_lineitems)
    predicates on l: l_shipmode IN ('MAIL', 'SHIP'), l_commitdate < 
l_receiptdate, l_shipdate < l_commitdate, l_receiptdate >= '1994-01-01', 
l_receiptdate < '1995-01-01'
 ====
@@ -1517,7 +1519,7 @@ order by
 |  03:UNNEST [c.c_orders]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates on c_orders: (NOT o_comment LIKE '%special%requests%')
 ---- DISTRIBUTEDPLAN
 12:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1555,7 +1557,7 @@ order by
 |  03:UNNEST [c.c_orders]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates on c_orders: (NOT o_comment LIKE '%special%requests%')
 ====
 # TPCH-Q14
@@ -1585,7 +1587,7 @@ where
 |     partitions=1/1 files=1 size=6.30MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1995-09-01', l_shipdate < '1995-10-01'
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
@@ -1607,7 +1609,7 @@ where
 |     partitions=1/1 files=1 size=6.30MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1995-09-01', l_shipdate < '1995-10-01'
    runtime filters: RF000 -> l_partkey
 ====
@@ -1658,7 +1660,7 @@ order by
 |  |  group by: l_suppkey
 |  |
 |  03:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |     predicates: l_shipdate >= '1996-01-01', l_shipdate < '1996-04-01'
 |
 06:HASH JOIN [INNER JOIN]
@@ -1673,7 +1675,7 @@ order by
 |  group by: l_suppkey
 |
 01:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1996-01-01', l_shipdate < '1996-04-01'
    runtime filters: RF000 -> l.l_suppkey
 ---- DISTRIBUTEDPLAN
@@ -1707,7 +1709,7 @@ order by
 |  |  group by: l_suppkey
 |  |
 |  03:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |     predicates: l_shipdate >= '1996-01-01', l_shipdate < '1996-04-01'
 |
 06:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -1730,7 +1732,7 @@ order by
 |  group by: l_suppkey
 |
 01:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1996-01-01', l_shipdate < '1996-04-01'
    runtime filters: RF000 -> l.l_suppkey
 ====
@@ -1862,7 +1864,7 @@ where
 |  |  group by: l_partkey
 |  |
 |  02:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |
 04:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
@@ -1871,9 +1873,10 @@ where
 |--01:SCAN HDFS [tpch_nested_parquet.part p]
 |     partitions=1/1 files=1 size=6.30MB
 |     predicates: p_container = 'MED BOX', p_brand = 'Brand#23'
+|     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    runtime filters: RF000 -> l.l_partkey, RF001 -> l_partkey
 ---- DISTRIBUTEDPLAN
 12:AGGREGATE [FINALIZE]
@@ -1902,7 +1905,7 @@ where
 |  |  group by: l_partkey
 |  |
 |  02:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |
 04:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_partkey = p_partkey
@@ -1913,9 +1916,10 @@ where
 |  01:SCAN HDFS [tpch_nested_parquet.part p]
 |     partitions=1/1 files=1 size=6.30MB
 |     predicates: p_container = 'MED BOX', p_brand = 'Brand#23'
+|     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    runtime filters: RF000 -> l.l_partkey, RF001 -> l_partkey
 ====
 # TPCH-Q18
@@ -1962,7 +1966,7 @@ limit 100
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
 ---- DISTRIBUTEDPLAN
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1993,7 +1997,7 @@ limit 100
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
 ====
 # TPCH-Q19
@@ -2046,7 +2050,7 @@ where
 |     partitions=1/1 files=1 size=6.30MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
 06:AGGREGATE [FINALIZE]
@@ -2068,7 +2072,7 @@ where
 |     partitions=1/1 files=1 size=6.30MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    runtime filters: RF000 -> l_partkey
 ====
 # TPCH-Q20
@@ -2150,7 +2154,7 @@ order by
 |  group by: l_partkey, l_suppkey
 |
 07:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1994-01-01', l_shipdate < '1995-01-01'
    runtime filters: RF000 -> l.l_suppkey, RF001 -> l.l_partkey
 ---- DISTRIBUTEDPLAN
@@ -2218,7 +2222,7 @@ order by
 |  group by: l_partkey, l_suppkey
 |
 07:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: l_shipdate >= '1994-01-01', l_shipdate < '1995-01-01'
    runtime filters: RF000 -> l.l_suppkey, RF001 -> l.l_partkey
 ====
@@ -2316,7 +2320,7 @@ limit 100
 |  04:UNNEST [c.c_orders o]
 |
 01:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: o_orderstatus = 'F', !empty(o.o_lineitems)
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
@@ -2389,7 +2393,7 @@ limit 100
 |  04:UNNEST [c.c_orders o]
 |
 01:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: !empty(c.c_orders)
    predicates on o: o_orderstatus = 'F', !empty(o.o_lineitems)
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
@@ -2444,7 +2448,7 @@ order by
 |  |  output: avg(c_acctbal)
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.customer c]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |     predicates: c_acctbal > 0.00, substr(c_phone, 1, 2) IN ('13', '31', 
'23', '29', '30', '18', '17')
 |
 01:SUBPLAN
@@ -2456,7 +2460,7 @@ order by
 |  03:UNNEST [c.c_orders]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', 
'17')
 ---- DISTRIBUTEDPLAN
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2489,7 +2493,7 @@ order by
 |  |  output: avg(c_acctbal)
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.customer c]
-|     partitions=1/1 files=4 size=554.13MB
+|     partitions=1/1 files=4 size=577.87MB
 |     predicates: c_acctbal > 0.00, substr(c_phone, 1, 2) IN ('13', '31', 
'23', '29', '30', '18', '17')
 |
 01:SUBPLAN
@@ -2501,6 +2505,6 @@ order by
 |  03:UNNEST [c.c_orders]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=554.13MB
+   partitions=1/1 files=4 size=577.87MB
    predicates: substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', 
'17')
 ====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/union.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/union.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/union.test
index ea10a30..d87c351 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/union.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/union.test
@@ -19,6 +19,7 @@ where b.month = 1
 |
 |--02:SCAN HDFS [functional.alltypes]
 |     partitions=2/24 files=2 size=40.32KB
+|     runtime filters: RF000 -> functional.alltypes.month
 |
 01:SCAN HDFS [functional.alltypes]
    partitions=2/24 files=2 size=40.32KB
@@ -39,6 +40,7 @@ where b.month = 1
 |
 |--02:SCAN HDFS [functional.alltypes]
 |     partitions=2/24 files=2 size=40.32KB
+|     runtime filters: RF000 -> functional.alltypes.month
 |
 01:SCAN HDFS [functional.alltypes]
    partitions=2/24 files=2 size=40.32KB

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/views.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/views.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/views.test
index 0310fe1..9836d90 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/views.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/views.test
@@ -148,6 +148,7 @@ functional.complex_view t3 where t1.id = t2.x and t2.x = 
t3.abc
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
 |     predicates: functional.alltypes.int_col > 1
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -203,6 +204,7 @@ functional.complex_view t3 where t1.id = t2.x and t2.x = 
t3.abc
 |  01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
 |     predicates: functional.alltypes.int_col > 1
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -228,6 +230,7 @@ inner join functional.alltypes_view t3 on (t2.id = t3.id)
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -252,6 +255,7 @@ inner join functional.alltypes_view t3 on (t2.id = t3.id)
 |  |
 |  01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 05:EXCHANGE [HASH(functional.alltypes.id)]
 |
@@ -278,6 +282,7 @@ inner join functional.alltypes_view t3 using(id)
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -302,6 +307,7 @@ inner join functional.alltypes_view t3 using(id)
 |  |
 |  01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 05:EXCHANGE [HASH(functional.alltypes.id)]
 |
@@ -374,6 +380,7 @@ inner join [shuffle] functional.alltypes_view t3 using(id)
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -400,6 +407,7 @@ inner join [shuffle] functional.alltypes_view t3 using(id)
 |  |
 |  01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
+|     runtime filters: RF000 -> functional.alltypes.id
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
index db53e44..639f73c 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
@@ -84,6 +84,7 @@ select * from t1, t2, t3 where t1.x = t2.x and t2.x = t3.x
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -108,6 +109,7 @@ select * from t1, t2, t3 where t1.x = t2.x and t2.x = t3.x
 |  |
 |  01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
@@ -202,6 +204,7 @@ select * from t t1 inner join t t2 on (t1.x = t2.x) inner 
join t t3 on (t2.x = t
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
@@ -226,6 +229,7 @@ select * from t t1 inner join t t2 on (t1.x = t2.x) inner 
join t t3 on (t2.x = t
 |  |
 |  01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 05:EXCHANGE [HASH(int_col)]
 |
@@ -251,6 +255,7 @@ select * from t t1 inner join t t2 using(x) inner join t t3 
using(x)
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
@@ -275,6 +280,7 @@ select * from t t1 inner join t t2 using(x) inner join t t3 
using(x)
 |  |
 |  01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 05:EXCHANGE [HASH(int_col)]
 |
@@ -345,6 +351,7 @@ select * from t t1 inner join [broadcast] t t2 using(x) 
inner join [shuffle] t t
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
@@ -371,6 +378,7 @@ select * from t t1 inner join [broadcast] t t2 using(x) 
inner join [shuffle] t t
 |  |
 |  01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
+|     runtime filters: RF000 -> int_col
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test 
b/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
index 2d32064..83637de 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
@@ -426,3 +426,37 @@ select STRAIGHT_JOIN count(*) from (select * from 
tpch.lineitem a LIMIT 1) a
 row_regex: .*0 of 1 Runtime Filter Published.*
 row_regex: .*Filter 0 \(8.00 KB\).*
 ====
+
+
+---- QUERY
+####################################################
+# Test case 17: Filter with two targers (one local, one remote)
+# In this three-way join the filter produced by the top-level
+# join has both a local and a remote target.
+####################################################
+set RUNTIME_FILTER_WAIT_TIME_MS=15000;
+set RUNTIME_FILTER_MODE=GLOBAL;
+select straight_join count(*)
+from functional.alltypes a join [BROADCAST] functional.alltypessmall c
+    on a.month = c.month join [BROADCAST] functional.alltypesagg b
+    on a.month = b.id where b.int_col < 0;
+---- RESULTS
+0
+====
+
+
+---- QUERY
+####################################################
+# Test case 18: Runtime filter pushed to all union operands
+####################################################
+set RUNTIME_FILTER_WAIT_TIME_MS=15000;
+set RUNTIME_FILTER_MODE=GLOBAL;
+select straight_join count(*)
+from (select month, year from functional.alltypes
+      union all
+      select month, year from functional.alltypes) a
+    join functional.alltypessmall b on a.month = b.month
+where b.int_col = 1;
+---- RESULTS
+14400
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f992dc7f/testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
 
b/testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
index 1f8a5f9..0b40e0a 100644
--- 
a/testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
+++ 
b/testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
@@ -269,3 +269,35 @@ select STRAIGHT_JOIN count(*) from
 row_regex: .*1 of 1 Runtime Filter Published.*
 row_regex: .*Filter 0 \(16.00 MB\).*
 ====
+
+
+---- QUERY
+###################################################
+# Test case 12: filter with both remote and local targets
+###################################################
+
+SET RUNTIME_FILTER_WAIT_TIME_MS=15000;
+SET RUNTIME_FILTER_MODE=GLOBAL;
+select straight_join count(*)
+from functional_parquet.alltypes a join [BROADCAST] 
functional_parquet.alltypessmall c
+    on a.id = c.id join [BROADCAST] functional_parquet.alltypesagg b
+    on a.id = b.id where b.int_col < 100;
+---- RESULTS
+108
+====
+
+
+---- QUERY
+###################################################
+# Test case 13: filter with multiple remote targets
+###################################################
+
+SET RUNTIME_FILTER_WAIT_TIME_MS=15000;
+SET RUNTIME_FILTER_MODE=GLOBAL;
+select straight_join count(*)
+from functional_parquet.alltypes a join [SHUFFLE] 
functional_parquet.alltypessmall c
+    on a.id = c.id join [SHUFFLE] functional_parquet.alltypesagg b
+    on a.id = b.id where b.int_col < 100;
+---- RESULTS
+108
+====


Reply via email to