You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/04/28 23:41:54 UTC

[03/15] impala git commit: IMPALA-6679, IMPALA-6678: reduce scan reservation

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test b/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
index 6cc4c7c..5b3b426 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
@@ -5,7 +5,7 @@ where 5 + 5 < c_custkey and o_orderkey = (2 + 2)
   and (coalesce(2, 3, 4) * 10) + l_linenumber < (0 * 1)
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=264.00MB mem-reservation=24.00MB
+|  Per-Host Resources: mem-estimate=264.00MB mem-reservation=16.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -46,20 +46,20 @@ PLAN-ROOT SINK
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: c_custkey > 10, !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderkey = 4
    predicates on o_lineitems: 20 + l_linenumber < 0
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates: c_custkey > 10
    parquet statistics predicates on o: o_orderkey = 4
    parquet dictionary predicates: c_custkey > 10
    parquet dictionary predicates on o: o_orderkey = 4
    parquet dictionary predicates on o_lineitems: 20 + l_linenumber < 0
-   mem-estimate=264.00MB mem-reservation=24.00MB
+   mem-estimate=264.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=24B cardinality=15000
 ====
 # Test HBase scan node.
@@ -124,7 +124,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=20B cardinality=7300
 ====
@@ -155,7 +155,7 @@ PLAN-ROOT SINK
 |       table: rows=7300 size=478.45KB
 |       partitions: 24/24 rows=7300
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=310
 |     parquet dictionary predicates: CAST(b.double_col AS DECIMAL(3,2)) > 11.1
 |     mem-estimate=128.00MB mem-reservation=32.00KB
 |     tuple-ids=1 row-size=20B cardinality=730
@@ -166,7 +166,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=8B cardinality=7300
 ====
@@ -196,7 +196,7 @@ PLAN-ROOT SINK
 |       table: rows=7300 size=478.45KB
 |       partitions: 24/24 rows=7300
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=310
 |     parquet dictionary predicates: CAST(b.double_col AS DECIMAL(3,2)) > 11.1
 |     mem-estimate=128.00MB mem-reservation=32.00KB
 |     tuple-ids=1 row-size=20B cardinality=730
@@ -207,7 +207,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=8B cardinality=7300
 ====
@@ -241,7 +241,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=20B cardinality=7300
 ====
@@ -273,7 +273,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=4B cardinality=7300
 ====
@@ -308,7 +308,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=29B cardinality=7300
 ====
@@ -332,7 +332,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=8B cardinality=7300
 ====
