impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarmstr...@apache.org
Subject [01/16] incubator-impala git commit: IMPALA-4252: Min-max runtime filters for Kudu
Date Sat, 18 Nov 2017 00:31:44 GMT
Repository: incubator-impala
Updated Branches:
  refs/heads/master 3ddafcd29 -> b840137c9


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test
index 1345cab..5bb8828 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test
@@ -93,7 +93,7 @@ PLAN-ROOT SINK
 |
 |--16:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.nation.n_regionkey = tpch.region.r_regionkey
-|  |  runtime filters: RF005 <- tpch.region.r_regionkey
+|  |  runtime filters: RF010 <- tpch.region.r_regionkey
 |  |
 |  |--04:SCAN HDFS [tpch.region]
 |  |     partitions=1/1 files=1 size=384B
@@ -101,19 +101,19 @@ PLAN-ROOT SINK
 |  |
 |  15:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.supplier.s_nationkey = tpch.nation.n_nationkey
-|  |  runtime filters: RF006 <- tpch.nation.n_nationkey
+|  |  runtime filters: RF012 <- tpch.nation.n_nationkey
 |  |
 |  |--03:SCAN HDFS [tpch.nation]
 |  |     partitions=1/1 files=1 size=2.15KB
-|  |     runtime filters: RF005 -> tpch.nation.n_regionkey
+|  |     runtime filters: RF010 -> tpch.nation.n_regionkey
 |  |
 |  14:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.supplier.s_suppkey = tpch.partsupp.ps_suppkey
-|  |  runtime filters: RF007 <- tpch.partsupp.ps_suppkey
+|  |  runtime filters: RF014 <- tpch.partsupp.ps_suppkey
 |  |
 |  |--13:HASH JOIN [INNER JOIN]
 |  |  |  hash predicates: tpch.partsupp.ps_partkey = tpch.part.p_partkey
-|  |  |  runtime filters: RF008 <- tpch.part.p_partkey
+|  |  |  runtime filters: RF016 <- tpch.part.p_partkey
 |  |  |
 |  |  |--00:SCAN HDFS [tpch.part]
 |  |  |     partitions=1/1 files=1 size=22.83MB
@@ -121,11 +121,11 @@ PLAN-ROOT SINK
 |  |  |
 |  |  02:SCAN HDFS [tpch.partsupp]
 |  |     partitions=1/1 files=1 size=112.71MB
-|  |     runtime filters: RF008 -> tpch.partsupp.ps_partkey
+|  |     runtime filters: RF016 -> tpch.partsupp.ps_partkey
 |  |
 |  01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF006 -> tpch.supplier.s_nationkey, RF007 -> tpch.supplier.s_suppkey
+|     runtime filters: RF012 -> tpch.supplier.s_nationkey, RF014 -> tpch.supplier.s_suppkey
 |
 12:AGGREGATE [FINALIZE]
 |  output: min(ps_supplycost)
@@ -133,7 +133,7 @@ PLAN-ROOT SINK
 |
 11:HASH JOIN [INNER JOIN]
 |  hash predicates: n_regionkey = r_regionkey
-|  runtime filters: RF002 <- r_regionkey
+|  runtime filters: RF004 <- r_regionkey
 |
 |--08:SCAN HDFS [tpch.region]
 |     partitions=1/1 files=1 size=384B
@@ -141,23 +141,23 @@ PLAN-ROOT SINK
 |
 10:HASH JOIN [INNER JOIN]
 |  hash predicates: s_nationkey = n_nationkey
-|  runtime filters: RF003 <- n_nationkey
+|  runtime filters: RF006 <- n_nationkey
 |
 |--07:SCAN HDFS [tpch.nation]
 |     partitions=1/1 files=1 size=2.15KB
-|     runtime filters: RF002 -> n_regionkey
+|     runtime filters: RF004 -> n_regionkey
 |
 09:HASH JOIN [INNER JOIN]
 |  hash predicates: ps_suppkey = s_suppkey
-|  runtime filters: RF004 <- s_suppkey
+|  runtime filters: RF008 <- s_suppkey
 |
 |--06:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF003 -> s_nationkey
+|     runtime filters: RF006 -> s_nationkey
 |
 05:SCAN HDFS [tpch.partsupp]
    partitions=1/1 files=1 size=112.71MB
-   runtime filters: RF000 -> tpch.partsupp.ps_partkey, RF004 -> ps_suppkey
+   runtime filters: RF000 -> tpch.partsupp.ps_partkey, RF008 -> ps_suppkey
 ====
 # TPCH-Q3
 # Q3 - Shipping Priority Query
@@ -204,7 +204,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  runtime filters: RF001 <- tpch.orders.o_orderkey
+|  runtime filters: RF002 <- tpch.orders.o_orderkey
 |
 |--01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
@@ -214,7 +214,7 @@ PLAN-ROOT SINK
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
    predicates: tpch.lineitem.l_shipdate > '1995-03-15'
-   runtime filters: RF001 -> tpch.lineitem.l_orderkey
+   runtime filters: RF002 -> tpch.lineitem.l_orderkey
 ====
 # TPCH-Q4
 # Q4 - Order Priority Checking Query
@@ -308,7 +308,7 @@ PLAN-ROOT SINK
 |
 09:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.supplier.s_nationkey = tpch.nation.n_nationkey
-|  runtime filters: RF001 <- tpch.nation.n_nationkey
+|  runtime filters: RF002 <- tpch.nation.n_nationkey
 |
 |--04:SCAN HDFS [tpch.nation]
 |     partitions=1/1 files=1 size=2.15KB
@@ -316,32 +316,32 @@ PLAN-ROOT SINK
 |
 08:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.customer.c_nationkey = tpch.supplier.s_nationkey, tpch.lineitem.l_suppkey = tpch.supplier.s_suppkey
-|  runtime filters: RF002 <- tpch.supplier.s_nationkey, RF003 <- tpch.supplier.s_suppkey
+|  runtime filters: RF004 <- tpch.supplier.s_nationkey, RF005 <- tpch.supplier.s_suppkey
 |
 |--03:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF001 -> tpch.supplier.s_nationkey
+|     runtime filters: RF002 -> tpch.supplier.s_nationkey
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.orders.o_custkey = tpch.customer.c_custkey
-|  runtime filters: RF004 <- tpch.customer.c_custkey
+|  runtime filters: RF008 <- tpch.customer.c_custkey
 |
 |--00:SCAN HDFS [tpch.customer]
 |     partitions=1/1 files=1 size=23.08MB
-|     runtime filters: RF001 -> tpch.customer.c_nationkey, RF002 -> tpch.customer.c_nationkey
+|     runtime filters: RF002 -> tpch.customer.c_nationkey, RF004 -> tpch.customer.c_nationkey
 |
 06:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  runtime filters: RF005 <- tpch.orders.o_orderkey
+|  runtime filters: RF010 <- tpch.orders.o_orderkey
 |
 |--01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
 |     predicates: tpch.orders.o_orderdate < '1995-01-01', tpch.orders.o_orderdate >= '1994-01-01'
-|     runtime filters: RF004 -> tpch.orders.o_custkey
+|     runtime filters: RF008 -> tpch.orders.o_custkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
-   runtime filters: RF003 -> tpch.lineitem.l_suppkey, RF005 -> tpch.lineitem.l_orderkey
+   runtime filters: RF005 -> tpch.lineitem.l_suppkey, RF010 -> tpch.lineitem.l_orderkey
 ====
 # TPCH-Q6
 # Q6 - Forecasting Revenue Change Query
@@ -424,14 +424,14 @@ PLAN-ROOT SINK
 |
 09:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.supplier.s_nationkey = tpch.nation.n_nationkey
-|  runtime filters: RF001 <- tpch.nation.n_nationkey
+|  runtime filters: RF002 <- tpch.nation.n_nationkey
 |
 |--04:SCAN HDFS [tpch.nation]
 |     partitions=1/1 files=1 size=2.15KB
 |
 08:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.orders.o_custkey = tpch.customer.c_custkey
-|  runtime filters: RF002 <- tpch.customer.c_custkey
+|  runtime filters: RF004 <- tpch.customer.c_custkey
 |
 |--03:SCAN HDFS [tpch.customer]
 |     partitions=1/1 files=1 size=23.08MB