@@ -358,7 +358,7 @@ WRITE TO HDFS [functional.alltypes, OVERWRITE=false, PARTITION-KEYS=(CAST(3 + ye
      table: rows=100 size=6.32KB
      partitions: 4/4 rows=100
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=25
    mem-estimate=32.00MB mem-reservation=8.00KB
    tuple-ids=0 row-size=16B cardinality=100
 ====
@@ -386,7 +386,7 @@ PLAN-ROOT SINK
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    limit: 2
    mem-estimate=128.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=4B cardinality=2

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test b/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
index c70ae6f..d3abe16 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
@@ -56,7 +56,7 @@ PLAN-ROOT SINK
 |  output: sum_init_zero(functional_parquet.alltypes.parquet-stats: num_rows)
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=189.70KB
+   partitions=24/24 files=24 size=188.29KB
 ====
 # > 3000 rows returned to coordinator: codegen should be enabled
 select * from functional_parquet.alltypes
@@ -71,7 +71,7 @@ PLAN-ROOT SINK
 01:EXCHANGE [UNPARTITIONED]
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=189.70KB
+   partitions=24/24 files=24 size=188.29KB
 ====
 # Optimisation is enabled for join producing < 3000 rows
 select count(*)

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test b/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
index 55439d6..29896c7 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
@@ -22,19 +22,19 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     parquet dictionary predicates: c_salutation = 'Mrs.'
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=255B cardinality=16667
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_customer_sk
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -63,18 +63,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     parquet dictionary predicates: c_salutation = 'Mrs.'
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=255B cardinality=16667
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -103,19 +103,19 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     parquet dictionary predicates: c_salutation = 'Mrs.'
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=255B cardinality=16667
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_customer_sk
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -143,19 +143,19 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=287514 size=31.19MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=287514
 |     parquet dictionary predicates: sr_return_quantity < 10
 |     mem-estimate=80.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=88B cardinality=28751
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_item_sk, RF001[bloom] -> ss_ticket_number
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -181,18 +181,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=719384 size=140.07MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=657377
 |     mem-estimate=160.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=144B cardinality=719384
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_sold_time_sk
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -220,7 +220,7 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=73049 size=9.84MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=73049
 |     parquet dictionary predicates: a.d_holiday = 'Y'
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=0 row-size=303B cardinality=36525
@@ -231,7 +231,7 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=73049 size=9.84MB
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=73049
    mem-estimate=48.00MB mem-reservation=8.00MB
    tuple-ids=1 row-size=303B cardinality=73049
 ====
@@ -262,7 +262,7 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=2 row-size=4B cardinality=100000
 |
@@ -278,7 +278,7 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=73049 size=9.84MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=73049
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=4 row-size=4B cardinality=73049
 |
@@ -302,19 +302,19 @@ PLAN-ROOT SINK
 |  |     stored statistics:
 |  |       table: rows=73049 size=9.84MB
 |  |       columns: all
-|  |     extrapolated-rows=disabled
+|  |     extrapolated-rows=disabled max-scan-range-rows=73049
 |  |     parquet dictionary predicates: d1.d_fy_week_seq = 1000
 |  |     mem-estimate=48.00MB mem-reservation=8.00MB
 |  |     tuple-ids=3 row-size=8B cardinality=7
 |  |
 |  00:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF000[bloom] -> ss_addr_sk, RF008[bloom] -> ss_sold_date_sk
 |     stored statistics:
-|       table: rows=2880404 size=326.32MB
+|       table: rows=2880404 size=346.60MB
 |       partitions: 1824/1824 rows=2880404
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=83798
 |     mem-estimate=128.00MB mem-reservation=8.00MB
 |     tuple-ids=0 row-size=24B cardinality=2880404
 |
@@ -324,7 +324,7 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=287514 size=31.19MB
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=287514
    mem-estimate=80.00MB mem-reservation=8.00MB
    tuple-ids=1 row-size=20B cardinality=287514
 ====
@@ -350,18 +350,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=255B cardinality=100000
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_customer_sk % 10
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====
@@ -388,18 +388,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=unavailable size=8.58MB
 |       columns: unavailable
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=unavailable
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=4B cardinality=unavailable
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_customer_sk
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=4B cardinality=2880404
 ====
@@ -425,18 +425,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=100000 size=12.60MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=4B cardinality=100000
 |
 00:SCAN HDFS [tpcds_seq_snap.store_sales]
-   partitions=1824/1824 files=1824 size=207.85MB
+   partitions=1824/1824 files=1824 size=212.80MB
    runtime filters: RF000[bloom] -> ss_customer_sk
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/1824 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=4B cardinality=unavailable
 ====
@@ -469,18 +469,18 @@ PLAN-ROOT SINK
 |     stored statistics:
 |       table: rows=719384 size=140.07MB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=657377
 |     mem-estimate=160.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=4B cardinality=719384
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000[bloom] -> ss_sold_time_sk
    stored statistics:
-     table: rows=2880404 size=326.32MB
+     table: rows=2880404 size=346.60MB
      partitions: 1824/1824 rows=2880404
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=83798
    mem-estimate=128.00MB mem-reservation=8.00MB
    tuple-ids=0 row-size=100B cardinality=2880404
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
index 1df9270..6bc22c9 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
@@ -32,11 +32,11 @@ Per-Host Resources: mem-estimate=41.94MB mem-reservation=33.94MB runtime-filters
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=16.00MB mem-reservation=32.00KB
 |  01:SCAN HDFS [tpch_parquet.nation, RANDOM]
-|     partitions=1/1 files=1 size=2.74KB
+|     partitions=1/1 files=1 size=2.75KB
 |     stored statistics:
-|       table: rows=25 size=2.74KB
+|       table: rows=25 size=2.75KB
 |       columns: all
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=25
 |     mem-estimate=16.00MB mem-reservation=32.00KB
 |     tuple-ids=1 row-size=117B cardinality=25
 |
@@ -46,7 +46,7 @@ Per-Host Resources: mem-estimate=41.94MB mem-reservation=33.94MB runtime-filters
    stored statistics:
      table: rows=150000 size=12.31MB
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=150000
    mem-estimate=24.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=238B cardinality=150000
 ====
@@ -56,8 +56,8 @@ select straight_join *
 from tpch_parquet.lineitem
     left join tpch_parquet.orders on l_orderkey = o_orderkey
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=166.00MB
-Per-Host Resource Estimates: Memory=428.41MB
+Max Per-Host Resource Reservation: Memory=110.00MB
+Per-Host Resource Estimates: Memory=420.41MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B
@@ -69,7 +69,7 @@ PLAN-ROOT SINK
 |  tuple-ids=0,1N row-size=454B cardinality=6001215
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=380.41MB mem-reservation=118.00MB
+Per-Host Resources: mem-estimate=380.41MB mem-reservation=86.00MB
 02:HASH JOIN [LEFT OUTER JOIN, BROADCAST]
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
@@ -81,23 +81,23 @@ Per-Host Resources: mem-estimate=380.41MB mem-reservation=118.00MB
 |  |  tuple-ids=1 row-size=191B cardinality=1500000
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
-|  Per-Host Resources: mem-estimate=48.00MB mem-reservation=48.00MB
+|  Per-Host Resources: mem-estimate=40.00MB mem-reservation=24.00MB
 |  01:SCAN HDFS [tpch_parquet.orders, RANDOM]
 |     partitions=1/1 files=2 size=54.07MB
 |     stored statistics:
 |       table: rows=1500000 size=54.07MB
 |       columns: all
-|     extrapolated-rows=disabled
-|     mem-estimate=48.00MB mem-reservation=48.00MB
+|     extrapolated-rows=disabled max-scan-range-rows=1177135
+|     mem-estimate=40.00MB mem-reservation=24.00MB
 |     tuple-ids=1 row-size=191B cardinality=1500000
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
-   partitions=1/1 files=3 size=193.72MB
+   partitions=1/1 files=3 size=193.71MB
    stored statistics:
-     table: rows=6001215 size=193.72MB
+     table: rows=6001215 size=193.71MB
      columns: all
-   extrapolated-rows=disabled
-   mem-estimate=80.00MB mem-reservation=72.00MB
+   extrapolated-rows=disabled max-scan-range-rows=2141802
+   mem-estimate=80.00MB mem-reservation=40.00MB
    tuple-ids=0 row-size=263B cardinality=6001215
 ====
 # Null-aware anti-join with medium build side.
@@ -105,7 +105,7 @@ Per-Host Resources: mem-estimate=380.41MB mem-reservation=118.00MB
 select * from tpch_parquet.lineitem
 where l_orderkey not in (select o_orderkey from tpch_parquet.orders)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=114.00MB
+Max Per-Host Resource Reservation: Memory=78.00MB
 Per-Host Resource Estimates: Memory=154.00MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -118,7 +118,7 @@ PLAN-ROOT SINK
 |  tuple-ids=0 row-size=263B cardinality=6001215
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=114.00MB mem-reservation=106.00MB
+Per-Host Resources: mem-estimate=114.00MB mem-reservation=74.00MB
 02:HASH JOIN [NULL AWARE LEFT ANTI JOIN, BROADCAST]
 |  hash predicates: l_orderkey = o_orderkey
 |  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=1.00MB
@@ -129,23 +129,23 @@ Per-Host Resources: mem-estimate=114.00MB mem-reservation=106.00MB
 |  |  tuple-ids=1 row-size=8B cardinality=1500000
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
-|  Per-Host Resources: mem-estimate=40.00MB mem-reservation=8.00MB
+|  Per-Host Resources: mem-estimate=40.00MB mem-reservation=4.00MB
 |  01:SCAN HDFS [tpch_parquet.orders, RANDOM]
 |     partitions=1/1 files=2 size=54.07MB
 |     stored statistics:
 |       table: rows=1500000 size=54.07MB
 |       columns: all
-|     extrapolated-rows=disabled
-|     mem-estimate=40.00MB mem-reservation=8.00MB
+|     extrapolated-rows=disabled max-scan-range-rows=1177135
+|     mem-estimate=40.00MB mem-reservation=4.00MB
 |     tuple-ids=1 row-size=8B cardinality=1500000
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
-   partitions=1/1 files=3 size=193.72MB
+   partitions=1/1 files=3 size=193.71MB
    stored statistics:
-     table: rows=6001215 size=193.72MB
+     table: rows=6001215 size=193.71MB
      columns: all
-   extrapolated-rows=disabled
-   mem-estimate=80.00MB mem-reservation=72.00MB
+   extrapolated-rows=disabled max-scan-range-rows=2141802
+   mem-estimate=80.00MB mem-reservation=40.00MB
    tuple-ids=0 row-size=263B cardinality=6001215
 ====
 # Mid NDV aggregation.
@@ -156,7 +156,7 @@ from tpch_parquet.lineitem
 group by 1, 2
 having count(*) = 1
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=137.00MB
+Max Per-Host Resource Reservation: Memory=125.00MB
 Per-Host Resource Estimates: Memory=253.12MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -201,14 +201,14 @@ Per-Host Resources: mem-estimate=86.12MB mem-reservation=66.00MB runtime-filters
 |  |  tuple-ids=1 row-size=25B cardinality=1500000
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
-|  Per-Host Resources: mem-estimate=40.00MB mem-reservation=16.00MB
+|  Per-Host Resources: mem-estimate=40.00MB mem-reservation=8.00MB
 |  01:SCAN HDFS [tpch_parquet.orders, RANDOM]
 |     partitions=1/1 files=2 size=54.07MB
 |     stored statistics:
 |       table: rows=1500000 size=54.07MB
 |       columns: all
-|     extrapolated-rows=disabled
-|     mem-estimate=40.00MB mem-reservation=16.00MB
+|     extrapolated-rows=disabled max-scan-range-rows=1177135
+|     mem-estimate=40.00MB mem-reservation=8.00MB
 |     tuple-ids=1 row-size=25B cardinality=1500000
 |
 04:EXCHANGE [HASH(l_orderkey)]
@@ -216,15 +216,15 @@ Per-Host Resources: mem-estimate=86.12MB mem-reservation=66.00MB runtime-filters
 |  tuple-ids=0 row-size=8B cardinality=6001215
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=81.00MB mem-reservation=9.00MB runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=81.00MB mem-reservation=5.00MB runtime-filters-memory=1.00MB
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
-   partitions=1/1 files=3 size=193.72MB
+   partitions=1/1 files=3 size=193.71MB
    runtime filters: RF000[bloom] -> l_orderkey
    stored statistics:
-     table: rows=6001215 size=193.72MB
+     table: rows=6001215 size=193.71MB
      columns: all
-   extrapolated-rows=disabled
-   mem-estimate=80.00MB mem-reservation=8.00MB
+   extrapolated-rows=disabled max-scan-range-rows=2141802
+   mem-estimate=80.00MB mem-reservation=4.00MB
    tuple-ids=0 row-size=8B cardinality=6001215
 ====
 # High NDV aggregation.
@@ -232,7 +232,7 @@ Per-Host Resources: mem-estimate=81.00MB mem-reservation=9.00MB runtime-filters-
 select distinct *
 from tpch_parquet.lineitem
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=152.00MB
+Max Per-Host Resource Reservation: Memory=120.00MB
 Per-Host Resource Estimates: Memory=3.31GB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -256,19 +256,19 @@ Per-Host Resources: mem-estimate=1.62GB mem-reservation=46.00MB
 |  tuple-ids=1 row-size=263B cardinality=6001215
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=1.69GB mem-reservation=106.00MB
+Per-Host Resources: mem-estimate=1.69GB mem-reservation=74.00MB
 01:AGGREGATE [STREAMING]
 |  group by: tpch_parquet.lineitem.l_orderkey, tpch_parquet.lineitem.l_partkey, tpch_parquet.lineitem.l_suppkey, tpch_parquet.lineitem.l_linenumber, tpch_parquet.lineitem.l_quantity, tpch_parquet.lineitem.l_extendedprice, tpch_parquet.lineitem.l_discount, tpch_parquet.lineitem.l_tax, tpch_parquet.lineitem.l_returnflag, tpch_parquet.lineitem.l_linestatus, tpch_parquet.lineitem.l_shipdate, tpch_parquet.lineitem.l_commitdate, tpch_parquet.lineitem.l_receiptdate, tpch_parquet.lineitem.l_shipinstruct, tpch_parquet.lineitem.l_shipmode, tpch_parquet.lineitem.l_comment
 |  mem-estimate=1.62GB mem-reservation=34.00MB spill-buffer=2.00MB
 |  tuple-ids=1 row-size=263B cardinality=6001215
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
-   partitions=1/1 files=3 size=193.72MB
+   partitions=1/1 files=3 size=193.71MB
    stored statistics:
-     table: rows=6001215 size=193.72MB
+     table: rows=6001215 size=193.71MB
      columns: all
-   extrapolated-rows=disabled
-   mem-estimate=80.00MB mem-reservation=72.00MB
+   extrapolated-rows=disabled max-scan-range-rows=2141802
+   mem-estimate=80.00MB mem-reservation=40.00MB
    tuple-ids=0 row-size=263B cardinality=6001215
 ====
 # High NDV aggregation with string aggregation function.
@@ -277,7 +277,7 @@ select l_orderkey, l_partkey, group_concat(l_linestatus, ",")
 from tpch_parquet.lineitem
 group by 1, 2
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=106.00MB
+Max Per-Host Resource Reservation: Memory=98.00MB
 Per-Host Resource Estimates: Memory=482.91MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -302,7 +302,7 @@ Per-Host Resources: mem-estimate=201.46MB mem-reservation=48.00MB
 |  tuple-ids=1 row-size=32B cardinality=6001215
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=281.46MB mem-reservation=58.00MB
+Per-Host Resources: mem-estimate=281.46MB mem-reservation=50.00MB
 01:AGGREGATE [STREAMING]
 |  output: group_concat(l_linestatus, ',')
 |  group by: l_orderkey, l_partkey
@@ -310,12 +310,12 @@ Per-Host Resources: mem-estimate=281.46MB mem-reservation=58.00MB
 |  tuple-ids=1 row-size=32B cardinality=6001215
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
-   partitions=1/1 files=3 size=193.72MB
+   partitions=1/1 files=3 size=193.71MB
    stored statistics:
-     table: rows=6001215 size=193.72MB
+     table: rows=6001215 size=193.71MB
      columns: all
-   extrapolated-rows=disabled
-   mem-estimate=80.00MB mem-reservation=24.00MB
+   extrapolated-rows=disabled max-scan-range-rows=2141802
+   mem-estimate=80.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=33B cardinality=6001215
 ====
 # Sort + Analytic.
@@ -361,7 +361,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=32.00KB
      table: rows=7300 size=478.45KB
      partitions: 24/24 rows=7300
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=16.00MB mem-reservation=32.00KB
    tuple-ids=0 row-size=5B cardinality=7300
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test b/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test
index 2806355..b5a0e42 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/min-max-runtime-filters.test
@@ -127,13 +127,13 @@ PLAN-ROOT SINK
 |  tuple-ids=0,1 row-size=8B cardinality=7300
 |
 |--01:SCAN HDFS [functional_parquet.alltypes b]
-|     partitions=24/24 files=24 size=189.70KB
+|     partitions=24/24 files=24 size=188.29KB
 |     runtime filters: RF000[bloom] -> b.int_col
 |     stored statistics:
 |       table: rows=unavailable size=unavailable
 |       partitions: 0/24 rows=unavailable
 |       columns: unavailable
-|     extrapolated-rows=disabled
+|     extrapolated-rows=disabled max-scan-range-rows=unavailable
 |     mem-estimate=16.00MB mem-reservation=16.00KB
 |     tuple-ids=1 row-size=4B cardinality=unavailable
 |

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test b/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
index b741019..f5ee389 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
@@ -56,13 +56,13 @@ PLAN-ROOT SINK
 |  tuple-ids=1 row-size=16B cardinality=unavailable
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: id < 10
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: id < 10
    parquet dictionary predicates: id < 10
    mem-estimate=16.00MB mem-reservation=24.00KB
@@ -105,13 +105,13 @@ Per-Host Resources: mem-estimate=432.00MB mem-reservation=102.07MB
 |  tuple-ids=1 row-size=16B cardinality=unavailable
 |
 00:SCAN HDFS [functional_parquet.alltypes, RANDOM]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: id < 10
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: id < 10
    parquet dictionary predicates: id < 10
    mem-estimate=16.00MB mem-reservation=24.00KB
@@ -141,13 +141,13 @@ PLAN-ROOT SINK
 |  tuple-ids=4 row-size=8B cardinality=unavailable
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: id < 10
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: id < 10
    parquet dictionary predicates: id < 10
    mem-estimate=16.00MB mem-reservation=16.00KB
@@ -184,13 +184,13 @@ Per-Host Resources: mem-estimate=30.00MB mem-reservation=30.00MB
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=9
 Per-Host Resources: mem-estimate=48.00MB mem-reservation=48.00KB
 00:SCAN HDFS [functional_parquet.alltypes, RANDOM]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: id < 10
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: id < 10
    parquet dictionary predicates: id < 10
    mem-estimate=16.00MB mem-reservation=16.00KB
@@ -243,14 +243,14 @@ PLAN-ROOT SINK
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: c_custkey < 10, !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderkey < 5
    predicates on o_lineitems: l_linenumber < 3
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates: c_custkey < 10
    parquet statistics predicates on o: o_orderkey < 5
    parquet statistics predicates on o_lineitems: l_linenumber < 3
@@ -308,14 +308,14 @@ Per-Host Resources: mem-estimate=264.00MB mem-reservation=264.00MB
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: c_custkey < 10, !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderkey < 5
    predicates on o_lineitems: l_linenumber < 3
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates: c_custkey < 10
    parquet statistics predicates on o: o_orderkey < 5
    parquet statistics predicates on o_lineitems: l_linenumber < 3
@@ -331,7 +331,7 @@ from tpch_nested_parquet.customer c, c.c_orders o1, c.c_orders o2
 where o1.o_orderkey = o2.o_orderkey + 2 and o1.o_orderkey < 5
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=89.94MB mem-reservation=81.94MB
+|  Per-Host Resources: mem-estimate=89.94MB mem-reservation=17.94MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -365,16 +365,16 @@ PLAN-ROOT SINK
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(c.c_orders), !empty(c.c_orders)
    predicates on o1: o1.o_orderkey < 5
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders, c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates on o1: o1.o_orderkey < 5
    parquet dictionary predicates on o1: o1.o_orderkey < 5
-   mem-estimate=88.00MB mem-reservation=80.00MB
+   mem-estimate=88.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=270B cardinality=150000
 ---- PARALLELPLANS
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -387,7 +387,7 @@ PLAN-ROOT SINK
 |  tuple-ids=1,0,2 row-size=286B cardinality=1500000
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=9
-Per-Host Resources: mem-estimate=269.81MB mem-reservation=245.81MB
+Per-Host Resources: mem-estimate=269.81MB mem-reservation=53.81MB
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B
 |  tuple-ids=1,0,2 row-size=286B cardinality=1500000
@@ -418,15 +418,15 @@ Per-Host Resources: mem-estimate=269.81MB mem-reservation=245.81MB
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(c.c_orders), !empty(c.c_orders)
    predicates on o1: o1.o_orderkey < 5
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders, c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates on o1: o1.o_orderkey < 5
    parquet dictionary predicates on o1: o1.o_orderkey < 5
-   mem-estimate=88.00MB mem-reservation=80.00MB
+   mem-estimate=88.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=270B cardinality=150000
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
index 3e812c6..7b63843 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
@@ -18,13 +18,13 @@ PLAN-ROOT SINK
 |  tuple-ids=1 row-size=8B cardinality=1
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: int_col IS NULL, int_col > 1, int_col > tinyint_col, int_col * rand() > 50
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: int_col > 1
    parquet dictionary predicates: int_col > 1
    mem-estimate=32.00MB mem-reservation=16.00KB
@@ -50,13 +50,13 @@ PLAN-ROOT SINK
 |  tuple-ids=1 row-size=8B cardinality=1
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=22/24 files=22 size=159.69KB
+   partitions=22/24 files=22 size=172.28KB
    predicates: bool_col, bigint_col < 5000, double_col > 100.00, float_col > 50.00, id = 1, tinyint_col < 50, string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (1, 2, 3, 4, 5), mod(int_col, 2) = 1, timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = 1, date_string_col > '1993-10-01'
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/22 rows=unavailable
      columns missing stats: id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates: bigint_col < 5000, double_col > 100.00, float_col > 50.00, id = 1, tinyint_col < 50, string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (1, 2, 3, 4, 5), date_string_col > '1993-10-01'
    parquet dictionary predicates: bool_col, bigint_col < 5000, double_col > 100.00, float_col > 50.00, id = 1, tinyint_col < 50, string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (1, 2, 3, 4, 5), mod(int_col, 2) = 1, timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = 1, date_string_col > '1993-10-01'
    mem-estimate=128.00MB mem-reservation=88.00KB
@@ -83,13 +83,13 @@ PLAN-ROOT SINK
 |  tuple-ids=1 row-size=8B cardinality=1
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=174.39KB
+   partitions=24/24 files=24 size=188.29KB
    predicates: id IN (int_col), id NOT IN (0, 1, 2), string_col IN ('aaaa', 'bbbb', 'cccc', NULL), mod(int_col, 50) IN (0, 1)
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet dictionary predicates: id NOT IN (0, 1, 2), string_col IN ('aaaa', 'bbbb', 'cccc', NULL), mod(int_col, 50) IN (0, 1)
    mem-estimate=48.00MB mem-reservation=24.00KB
    tuple-ids=0 row-size=24B cardinality=unavailable
@@ -101,7 +101,7 @@ select id from functional_parquet.complextypestbl c, c.nested_struct.c.d cn, cn.
 where a.item.e < -10;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=32.00MB mem-reservation=16.00KB
+|  Per-Host Resources: mem-estimate=48.00MB mem-reservation=24.00KB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -149,10 +149,10 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=unavailable size=unavailable
      columns missing stats: id
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet statistics predicates on a: a.item.e < -10
    parquet dictionary predicates on a: a.item.e < -10
-   mem-estimate=32.00MB mem-reservation=16.00KB
+   mem-estimate=48.00MB mem-reservation=24.00KB
    tuple-ids=0 row-size=24B cardinality=unavailable
 ====
 # Test collection types where the lower collection in the path is optional
@@ -164,7 +164,7 @@ left outer join cn.item a
 where a.item.e < -10;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=32.00MB mem-reservation=16.00KB
+|  Per-Host Resources: mem-estimate=48.00MB mem-reservation=24.00KB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -212,8 +212,8 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=unavailable size=unavailable
      columns missing stats: id
-   extrapolated-rows=disabled
-   mem-estimate=32.00MB mem-reservation=16.00KB
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
+   mem-estimate=48.00MB mem-reservation=24.00KB
    tuple-ids=0 row-size=24B cardinality=unavailable
 ====
 # Tests collection types where the outer is optional (outer join descent)
@@ -223,7 +223,7 @@ select id from functional_parquet.complextypestbl c
 left outer join c.nested_struct.c.d cn, cn.item a where a.item.e < -10;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=32.00MB mem-reservation=16.00KB
+|  Per-Host Resources: mem-estimate=48.00MB mem-reservation=24.00KB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -269,8 +269,8 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=unavailable size=unavailable
      columns missing stats: id
-   extrapolated-rows=disabled
-   mem-estimate=32.00MB mem-reservation=16.00KB
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
+   mem-estimate=48.00MB mem-reservation=24.00KB
    tuple-ids=0 row-size=24B cardinality=unavailable
 ====
 # Test collections so that each level has a filter applied.
@@ -278,7 +278,7 @@ select c_custkey from tpch_nested_parquet.customer c, c.c_orders o,
 o.o_lineitems l where c_custkey > 0 and o.o_orderkey > 0 and l.l_partkey > 0;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=264.00MB mem-reservation=24.00MB
+|  Per-Host Resources: mem-estimate=264.00MB mem-reservation=16.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -319,21 +319,21 @@ PLAN-ROOT SINK
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: c_custkey > 0, !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o.o_orderkey > 0
    predicates on l: l.l_partkey > 0
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates: c_custkey > 0
    parquet statistics predicates on o: o.o_orderkey > 0
    parquet statistics predicates on l: l.l_partkey > 0
    parquet dictionary predicates: c_custkey > 0
    parquet dictionary predicates on o: o.o_orderkey > 0
    parquet dictionary predicates on l: l.l_partkey > 0
-   mem-estimate=264.00MB mem-reservation=24.00MB
+   mem-estimate=264.00MB mem-reservation=16.00MB
    tuple-ids=0 row-size=24B cardinality=15000
 ====
 # Test collections in a way that would incorrectly apply a min-max
@@ -375,7 +375,7 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=unavailable size=unavailable
      columns: unavailable
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=8.00KB
    tuple-ids=0 row-size=16B cardinality=unavailable
 ====
@@ -388,7 +388,7 @@ l.l_receiptdate = '1994-08-24' and l.l_shipmode = 'RAIL' and l.l_returnflag = 'R
 l.l_comment is null;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=616.00MB mem-reservation=56.00MB
+|  Per-Host Resources: mem-estimate=616.00MB mem-reservation=32.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B
 |
@@ -429,16 +429,16 @@ PLAN-ROOT SINK
 |     tuple-ids=1 row-size=0B cardinality=10
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems)
    predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R', l.l_comment IS NULL
    stored statistics:
-     table: rows=150000 size=292.36MB
+     table: rows=150000 size=288.98MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R'
    parquet dictionary predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R'
-   mem-estimate=616.00MB mem-reservation=56.00MB
+   mem-estimate=616.00MB mem-reservation=32.00MB
    tuple-ids=0 row-size=50B cardinality=150000
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/418c7057/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test b/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
index 5cbba7b..7cfb72d 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
@@ -14,7 +14,7 @@ PLAN-ROOT SINK
      table: rows=1 size=2B
      partitions: 1/1 rows=1
      columns: all
-   extrapolated-rows=disabled
+   extrapolated-rows=disabled max-scan-range-rows=1
    mem-estimate=32.00MB mem-reservation=8.00KB
    tuple-ids=0 row-size=20B cardinality=1
 ====