@@ -439,24 +439,24 @@ PLAN-ROOT SINK
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_suppkey = tpch.supplier.s_suppkey
-|  runtime filters: RF003 <- tpch.supplier.s_suppkey
+|  runtime filters: RF006 <- tpch.supplier.s_suppkey
 |
 |--00:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF001 -> tpch.supplier.s_nationkey
+|     runtime filters: RF002 -> tpch.supplier.s_nationkey
 |
 06:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  runtime filters: RF004 <- tpch.orders.o_orderkey
+|  runtime filters: RF008 <- tpch.orders.o_orderkey
 |
 |--02:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
-|     runtime filters: RF002 -> tpch.orders.o_custkey
+|     runtime filters: RF004 -> tpch.orders.o_custkey
 |
 01:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
    predicates: tpch.lineitem.l_shipdate <= '1996-12-31', tpch.lineitem.l_shipdate >= '1995-01-01'
-   runtime filters: RF003 -> tpch.lineitem.l_suppkey, RF004 -> tpch.lineitem.l_orderkey
+   runtime filters: RF006 -> tpch.lineitem.l_suppkey, RF008 -> tpch.lineitem.l_orderkey
 ====
 # TPCH-Q8
 # Q8 - National Market Share Query
@@ -516,7 +516,7 @@ PLAN-ROOT SINK
 |
 13:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.nation.n_regionkey = tpch.region.r_regionkey
-|  runtime filters: RF001 <- tpch.region.r_regionkey
+|  runtime filters: RF002 <- tpch.region.r_regionkey
 |
 |--07:SCAN HDFS [tpch.region]
 |     partitions=1/1 files=1 size=384B
@@ -524,19 +524,19 @@ PLAN-ROOT SINK
 |
 12:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.customer.c_nationkey = tpch.nation.n_nationkey
-|  runtime filters: RF002 <- tpch.nation.n_nationkey
+|  runtime filters: RF004 <- tpch.nation.n_nationkey
 |
 |--05:SCAN HDFS [tpch.nation]
 |     partitions=1/1 files=1 size=2.15KB
-|     runtime filters: RF001 -> tpch.nation.n_regionkey
+|     runtime filters: RF002 -> tpch.nation.n_regionkey
 |
 11:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.customer.c_custkey = tpch.orders.o_custkey
-|  runtime filters: RF003 <- tpch.orders.o_custkey
+|  runtime filters: RF006 <- tpch.orders.o_custkey
 |
 |--10:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.lineitem.l_suppkey = tpch.supplier.s_suppkey
-|  |  runtime filters: RF004 <- tpch.supplier.s_suppkey
+|  |  runtime filters: RF008 <- tpch.supplier.s_suppkey
 |  |
 |  |--01:SCAN HDFS [tpch.supplier]
 |  |     partitions=1/1 files=1 size=1.33MB
@@ -544,11 +544,11 @@ PLAN-ROOT SINK
 |  |
 |  09:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.orders.o_orderkey = tpch.lineitem.l_orderkey
-|  |  runtime filters: RF005 <- tpch.lineitem.l_orderkey
+|  |  runtime filters: RF010 <- tpch.lineitem.l_orderkey
 |  |
 |  |--08:HASH JOIN [INNER JOIN]
 |  |  |  hash predicates: tpch.lineitem.l_partkey = tpch.part.p_partkey
-|  |  |  runtime filters: RF006 <- tpch.part.p_partkey
+|  |  |  runtime filters: RF012 <- tpch.part.p_partkey
 |  |  |
 |  |  |--00:SCAN HDFS [tpch.part]
 |  |  |     partitions=1/1 files=1 size=22.83MB
@@ -556,16 +556,16 @@ PLAN-ROOT SINK
 |  |  |
 |  |  02:SCAN HDFS [tpch.lineitem]
 |  |     partitions=1/1 files=1 size=718.94MB
-|  |     runtime filters: RF004 -> tpch.lineitem.l_suppkey, RF006 -> tpch.lineitem.l_partkey
+|  |     runtime filters: RF008 -> tpch.lineitem.l_suppkey, RF012 -> tpch.lineitem.l_partkey
 |  |
 |  03:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
 |     predicates: tpch.orders.o_orderdate <= '1996-12-31', tpch.orders.o_orderdate >= '1995-01-01'
-|     runtime filters: RF005 -> tpch.orders.o_orderkey
+|     runtime filters: RF010 -> tpch.orders.o_orderkey
 |
 04:SCAN HDFS [tpch.customer]
    partitions=1/1 files=1 size=23.08MB
-   runtime filters: RF002 -> tpch.customer.c_nationkey, RF003 -> tpch.customer.c_custkey
+   runtime filters: RF004 -> tpch.customer.c_nationkey, RF006 -> tpch.customer.c_custkey
 ====
 # TPCH-Q9
 # Q9 - Product Type Measure Query
@@ -619,38 +619,38 @@ PLAN-ROOT SINK
 |
 09:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_partkey = tpch.partsupp.ps_partkey, tpch.lineitem.l_suppkey = tpch.partsupp.ps_suppkey
-|  runtime filters: RF001 <- tpch.partsupp.ps_partkey, RF002 <- tpch.partsupp.ps_suppkey
+|  runtime filters: RF002 <- tpch.partsupp.ps_partkey, RF003 <- tpch.partsupp.ps_suppkey
 |
 |--03:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
 |
 08:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_suppkey = tpch.supplier.s_suppkey
-|  runtime filters: RF003 <- tpch.supplier.s_suppkey
+|  runtime filters: RF006 <- tpch.supplier.s_suppkey
 |
 |--01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF000 -> tpch.supplier.s_nationkey, RF002 -> tpch.supplier.s_suppkey
+|     runtime filters: RF000 -> tpch.supplier.s_nationkey, RF003 -> tpch.supplier.s_suppkey
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  runtime filters: RF004 <- tpch.orders.o_orderkey
+|  runtime filters: RF008 <- tpch.orders.o_orderkey
 |
 |--04:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
 |
 06:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_partkey = tpch.part.p_partkey
-|  runtime filters: RF005 <- tpch.part.p_partkey
+|  runtime filters: RF010 <- tpch.part.p_partkey
 |
 |--00:SCAN HDFS [tpch.part]
 |     partitions=1/1 files=1 size=22.83MB
 |     predicates: tpch.part.p_name LIKE '%green%'
-|     runtime filters: RF001 -> tpch.part.p_partkey
+|     runtime filters: RF002 -> tpch.part.p_partkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
-   runtime filters: RF001 -> tpch.lineitem.l_partkey, RF002 -> tpch.lineitem.l_suppkey, RF003 -> tpch.lineitem.l_suppkey, RF004 -> tpch.lineitem.l_orderkey, RF005 -> tpch.lineitem.l_partkey
+   runtime filters: RF002 -> tpch.lineitem.l_partkey, RF003 -> tpch.lineitem.l_suppkey, RF006 -> tpch.lineitem.l_suppkey, RF008 -> tpch.lineitem.l_orderkey, RF010 -> tpch.lineitem.l_partkey
 ====
 # TPCH-Q10
 # Q10 - Returned Item Reporting Query
@@ -706,11 +706,11 @@ PLAN-ROOT SINK
 |
 05:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.customer.c_custkey = tpch.orders.o_custkey
-|  runtime filters: RF001 <- tpch.orders.o_custkey
+|  runtime filters: RF002 <- tpch.orders.o_custkey
 |
 |--04:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  |  runtime filters: RF002 <- tpch.orders.o_orderkey
+|  |  runtime filters: RF004 <- tpch.orders.o_orderkey
 |  |
 |  |--01:SCAN HDFS [tpch.orders]
 |  |     partitions=1/1 files=1 size=162.56MB
@@ -719,11 +719,11 @@ PLAN-ROOT SINK
 |  02:SCAN HDFS [tpch.lineitem]
 |     partitions=1/1 files=1 size=718.94MB
 |     predicates: tpch.lineitem.l_returnflag = 'R'
-|     runtime filters: RF002 -> tpch.lineitem.l_orderkey
+|     runtime filters: RF004 -> tpch.lineitem.l_orderkey
 |
 00:SCAN HDFS [tpch.customer]
    partitions=1/1 files=1 size=23.08MB
-   runtime filters: RF000 -> tpch.customer.c_nationkey, RF001 -> tpch.customer.c_custkey
+   runtime filters: RF000 -> tpch.customer.c_nationkey, RF002 -> tpch.customer.c_custkey
 ====
 # TPCH-Q11
 # Q11 - Important Stock Identification
@@ -774,7 +774,7 @@ PLAN-ROOT SINK
 |  |
 |  10:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.supplier.s_nationkey = tpch.nation.n_nationkey
-|  |  runtime filters: RF002 <- tpch.nation.n_nationkey
+|  |  runtime filters: RF004 <- tpch.nation.n_nationkey
 |  |
 |  |--08:SCAN HDFS [tpch.nation]
 |  |     partitions=1/1 files=1 size=2.15KB
@@ -782,15 +782,15 @@ PLAN-ROOT SINK
 |  |
 |  09:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.partsupp.ps_suppkey = tpch.supplier.s_suppkey
-|  |  runtime filters: RF003 <- tpch.supplier.s_suppkey
+|  |  runtime filters: RF006 <- tpch.supplier.s_suppkey
 |  |
 |  |--07:SCAN HDFS [tpch.supplier]
 |  |     partitions=1/1 files=1 size=1.33MB
-|  |     runtime filters: RF002 -> tpch.supplier.s_nationkey
+|  |     runtime filters: RF004 -> tpch.supplier.s_nationkey
 |  |
 |  06:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
-|     runtime filters: RF003 -> tpch.partsupp.ps_suppkey
+|     runtime filters: RF006 -> tpch.partsupp.ps_suppkey
 |
 05:AGGREGATE [FINALIZE]
 |  output: sum(tpch.partsupp.ps_supplycost * tpch.partsupp.ps_availqty)
@@ -806,7 +806,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.partsupp.ps_suppkey = tpch.supplier.s_suppkey
-|  runtime filters: RF001 <- tpch.supplier.s_suppkey
+|  runtime filters: RF002 <- tpch.supplier.s_suppkey
 |
 |--01:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
@@ -814,7 +814,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [tpch.partsupp]
    partitions=1/1 files=1 size=112.71MB
-   runtime filters: RF001 -> tpch.partsupp.ps_suppkey
+   runtime filters: RF002 -> tpch.partsupp.ps_suppkey
 ====
 # TPCH-Q12
 # Q12 - Shipping Mode and Order Priority Query
@@ -1113,7 +1113,7 @@ PLAN-ROOT SINK
 |
 |--04:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.lineitem.l_partkey = tpch.part.p_partkey
-|  |  runtime filters: RF001 <- tpch.part.p_partkey
+|  |  runtime filters: RF002 <- tpch.part.p_partkey
 |  |
 |  |--01:SCAN HDFS [tpch.part]
 |  |     partitions=1/1 files=1 size=22.83MB
@@ -1121,7 +1121,7 @@ PLAN-ROOT SINK
 |  |
 |  00:SCAN HDFS [tpch.lineitem]
 |     partitions=1/1 files=1 size=718.94MB
-|     runtime filters: RF001 -> tpch.lineitem.l_partkey
+|     runtime filters: RF002 -> tpch.lineitem.l_partkey
 |
 03:AGGREGATE [FINALIZE]
 |  output: avg(tpch.lineitem.l_quantity)
@@ -1191,22 +1191,22 @@ PLAN-ROOT SINK
 |
 06:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.orders.o_custkey = tpch.customer.c_custkey
-|  runtime filters: RF001 <- tpch.customer.c_custkey
+|  runtime filters: RF002 <- tpch.customer.c_custkey
 |
 |--00:SCAN HDFS [tpch.customer]
 |     partitions=1/1 files=1 size=23.08MB
 |
 05:HASH JOIN [INNER JOIN]
 |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  runtime filters: RF002 <- tpch.orders.o_orderkey
+|  runtime filters: RF004 <- tpch.orders.o_orderkey
 |
 |--01:SCAN HDFS [tpch.orders]
 |     partitions=1/1 files=1 size=162.56MB
-|     runtime filters: RF000 -> tpch.orders.o_orderkey, RF001 -> tpch.orders.o_custkey
+|     runtime filters: RF000 -> tpch.orders.o_orderkey, RF002 -> tpch.orders.o_custkey
 |
 02:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
-   runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF002 -> tpch.lineitem.l_orderkey
+   runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF004 -> tpch.lineitem.l_orderkey
 ====
 # TPCH-Q19
 # Q19 - Discounted Revenue Query
@@ -1316,7 +1316,7 @@ PLAN-ROOT SINK
 |
 |--08:HASH JOIN [INNER JOIN]
 |  |  hash predicates: tpch.supplier.s_nationkey = tpch.nation.n_nationkey
-|  |  runtime filters: RF004 <- tpch.nation.n_nationkey
+|  |  runtime filters: RF008 <- tpch.nation.n_nationkey
 |  |
 |  |--01:SCAN HDFS [tpch.nation]
 |  |     partitions=1/1 files=1 size=2.15KB
@@ -1324,16 +1324,16 @@ PLAN-ROOT SINK
 |  |
 |  00:SCAN HDFS [tpch.supplier]
 |     partitions=1/1 files=1 size=1.33MB
-|     runtime filters: RF004 -> tpch.supplier.s_nationkey
+|     runtime filters: RF008 -> tpch.supplier.s_nationkey
 |
 07:HASH JOIN [RIGHT SEMI JOIN]
 |  hash predicates: l_partkey = tpch.partsupp.ps_partkey, l_suppkey = tpch.partsupp.ps_suppkey
 |  other join predicates: tpch.partsupp.ps_availqty > 0.5 * sum(l_quantity)
-|  runtime filters: RF001 <- tpch.partsupp.ps_partkey, RF002 <- tpch.partsupp.ps_suppkey
+|  runtime filters: RF002 <- tpch.partsupp.ps_partkey, RF003 <- tpch.partsupp.ps_suppkey
 |
 |--06:HASH JOIN [LEFT SEMI JOIN]
 |  |  hash predicates: tpch.partsupp.ps_partkey = tpch.part.p_partkey
-|  |  runtime filters: RF003 <- tpch.part.p_partkey
+|  |  runtime filters: RF006 <- tpch.part.p_partkey
 |  |
 |  |--03:SCAN HDFS [tpch.part]
 |  |     partitions=1/1 files=1 size=22.83MB
@@ -1341,7 +1341,7 @@ PLAN-ROOT SINK
 |  |
 |  02:SCAN HDFS [tpch.partsupp]
 |     partitions=1/1 files=1 size=112.71MB
-|     runtime filters: RF000 -> tpch.partsupp.ps_suppkey, RF003 -> tpch.partsupp.ps_partkey
+|     runtime filters: RF000 -> tpch.partsupp.ps_suppkey, RF006 -> tpch.partsupp.ps_partkey
 |
 05:AGGREGATE [FINALIZE]
 |  output: sum(tpch.lineitem.l_quantity)
@@ -1350,7 +1350,7 @@ PLAN-ROOT SINK
 04:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
    predicates: tpch.lineitem.l_shipdate < '1995-01-01', tpch.lineitem.l_shipdate >= '1994-01-01'
-   runtime filters: RF000 -> tpch.lineitem.l_suppkey, RF001 -> tpch.lineitem.l_partkey, RF002 -> tpch.lineitem.l_suppkey
+   runtime filters: RF000 -> tpch.lineitem.l_suppkey, RF002 -> tpch.lineitem.l_partkey, RF003 -> tpch.lineitem.l_suppkey
 ====
 # TPCH-Q21
 # Q21 - Suppliers Who Kept Orders Waiting Query
@@ -1415,7 +1415,7 @@ PLAN-ROOT SINK
 |  |
 |  |--08:HASH JOIN [INNER JOIN]
 |  |  |  hash predicates: tpch.supplier.s_nationkey = n_nationkey
-|  |  |  runtime filters: RF001 <- n_nationkey
+|  |  |  runtime filters: RF002 <- n_nationkey
 |  |  |
 |  |  |--03:SCAN HDFS [tpch.nation]
 |  |  |     partitions=1/1 files=1 size=2.15KB
@@ -1423,15 +1423,15 @@ PLAN-ROOT SINK
 |  |  |
 |  |  07:HASH JOIN [INNER JOIN]
 |  |  |  hash predicates: tpch.lineitem.l_suppkey = tpch.supplier.s_suppkey
-|  |  |  runtime filters: RF002 <- tpch.supplier.s_suppkey
+|  |  |  runtime filters: RF004 <- tpch.supplier.s_suppkey
 |  |  |
 |  |  |--00:SCAN HDFS [tpch.supplier]
 |  |  |     partitions=1/1 files=1 size=1.33MB
-|  |  |     runtime filters: RF001 -> tpch.supplier.s_nationkey
+|  |  |     runtime filters: RF002 -> tpch.supplier.s_nationkey
 |  |  |
 |  |  06:HASH JOIN [INNER JOIN]
 |  |  |  hash predicates: tpch.lineitem.l_orderkey = tpch.orders.o_orderkey
-|  |  |  runtime filters: RF003 <- tpch.orders.o_orderkey
+|  |  |  runtime filters: RF006 <- tpch.orders.o_orderkey
 |  |  |
 |  |  |--02:SCAN HDFS [tpch.orders]
 |  |  |     partitions=1/1 files=1 size=162.56MB
@@ -1440,7 +1440,7 @@ PLAN-ROOT SINK
 |  |  01:SCAN HDFS [tpch.lineitem]
 |  |     partitions=1/1 files=1 size=718.94MB
 |  |     predicates: tpch.lineitem.l_receiptdate > tpch.lineitem.l_commitdate
-|  |     runtime filters: RF002 -> tpch.lineitem.l_suppkey, RF003 -> tpch.lineitem.l_orderkey
+|  |     runtime filters: RF004 -> tpch.lineitem.l_suppkey, RF006 -> tpch.lineitem.l_orderkey
 |  |
 |  04:SCAN HDFS [tpch.lineitem]
 |     partitions=1/1 files=1 size=718.94MB

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/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 03a2df5..4ebfb6b 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/union.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/union.test
@@ -3145,25 +3145,25 @@ PLAN-ROOT SINK
 |
 |--10:HASH JOIN [INNER JOIN]
 |  |  hash predicates: t2.bigint_col = t1.bigint_col
-|  |  runtime filters: RF002 <- t1.bigint_col
+|  |  runtime filters: RF004 <- t1.bigint_col
 |  |
 |  |--08:SCAN HDFS [functional.alltypestiny t1]
 |  |     partitions=4/4 files=4 size=460B
 |  |
 |  09:SCAN HDFS [functional.alltypes t2]
 |     partitions=24/24 files=24 size=478.45KB
-|     runtime filters: RF002 -> t2.bigint_col
+|     runtime filters: RF004 -> t2.bigint_col
 |
 |--07:HASH JOIN [RIGHT OUTER JOIN]
 |  |  hash predicates: t2.bigint_col = t1.bigint_col
-|  |  runtime filters: RF001 <- t1.bigint_col
+|  |  runtime filters: RF002 <- t1.bigint_col
 |  |
 |  |--05:SCAN HDFS [functional.alltypestiny t1]
 |  |     partitions=4/4 files=4 size=460B
 |  |
 |  06:SCAN HDFS [functional.alltypes t2]
 |     partitions=24/24 files=24 size=478.45KB
-|     runtime filters: RF001 -> t2.bigint_col
+|     runtime filters: RF002 -> t2.bigint_col
 |
 |--04:HASH JOIN [RIGHT SEMI JOIN]
 |  |  hash predicates: t2.bigint_col = t1.bigint_col

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/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 a6322e6..5caeab5 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/views.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/views.test
@@ -153,7 +153,7 @@ PLAN-ROOT SINK
 |  |
 |  04:HASH JOIN [INNER JOIN]
 |  |  hash predicates: a.id = b.id
-|  |  runtime filters: RF002 <- b.id
+|  |  runtime filters: RF004 <- b.id
 |  |
 |  |--03:SCAN HDFS [functional.alltypestiny b]
 |  |     partitions=4/4 files=4 size=460B
@@ -161,11 +161,11 @@ PLAN-ROOT SINK
 |  02:SCAN HDFS [functional.alltypesagg a]
 |     partitions=11/11 files=11 size=814.73KB
 |     predicates: a.bigint_col < 50
-|     runtime filters: RF002 -> a.id
+|     runtime filters: RF004 -> a.id
 |
 07:HASH JOIN [INNER JOIN]
 |  hash predicates: functional.alltypes.id = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
@@ -175,7 +175,7 @@ PLAN-ROOT SINK
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
    predicates: functional.alltypes.id > 1
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -207,7 +207,7 @@ PLAN-ROOT SINK
 |  |
 |  04:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash predicates: a.id = b.id
-|  |  runtime filters: RF002 <- b.id
+|  |  runtime filters: RF004 <- b.id
 |  |
 |  |--11:EXCHANGE [BROADCAST]
 |  |  |
@@ -217,11 +217,11 @@ PLAN-ROOT SINK
 |  02:SCAN HDFS [functional.alltypesagg a]
 |     partitions=11/11 files=11 size=814.73KB
 |     predicates: a.bigint_col < 50
-|     runtime filters: RF002 -> a.id
+|     runtime filters: RF004 -> a.id
 |
 07:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: functional.alltypes.id = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--10:EXCHANGE [HASH(int_col)]
 |  |
@@ -235,7 +235,7 @@ PLAN-ROOT SINK
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
    predicates: functional.alltypes.id > 1
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ====
 # Self-join of view to make sure the on clause is properly set
 # in the cloned view instances.
@@ -254,7 +254,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
@@ -262,7 +262,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -279,7 +279,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--06:EXCHANGE [HASH(functional.alltypes.id)]
 |  |
@@ -291,7 +291,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ====
 # Self-join views to make sure the using clause is properly set
 # in the cloned view instances.
@@ -310,7 +310,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
@@ -318,7 +318,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -335,7 +335,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--06:EXCHANGE [HASH(functional.alltypes.id)]
 |  |
@@ -347,7 +347,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ====
 # Self-join of view to make sure the join op is properly set
 # in the cloned view instances.
@@ -416,7 +416,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--01:SCAN HDFS [functional.alltypes]
 |     partitions=24/24 files=24 size=478.45KB
@@ -424,7 +424,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -443,7 +443,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: functional.alltypes.id = functional.alltypes.id
-|  runtime filters: RF001 <- functional.alltypes.id
+|  runtime filters: RF002 <- functional.alltypes.id
 |
 |--05:EXCHANGE [BROADCAST]
 |  |
@@ -453,7 +453,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.id, RF001 -> functional.alltypes.id
+   runtime filters: RF000 -> functional.alltypes.id, RF002 -> functional.alltypes.id
 ====
 # Tests that parentheses are preserved when creating a view
 # enabling proper partition pruning for this particular view.

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/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 69105c7..0a966c4 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/with-clause.test
@@ -98,7 +98,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
@@ -106,7 +106,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypes.int_col, RF002 -> int_col
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -123,7 +123,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--05:EXCHANGE [BROADCAST]
 |  |
@@ -133,7 +133,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypes]
    partitions=24/24 files=24 size=478.45KB
-   runtime filters: RF000 -> functional.alltypes.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypes.int_col, RF002 -> int_col
 ====
 # Multiple dependent views in with-clause
 with t1 as (
@@ -226,7 +226,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
@@ -234,7 +234,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -251,7 +251,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--06:EXCHANGE [HASH(int_col)]
 |  |
@@ -263,7 +263,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ====
 # Self-join of with-clause table to make sure the using clause is properly set
 # in the cloned inline-view instances.
@@ -281,7 +281,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
@@ -289,7 +289,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -306,7 +306,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--06:EXCHANGE [HASH(int_col)]
 |  |
@@ -318,7 +318,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ====
 # Self-join of with-clause table to make sure the join op is properly set
 # in the cloned inline-view instances.
@@ -385,7 +385,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--01:SCAN HDFS [functional.alltypestiny]
 |     partitions=4/4 files=4 size=460B
@@ -393,7 +393,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -412,7 +412,7 @@ PLAN-ROOT SINK
 |
 03:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: int_col = int_col
-|  runtime filters: RF001 <- int_col
+|  runtime filters: RF002 <- int_col
 |
 |--05:EXCHANGE [BROADCAST]
 |  |
@@ -422,7 +422,7 @@ PLAN-ROOT SINK
 |
 00:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
-   runtime filters: RF000 -> functional.alltypestiny.int_col, RF001 -> int_col
+   runtime filters: RF000 -> functional.alltypestiny.int_col, RF002 -> int_col
 ====
 # Multiple with clauses. One for the UnionStmt and one for each union operand.
 with t1 as (values('a', 'b'))

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/bloom_filters.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/bloom_filters.test b/testdata/workloads/functional-query/queries/QueryTest/bloom_filters.test
new file mode 100644
index 0000000..ace4596
--- /dev/null
+++ b/testdata/workloads/functional-query/queries/QueryTest/bloom_filters.test
@@ -0,0 +1,126 @@
+====
+---- QUERY
+####################################################
+# Test case 1: bloom filters with high expected FP rate get disabled.
+# To trigger this path, we have to trick the planner into estimating a too-small
+# build-side cardinality, which will cause the BF size to be estimated low (and therefore
+# the FP rate to be high). We do this by using predicates that are completely unselective,
+# but which the planner thinks have relatively high selectivity.
+# Kudu doesn't support bloom filters, so it just doesn't filter anything.
+####################################################
+
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_MAX_SIZE=4K;
+select STRAIGHT_JOIN count(*) from alltypes a
+    join [BROADCAST]
+    # Build-side needs to be sufficiently large to trigger FP check.
+    (select id, int_col from alltypes UNION ALL select id, int_col from alltypes) b
+        on a.id = b.id
+        # Predicates that are always true (but planner thinks are selective)
+        where (b.id - b.id) < 1 AND (b.int_col - b.int_col) < 1;
+---- RESULTS
+14600
+---- RUNTIME_PROFILE
+row_regex: .*0 of 1 Runtime Filter Published, 1 Disabled.*
+row_regex: .*Rows rejected: 0 .*
+====
+
+
+---- QUERY
+####################################################
+# Test case 2: Filter sizes change according to their NDV
+####################################################
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MIN_SIZE=4KB;
+with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
+select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
+    join (select * from l LIMIT 1) b on a.l_orderkey = -b.l_orderkey;
+---- RESULTS
+0
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(4.00 KB\).*
+====
+---- QUERY
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MIN_SIZE=4KB;
+with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
+select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
+    join (select * from l LIMIT 500000) b on a.l_orderkey = -b.l_orderkey;
+---- RESULTS
+0
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(256.00 KB\).*
+====
+---- QUERY
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MIN_SIZE=4KB;
+with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
+select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
+    join (select * from l LIMIT 1000000) b on a.l_orderkey = -b.l_orderkey;
+---- RESULTS
+0
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(512.00 KB\).*
+====
+---- QUERY
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MIN_SIZE=4KB;
+with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
+select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
+    join (select * from l LIMIT 2000000) b on a.l_orderkey = -b.l_orderkey;
+---- RESULTS
+0
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(1.00 MB\).*
+====
+
+
+
+---- QUERY
+####################################################
+# Test case 3: Filter sizes respect query options
+####################################################
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MIN_SIZE=8KB;
+SET RUNTIME_FILTER_MAX_SIZE=8KB;
+# This query would produce a 4KB filter without setting the minimum size.
+select STRAIGHT_JOIN count(*) from alltypes a join [SHUFFLE] alltypes b on a.id = b.id;
+---- RESULTS
+7300
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(8.00 KB\).*
+====
+---- QUERY
+# Check that filter sizes are rounded up to power-of-two
+SET RUNTIME_FILTER_MIN_SIZE=6000B;
+SET RUNTIME_FILTER_MAX_SIZE=6000B;
+select STRAIGHT_JOIN count(*) from alltypes a join [SHUFFLE] alltypes b on a.id = b.id;
+---- RESULTS
+7300
+---- RUNTIME_PROFILE
+row_regex: .*1 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(8.00 KB\).*
+====
+---- QUERY
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+SET RUNTIME_FILTER_MAX_SIZE=8192;
+# Query would produce a 512KB filter without setting the max
+with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
+select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
+    join (select * from l LIMIT 1000000) b on a.l_orderkey = -b.l_orderkey;
+---- RUNTIME_PROFILE
+row_regex: .*0 of 1 Runtime Filter Published.*
+row_regex: .*Filter 0 \(8.00 KB\).*
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/bloom_filters_wait.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/bloom_filters_wait.test b/testdata/workloads/functional-query/queries/QueryTest/bloom_filters_wait.test
new file mode 100644
index 0000000..1ed6668
--- /dev/null
+++ b/testdata/workloads/functional-query/queries/QueryTest/bloom_filters_wait.test
@@ -0,0 +1,22 @@
+====
+---- QUERY
+####################################################
+# Regression test for IMPALA-3141: Disabled filters should send dummy filters
+# to unblock waiters.
+####################################################
+
+SET RUNTIME_FILTER_WAIT_TIME_MS=600000;
+SET RUNTIME_FILTER_MODE=GLOBAL;
+SET RUNTIME_FILTER_MAX_SIZE=4096;
+select STRAIGHT_JOIN count(*) from alltypes a
+    join [BROADCAST]
+    # Build-side needs to be sufficiently large to trigger FP check.
+    (select id, int_col from alltypes UNION ALL select id, int_col from alltypes) b
+        on a.id = b.id
+        # Predicates that are always true (but planner thinks are selective)
+        where (b.id - b.id) < 1 AND (b.int_col - b.int_col) < 1;
+---- RESULTS
+14600
+---- RUNTIME_PROFILE
+row_regex: .*0 of 1 Runtime Filter Published, 1 Disabled.*
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test b/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
index 1ade744..4c48ba4 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
@@ -22,7 +22,7 @@ from tpch.lineitem join tpch.orders on l_orderkey = o_orderkey;
 '02:HASH JOIN [INNER JOIN, BROADCAST]'
 '|  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=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB'
 '|  tuple-ids=0,1 row-size=454B cardinality=5757710'
 '|'
@@ -42,7 +42,7 @@ row_regex:.*partitions=1/1 files=1 size=.*
 '|'
 '00:SCAN HDFS [tpch.lineitem, RANDOM]'
 row_regex:.*partitions=1/1 files=1 size=.*
-'   runtime filters: RF000 -> l_orderkey'
+'   runtime filters: RF000[bloom] -> l_orderkey'
 '   stats-rows=6001215 extrapolated-rows=disabled'
 '   table stats: rows=6001215 size=718.94MB'
 '   column stats: all'

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test b/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
index 80c0d8f..b0b6595 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
@@ -24,7 +24,7 @@ from tpch.lineitem join tpch.orders on l_orderkey = o_orderkey;
 '  02:HASH JOIN [INNER JOIN, BROADCAST]'
 '  |  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=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB'
 '  |  tuple-ids=0,1 row-size=454B cardinality=5757710'
 '  |'
@@ -34,7 +34,7 @@ from tpch.lineitem join tpch.orders on l_orderkey = o_orderkey;
 '  |'
 '  00:SCAN HDFS [tpch.lineitem, RANDOM]'
 row_regex:.*partitions=1/1 files=1 size=.*
-'     runtime filters: RF000 -> l_orderkey'
+'     runtime filters: RF000[bloom] -> l_orderkey'
 '     stats-rows=6001215 extrapolated-rows=disabled'
 '     table stats: rows=6001215 size=718.94MB'
 '     column stats: all'

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test b/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test
new file mode 100644
index 0000000..c87cc74
--- /dev/null
+++ b/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test
@@ -0,0 +1,121 @@
+====
+---- QUERY
+####################################################
+# Test case 1: Min-max filters of all possible types.
+####################################################
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.bool_col = (b.bool_col && !b.bool_col)
+---- RESULTS
+29200
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.tinyint_col = b.tinyint_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.smallint_col = b.smallint_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.int_col = b.int_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.bigint_col = b.bigint_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.float_col = b.float_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.double_col = b.double_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.string_col = b.string_col
+---- RESULTS
+5840
+====
+---- QUERY
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] alltypestiny b
+where a.timestamp_col = b.timestamp_col
+---- RESULTS
+8
+====
+
+---- QUERY
+####################################################
+# Test case 2: Min-max filters on a primary key/partition column
+####################################################
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN a.id, a.tinyint_col, b.id, b.tinyint_col
+from alltypes a join [BROADCAST] alltypestiny b
+where a.id = b.tinyint_col * 2;
+---- RESULTS: VERIFY_IS_EQUAL_SORTED
+0,0,4,0
+0,0,2,0
+0,0,0,0
+0,0,6,0
+2,2,3,1
+2,2,7,1
+2,2,5,1
+2,2,1,1
+----TYPES
+INT,TINYINT,INT,TINYINT
+====
+
+
+---- QUERY
+####################################################
+# Test case 3: Target expr has an implicit integer cast
+####################################################
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*)
+from alltypes a join [BROADCAST] alltypes b
+where a.tinyint_col = b.int_col and b.int_col in (0, 1)
+---- RESULTS
+1065800
+====
+---- QUERY
+# The min/max values in the filter are both above the range of the target col so all rows
+# are filtered.
+SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
+select STRAIGHT_JOIN count(*)
+from alltypes a join [BROADCAST] alltypes b
+where a.tinyint_col = b.int_col + 10000
+---- RESULTS
+0
+====
+---- QUERY
+# The min/max values in the filter are below/above the range for the target col,
+# respectively, so no rows are filtered.
+select STRAIGHT_JOIN count(*)
+from alltypes a join [BROADCAST]
+  (values (min_int() x), (max_int()), (0)) v
+where a.tinyint_col = v.x
+---- RESULTS
+730
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/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 1bc9b12..e883cb4 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/runtime_filters.test
@@ -18,6 +18,7 @@ row_regex: .*RowsRead: 2.43K .*
 ====
 ---- QUERY
 # Now turn on local filtering: we expect to see a reduction in scan volume.
+# TODO: improve the Kudu profile output once KUDU-2162 is fixed.
 SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
 SET RUNTIME_FILTER_MODE=LOCAL;
 select STRAIGHT_JOIN count(*) from alltypes p join [BROADCAST] alltypestiny b
@@ -26,6 +27,8 @@ on p.month = b.int_col and b.month = 1 and b.string_col = "1"
 620
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 7 \(7\).*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 206 .*
 ====
 
 
@@ -57,6 +60,8 @@ on p.month = b.int_col and b.month = 1 and b.string_col = "1"
 620
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 7 \(7\).*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 206 .*
 ====
 
 
@@ -81,6 +86,8 @@ select STRAIGHT_JOIN count(*) from alltypes a
 0
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 0 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 2.43K .*
 ====
 ---- QUERY
 # Global mode. Scan of 'b' will receive highly effective filter, and will propagate that
@@ -95,6 +102,9 @@ select STRAIGHT_JOIN count(*) from alltypes a
 0
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 8 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 0 .*
+row_regex: .*ScanRangesComplete: 0 .*
 ====
 
 
@@ -103,6 +113,7 @@ row_regex: .*Files rejected: 8 .*
 # Test case 4: complex filter expressions. The join predicate matches nothing, but
 # isn't simplified by the planner before execution.
 # With local filtering, expect 0 rows, as all are rejected by partition pruning.
+# For Kudu, the target is not a single column, so no filters will be created.
 ####################################################
 
 SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
@@ -115,6 +126,8 @@ select STRAIGHT_JOIN count(*) from alltypes a
 ---- RUNTIME_PROFILE
 row_regex: .*RowsRead: 0 .*
 row_regex: .*Files rejected: 8 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 2.43K .*
 ====
 
 
@@ -146,6 +159,9 @@ select STRAIGHT_JOIN count(*) from alltypes a
 ---- RUNTIME_PROFILE
 row_regex: .*FiltersReceived: 0 .*
 row_regex: .*Files rejected: 8 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*FiltersReceived: 0 .*
+row_regex: .*RowsRead: 0 .*
 ====
 
 
@@ -183,6 +199,7 @@ row_regex: .*FiltersReceived: 3 .*
 ####################################################
 # Test case 7: filters with target exprs bound by > 1 slotref.
 # Expect all but one partition to be filtered out by join expr.
+# For Kudu, the target is not a single column, so no filters will be created.
 ####################################################
 
 SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
@@ -194,6 +211,8 @@ select STRAIGHT_JOIN count(*) from alltypes a
 2480
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 7 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 2.43K .*
 ====
 
 
@@ -229,6 +248,8 @@ select STRAIGHT_JOIN count(*) from alltypes a
 8
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 8 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 0 .*
 ====
 
 ---- QUERY
@@ -248,40 +269,16 @@ row_regex: .*RowsReturned: 2.43K .*
 ====
 
 
----- QUERY
-####################################################
-# Test case 11: filters with high expected FP rate get disabled.
-# To trigger this path, we have to trick the planner into estimating a too-small
-# build-side cardinality, which will cause the BF size to be estimated low (and therefore
-# the FP rate to be high). We do this by using predicates that are completely unselective,
-# but which the planner thinks have relatively high selectivity.
-####################################################
-
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_MAX_SIZE=4K;
-select STRAIGHT_JOIN count(*) from alltypes a
-    join [BROADCAST]
-    # Build-side needs to be sufficiently large to trigger FP check.
-    (select id, int_col from alltypes UNION ALL select id, int_col from alltypes) b
-        on a.id = b.id
-        # Predicates that are always true (but planner thinks are selective)
-        where (b.id - b.id) < 1 AND (b.int_col - b.int_col) < 1;
----- RESULTS
-14600
----- RUNTIME_PROFILE
-row_regex: .*0 of 1 Runtime Filter Published, 1 Disabled.*
-row_regex: .*Rows rejected: 0 .*
-====
 
 
 ---- QUERY
 ####################################################
-# Test case 12: join predicates with NULL values.
+# Test case 11: join predicates with NULL values.
 # Build-side selects one row from alltypes agg where day IS NULL, and joins with all rows
 # in probe side with day IS NULL.
 # Expect with filtering that 1K rows are returned, with an average of 333 per scan node
 # per fragment instance, and three files rejected per scan.
+# For Kudu, 'IS NOT DISTINCT' is not supported for runtime filters.
 ####################################################
 
 SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
@@ -294,12 +291,14 @@ select STRAIGHT_JOIN count(*) from alltypesagg a
 1000
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 3 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 3.67K .*
 ====
 
 
 ---- QUERY
 ####################################################
-# Test case 13: coordinator fragment produces filters
+# Test case 12: coordinator fragment produces filters
 # In this esoteric query plan, the coordinator fragment has a hash
 # join in its root, which produces filters for the scan of t1.
 ####################################################
@@ -307,18 +306,20 @@ row_regex: .*Files rejected: 3 .*
 set RUNTIME_FILTER_WAIT_TIME_MS=30000;
 set RUNTIME_FILTER_MODE=GLOBAL;
 with t1 as (select month x, bigint_col y from alltypes limit 7300),
-     t2 as (select int_col x, bigint_col y from alltypestiny limit 2)
+     t2 as (select distinct int_col x, bigint_col y from alltypestiny limit 2)
      select count(*) from t1, t2 where t1.x = t2.x
 ---- RESULTS
 620
 ---- RUNTIME_PROFILE
 row_regex: .*Files rejected: 7 .*
+---- RUNTIME_PROFILE: table_format=kudu
+row_regex: .*RowsRead: 206 .*
 ====
 
 
 ---- QUERY
 ####################################################
-# Test case 14: When NUM_NODES=1, all filters should be local.
+# Test case 13: When NUM_NODES=1, all filters should be local.
 # Regression test for IMPALA-3245.
 ####################################################
 set NUM_NODES=1;
@@ -332,105 +333,7 @@ select STRAIGHT_JOIN count(a.id) from alltypes a
 
 ---- QUERY
 ####################################################
-# Test case 15: Filter sizes change according to their NDV
-####################################################
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MIN_SIZE=4KB;
-with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
-select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
-    join (select * from l LIMIT 1) b on a.l_orderkey = -b.l_orderkey;
----- RESULTS
-0
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(4.00 KB\).*
-====
----- QUERY
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MIN_SIZE=4KB;
-with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
-select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
-    join (select * from l LIMIT 500000) b on a.l_orderkey = -b.l_orderkey;
----- RESULTS
-0
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(256.00 KB\).*
-====
----- QUERY
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MIN_SIZE=4KB;
-with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
-select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
-    join (select * from l LIMIT 1000000) b on a.l_orderkey = -b.l_orderkey;
----- RESULTS
-0
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(512.00 KB\).*
-====
----- QUERY
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MIN_SIZE=4KB;
-with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
-select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
-    join (select * from l LIMIT 2000000) b on a.l_orderkey = -b.l_orderkey;
----- RESULTS
-0
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(1.00 MB\).*
-====
-
-
----- QUERY
-####################################################
-# Test case 16: Filter sizes respect query options
-####################################################
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MIN_SIZE=8KB;
-SET RUNTIME_FILTER_MAX_SIZE=8KB;
-# This query would produce a 4KB filter without setting the minimum size.
-select STRAIGHT_JOIN count(*) from alltypes a join [SHUFFLE] alltypes b on a.id = b.id;
----- RESULTS
-7300
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(8.00 KB\).*
-====
----- QUERY
-# Check that filter sizes are rounded up to power-of-two
-SET RUNTIME_FILTER_MIN_SIZE=6000B;
-SET RUNTIME_FILTER_MAX_SIZE=6000B;
-select STRAIGHT_JOIN count(*) from alltypes a join [SHUFFLE] alltypes b on a.id = b.id;
----- RESULTS
-7300
----- RUNTIME_PROFILE
-row_regex: .*1 of 1 Runtime Filter Published.*
-row_regex: .*Filter 0 \(8.00 KB\).*
-====
----- QUERY
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_WAIT_TIME_MS=30000;
-SET RUNTIME_FILTER_MAX_SIZE=8192;
-# Query would produce a 512KB filter without setting the max
-with l as (select * from tpch.lineitem UNION ALL select * from tpch.lineitem)
-select STRAIGHT_JOIN count(*) from (select * from tpch.lineitem a LIMIT 1) a
-    join (select * from l LIMIT 1000000) b on a.l_orderkey = -b.l_orderkey;
----- RUNTIME_PROFILE
-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)
+# Test case 14: 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.
 ####################################################
@@ -447,7 +350,7 @@ from alltypes a join [BROADCAST] alltypessmall c
 
 ---- QUERY
 ####################################################
-# Test case 18: Runtime filter pushed to all union operands
+# Test case 15: Runtime filter pushed to all union operands
 ####################################################
 set RUNTIME_FILTER_WAIT_TIME_MS=30000;
 set RUNTIME_FILTER_MODE=GLOBAL;
@@ -460,3 +363,19 @@ where b.int_col = 1;
 ---- RESULTS
 14400
 ====
+
+
+---- QUERY
+####################################################
+# Test case 16: Both HDFS and Kudu targets results in both bloom and min-max filters
+# being generated
+####################################################
+set RUNTIME_FILTER_WAIT_TIME_MS=30000;
+set RUNTIME_FILTER_MODE=GLOBAL;
+select straight_join count(*)
+from functional_parquet.alltypes a join [BROADCAST] functional_kudu.alltypes b
+    join [BROADCAST] functional_parquet.alltypes c
+where a.int_col = b.int_col and a.int_col = c.smallint_col * 2 and c.id < 100
+---- RESULTS
+26645000
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters_wait.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters_wait.test b/testdata/workloads/functional-query/queries/QueryTest/runtime_filters_wait.test
index 4743f3e..73ea1ae 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/runtime_filters_wait.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/runtime_filters_wait.test
@@ -14,26 +14,3 @@ on p.month = b.int_col and b.month = 1 and b.string_col = "1"
 ---- RESULTS
 620
 ====
-
-
----- QUERY
-####################################################
-# Regression test for IMPALA-3141: Disabled filters should send dummy filters
-# to unblock waiters.
-####################################################
-
-SET RUNTIME_FILTER_WAIT_TIME_MS=600000;
-SET RUNTIME_FILTER_MODE=GLOBAL;
-SET RUNTIME_FILTER_MAX_SIZE=4096;
-select STRAIGHT_JOIN count(*) from alltypes a
-    join [BROADCAST]
-    # Build-side needs to be sufficiently large to trigger FP check.
-    (select id, int_col from alltypes UNION ALL select id, int_col from alltypes) b
-        on a.id = b.id
-        # Predicates that are always true (but planner thinks are selective)
-        where (b.id - b.id) < 1 AND (b.int_col - b.int_col) < 1;
----- RESULTS
-14600
----- RUNTIME_PROFILE
-row_regex: .*0 of 1 Runtime Filter Published, 1 Disabled.*
-====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/testdata/workloads/targeted-perf/queries/primitive_min_max_runtime_filter.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/targeted-perf/queries/primitive_min_max_runtime_filter.test b/testdata/workloads/targeted-perf/queries/primitive_min_max_runtime_filter.test
new file mode 100644
index 0000000..ddfbc3d
--- /dev/null
+++ b/testdata/workloads/targeted-perf/queries/primitive_min_max_runtime_filter.test
@@ -0,0 +1,9 @@
+====
+---- QUERY: primitive_min_max_runtime_filter
+-- Description: a query that results in a highly selective min-max runtime filter. Will
+-- only see a perf improvement on Kudu as min-max filters are not implemented for other
+-- scanners yet.
+select count(*)
+from lineitem a, lineitem b
+where a.l_orderkey = b.l_orderkey * 2 and b.l_orderkey = 5
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/tests/common/impala_test_suite.py
----------------------------------------------------------------------
diff --git a/tests/common/impala_test_suite.py b/tests/common/impala_test_suite.py
index 1581e9b..b35e054 100644
--- a/tests/common/impala_test_suite.py
+++ b/tests/common/impala_test_suite.py
@@ -431,7 +431,13 @@ class ImpalaTestSuite(BaseTestSuite):
         test_section['RESULTS'] = test_section['RESULTS'] \
             .replace(NAMENODE, '$NAMENODE') \
             .replace('$IMPALA_HOME', IMPALA_HOME)
-      if 'RUNTIME_PROFILE' in test_section:
+      if 'RUNTIME_PROFILE_%s' % table_format_info.file_format in test_section:
+        # If this table format has a RUNTIME_PROFILE section specifically for it, evaluate
+        # that section and ignore any general RUNTIME_PROFILE sections.
+        verify_runtime_profile(
+            test_section['RUNTIME_PROFILE_%s' % table_format_info.file_format],
+            result.runtime_profile)
+      elif 'RUNTIME_PROFILE' in test_section:
         verify_runtime_profile(test_section['RUNTIME_PROFILE'], result.runtime_profile)
 
       if 'DML_RESULTS' in test_section:

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/tests/query_test/test_kudu.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_kudu.py b/tests/query_test/test_kudu.py
index 27ee757..f8a761a 100644
--- a/tests/query_test/test_kudu.py
+++ b/tests/query_test/test_kudu.py
@@ -663,6 +663,12 @@ class TestCreateExternalTable(KuduTestSuite):
       assert cursor.fetchall() == [(4, )]
       cursor.execute("select * from %s order by kEY" % (table_name))
       assert cursor.fetchall() == [(1, ), (4, ), (5, )]
+
+      # Do a join with a runtime filter targeting the column.
+      cursor.execute("select count(*) from %s a, %s b where a.key = b.key" %
+          (table_name, table_name))
+      assert cursor.fetchall() == [(3, )]
+
       cursor.execute("alter table %s add range partition 11 < values < 20" % table_name)
 
       new_key = "KEY2"

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/tests/query_test/test_runtime_filters.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_runtime_filters.py b/tests/query_test/test_runtime_filters.py
index 049560f..4d64d36 100644
--- a/tests/query_test/test_runtime_filters.py
+++ b/tests/query_test/test_runtime_filters.py
@@ -35,9 +35,9 @@ class TestRuntimeFilters(ImpalaTestSuite):
   @classmethod
   def add_test_dimensions(cls):
     super(TestRuntimeFilters, cls).add_test_dimensions()
-    # Runtime filters are disabled on HBase, Kudu
+    # Runtime filters are disabled on HBase
     cls.ImpalaTestMatrix.add_constraint(
-      lambda v: v.get_value('table_format').file_format not in ['hbase', 'kudu'])
+        lambda v: v.get_value('table_format').file_format not in ['hbase'])
 
   def test_basic_filters(self, vector):
     self.run_test_case('QueryTest/runtime_filters', vector)
@@ -49,9 +49,11 @@ class TestRuntimeFilters(ImpalaTestSuite):
     self.run_test_case('QueryTest/runtime_filters_wait', vector)
     duration = time.time() - now
     assert duration < WAIT_TIME_MS, \
-      "Query took too long (%ss, possibly waiting for missing filters?)" % str(duration)
+        "Query took too long (%ss, possibly waiting for missing filters?)" % str(duration)
 
   def test_file_filtering(self, vector):
+    if 'kudu' in str(vector.get_value('table_format')):
+      return
     self.change_database(self.client, vector.get_value('table_format'))
     self.execute_query("SET RUNTIME_FILTER_MODE=GLOBAL")
     self.execute_query("SET RUNTIME_FILTER_WAIT_TIME_MS=10000")
@@ -62,6 +64,93 @@ class TestRuntimeFilters(ImpalaTestSuite):
     assert re.search("Splits rejected: [^0] \([^0]\)", result.runtime_profile) is None
 
 @SkipIfLocal.multiple_impalad
+class TestBloomFilters(ImpalaTestSuite):
+  @classmethod
+  def get_workload(cls):
+    return 'functional-query'
+
+  @classmethod
+  def add_test_dimensions(cls):
+    super(TestBloomFilters, cls).add_test_dimensions()
+    # Bloom filters are disabled on HBase, Kudu
+    cls.ImpalaTestMatrix.add_constraint(
+        lambda v: v.get_value('table_format').file_format not in ['hbase', 'kudu'])
+
+  def test_bloom_filters(self, vector):
+    self.run_test_case('QueryTest/bloom_filters', vector)
+
+  def test_bloom_wait_time(self, vector):
+    """Test that a query that has global filters does not wait for them if run in LOCAL
+    mode"""
+    now = time.time()
+    self.run_test_case('QueryTest/bloom_filters_wait', vector)
+    duration = time.time() - now
+    assert duration < 60, \
+        "Query took too long (%ss, possibly waiting for missing filters?)" % str(duration)
+
+
+@SkipIfLocal.multiple_impalad
+class TestMinMaxFilters(ImpalaTestSuite):
+  @classmethod
+  def get_workload(cls):
+    return 'functional-query'
+
+  @classmethod
+  def add_test_dimensions(cls):
+    super(TestMinMaxFilters, cls).add_test_dimensions()
+    # Min-max filters are only implemented for Kudu.
+    cls.ImpalaTestMatrix.add_constraint(
+        lambda v: v.get_value('table_format').file_format in ['kudu'])
+
+  def test_min_max_filters(self, vector):
+    self.run_test_case('QueryTest/min_max_filters', vector)
+
+  def test_large_strings(self, cursor, unique_database):
+    """Tests that truncation of large strings by min-max filters still gives correct
+    results"""
+    table1 = "%s.min_max_filter_large_strings1" % unique_database
+    cursor.execute(
+        "create table %s (string_col string primary key) stored as kudu" % table1)
+    # Min-max bounds are truncated at 1024 characters, so construct some strings that are
+    # longer than that, as well as some that are very close to the min/max bounds.
+    matching_vals =\
+        ('b' * 1100, 'b' * 1099 + 'c', 'd' * 1100, 'f'* 1099 + 'e', 'f' * 1100)
+    cursor.execute("insert into %s values ('%s'), ('%s'), ('%s'), ('%s'), ('%s')"
+        % ((table1,) + matching_vals))
+    non_matching_vals = ('b' * 1099 + 'a', 'c', 'f' * 1099 + 'g')
+    cursor.execute("insert into %s values ('%s'), ('%s'), ('%s')"
+        % ((table1,) + non_matching_vals))
+
+    table2 = "%s.min_max_filter_large_strings2" % unique_database
+    cursor.execute(
+        "create table %s (string_col string primary key) stored as kudu" % table2)
+    cursor.execute("insert into %s values ('%s'), ('%s'), ('%s'), ('%s'), ('%s')"
+        % ((table2,) + matching_vals))
+
+    cursor.execute("select count(*) from %s a, %s b where a.string_col = b.string_col"
+        % (table1, table2))
+    assert cursor.fetchall() == [(len(matching_vals),)]
+
+    # Insert a string that will have the max char (255) trailing after truncation, to
+    # test the path where adding 1 to the max bound after trunc overflows.
+    max_trail_str = "concat(repeat('h', 1000), repeat(chr(255), 50))"
+    cursor.execute("insert into %s values (%s)" % (table1, max_trail_str))
+    cursor.execute("insert into %s values (%s)" % (table2, max_trail_str))
+    cursor.execute("select count(*) from %s a, %s b where a.string_col = b.string_col"
+        % (table1, table2))
+    assert cursor.fetchall() == [(len(matching_vals) + 1,)]
+
+    # Insert a string that is entirely the max char to test the path where the max can't
+    # have 1 added to it after truncation and the filter is disabled.
+    all_max_str = "repeat(chr(255), 1030)"
+    cursor.execute("insert into %s values (%s)" % (table1, all_max_str))
+    cursor.execute("insert into %s values (%s)" % (table2, all_max_str))
+    cursor.execute("select count(*) from %s a, %s b where a.string_col = b.string_col"
+        % (table1, table2))
+    assert cursor.fetchall() == [(len(matching_vals) + 2,)]
+
+
+@SkipIfLocal.multiple_impalad
 class TestRuntimeRowFilters(ImpalaTestSuite):
   @classmethod
   def get_workload(cls):

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/2510fe0a/tests/util/test_file_parser.py
----------------------------------------------------------------------
diff --git a/tests/util/test_file_parser.py b/tests/util/test_file_parser.py
index 89149ab..9fa8d70 100644
--- a/tests/util/test_file_parser.py
+++ b/tests/util/test_file_parser.py
@@ -242,6 +242,23 @@ def parse_test_file_text(text, valid_section_names, skip_unknown_sections=True):
         parsed_sections['DML_RESULTS_TABLE'] = subsection_comment
         parsed_sections['VERIFIER'] = 'VERIFY_IS_EQUAL_SORTED'
 
+      # The RUNTIME_PROFILE section is used to specify lines of text that should be
+      # present in the query runtime profile. It takes an option comment containing a
+      # table format. RUNTIME_PROFILE secions with a comment are only evaluated for the
+      # specified format. If there is a RUNTIME_PROFILE section without a comment, it is
+      # evaluated for all formats that don't have a commented section for this query.
+      if subsection_name == 'RUNTIME_PROFILE':
+        if subsection_comment is not None and subsection_comment is not "":
+          allowed_formats = ['kudu']
+          if not subsection_comment.startswith("table_format="):
+            raise RuntimeError, 'RUNTIME_PROFILE comment (%s) must be of the form ' \
+              '"table_format=FORMAT"' % subsection_comment
+          table_format = subsection_comment[13:]
+          if table_format not in allowed_formats:
+            raise RuntimeError, 'RUNTIME_PROFILE table format (%s) must be in: %s' % \
+                (table_format, allowed_formats)
+          subsection_name = 'RUNTIME_PROFILE_%s' % table_format
+
       parsed_sections[subsection_name] = subsection_str
 
     if parsed_sections:


Mime
View raw message