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/08/07 17:18:20 UTC

[1/5] impala git commit: IMPALA-7354: planner test resource estimates for more workloads

Repository: impala
Updated Branches:
  refs/heads/master df3f16584 -> b8222003f


http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
index 1aaabce..e06d87a 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
@@ -22,6 +22,8 @@ order by
   l_returnflag,
   l_linestatus
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=66.00MB Threads=2
+Per-Host Resource Estimates: Memory=744MB
 PLAN-ROOT SINK
 |
 02:SORT
@@ -32,9 +34,11 @@ PLAN-ROOT SINK
 |  group by: l_returnflag, l_linestatus
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate <= '1998-09-02'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=112.00MB Threads=4
+Per-Host Resource Estimates: Memory=886MB
 PLAN-ROOT SINK
 |
 05:MERGING-EXCHANGE [UNPARTITIONED]
@@ -54,7 +58,7 @@ PLAN-ROOT SINK
 |  group by: l_returnflag, l_linestatus
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate <= '1998-09-02'
 ====
 # TPCH-Q2
@@ -100,6 +104,8 @@ order by
   p_partkey
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=76.84MB Threads=6
+Per-Host Resource Estimates: Memory=865MB
 PLAN-ROOT SINK
 |
 26:TOP-N [LIMIT=100]
@@ -126,7 +132,7 @@ PLAN-ROOT SINK
 |  |  |  19:UNNEST [r.r_nations n]
 |  |  |
 |  |  16:SCAN HDFS [tpch_nested_parquet.region r]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |  |
 |  12:SUBPLAN
@@ -138,7 +144,7 @@ PLAN-ROOT SINK
 |  |  14:UNNEST [s.s_partsupps ps]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF008 -> s_nationkey
 |
@@ -155,14 +161,14 @@ PLAN-ROOT SINK
 |  |  09:UNNEST [r.r_nations n]
 |  |
 |  06:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |
 23:HASH JOIN [INNER JOIN]
 |  hash predicates: ps_partkey = p_partkey
 |
 |--05:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size = 15, p_type LIKE '%BRASS'
 |     runtime filters: RF000 -> p_partkey
 |
@@ -175,10 +181,12 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: !empty(s.s_partsupps)
    runtime filters: RF004 -> s_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=114.73MB Threads=12
+Per-Host Resource Estimates: Memory=1.00GB
 PLAN-ROOT SINK
 |
 33:MERGING-EXCHANGE [UNPARTITIONED]
@@ -219,7 +227,7 @@ PLAN-ROOT SINK
 |  |  |  19:UNNEST [r.r_nations n]
 |  |  |
 |  |  16:SCAN HDFS [tpch_nested_parquet.region r]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |  |
 |  12:SUBPLAN
@@ -231,7 +239,7 @@ PLAN-ROOT SINK
 |  |  14:UNNEST [s.s_partsupps ps]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF008 -> s_nationkey
 |
@@ -250,7 +258,7 @@ PLAN-ROOT SINK
 |  |  09:UNNEST [r.r_nations n]
 |  |
 |  06:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |
 23:HASH JOIN [INNER JOIN, BROADCAST]
@@ -259,7 +267,7 @@ PLAN-ROOT SINK
 |--27:EXCHANGE [BROADCAST]
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size = 15, p_type LIKE '%BRASS'
 |     runtime filters: RF000 -> p_partkey
 |
@@ -272,7 +280,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: !empty(s.s_partsupps)
    runtime filters: RF004 -> s_nationkey
 ====
@@ -300,6 +308,8 @@ order by
   o_orderdate
 limit 10
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=66.00MB Threads=2
+Per-Host Resource Estimates: Memory=744MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=10]
@@ -326,11 +336,13 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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_mktsegment = 'BUILDING', !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate < '1995-03-15'
    predicates on l: l_shipdate > '1995-03-15'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=100.00MB Threads=4
+Per-Host Resource Estimates: Memory=872MB
 PLAN-ROOT SINK
 |
 13:MERGING-EXCHANGE [UNPARTITIONED]
@@ -367,7 +379,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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_mktsegment = 'BUILDING', !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderdate < '1995-03-15'
    predicates on l: l_shipdate > '1995-03-15'
@@ -396,6 +408,8 @@ group by
 order by
   o_orderpriority
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.00MB Threads=2
+Per-Host Resource Estimates: Memory=480MB
 PLAN-ROOT SINK
 |
 10:SORT
@@ -422,11 +436,13 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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: o_orderdate >= '1993-07-01', o_orderdate < '1993-10-01'
    predicates on o_lineitems: l_commitdate < l_receiptdate
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=96.00MB Threads=4
+Per-Host Resource Estimates: Memory=620MB
 PLAN-ROOT SINK
 |
 13:MERGING-EXCHANGE [UNPARTITIONED]
@@ -462,7 +478,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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: o_orderdate >= '1993-07-01', o_orderdate < '1993-10-01'
    predicates on o_lineitems: l_commitdate < l_receiptdate
@@ -491,6 +507,8 @@ group by
 order by
   revenue desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=63.88MB Threads=4
+Per-Host Resource Estimates: Memory=606MB
 PLAN-ROOT SINK
 |
 18:SORT
@@ -505,7 +523,7 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- s_nationkey
 |
 |--09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |
 15:HASH JOIN [INNER JOIN]
 |  hash predicates: c.c_nationkey = n.n_nationkey
@@ -520,7 +538,7 @@ PLAN-ROOT SINK
 |  |  13:UNNEST [r.r_nations n]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'ASIA', !empty(r.r_nations)
 |
 01:SUBPLAN
@@ -540,11 +558,13 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1994-01-01', o_orderdate < '1995-01-01'
    runtime filters: RF000 -> c_nationkey, RF004 -> c.c_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=110.02MB Threads=8
+Per-Host Resource Estimates: Memory=1.26GB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -570,7 +590,7 @@ PLAN-ROOT SINK
 |--20:EXCHANGE [BROADCAST]
 |  |
 |  09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |
 15:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: c.c_nationkey = n.n_nationkey
@@ -587,7 +607,7 @@ PLAN-ROOT SINK
 |  |  13:UNNEST [r.r_nations n]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'ASIA', !empty(r.r_nations)
 |
 01:SUBPLAN
@@ -607,7 +627,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1994-01-01', o_orderdate < '1995-01-01'
    runtime filters: RF000 -> c_nationkey, RF004 -> c.c_nationkey
@@ -624,15 +644,19 @@ where
   and l_discount between 0.05 and 0.07
   and l_quantity < 24
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=16.00MB Threads=2
+Per-Host Resource Estimates: Memory=362MB
 PLAN-ROOT SINK
 |
 01:AGGREGATE [FINALIZE]
 |  output: sum(l_extendedprice * l_discount)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_discount <= 0.07, l_discount >= 0.05, l_quantity < 24, l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
+Per-Host Resource Estimates: Memory=372MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -644,7 +668,7 @@ PLAN-ROOT SINK
 |  output: sum(l_extendedprice * l_discount)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_discount <= 0.07, l_discount >= 0.05, l_quantity < 24, l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
 ====
 # TPCH-Q7
@@ -686,6 +710,8 @@ order by
   cust_nation,
   l_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=65.81MB Threads=5
+Per-Host Resource Estimates: Memory=712MB
 PLAN-ROOT SINK
 |
 16:SORT
@@ -701,20 +727,20 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n2.n_nationkey
 |
 |--11:SCAN HDFS [tpch_nested_parquet.region.r_nations n2]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 13:HASH JOIN [INNER JOIN]
 |  hash predicates: s_nationkey = n1.n_nationkey
 |  runtime filters: RF002 <- n1.n_nationkey
 |
 |--10:SCAN HDFS [tpch_nested_parquet.region.r_nations n1]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 12:HASH JOIN [INNER JOIN]
 |  hash predicates: l_suppkey = s_suppkey
 |
 |--09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF002 -> s_nationkey
 |
 01:SUBPLAN
@@ -734,12 +760,14 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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_shipdate >= '1995-01-01', l_shipdate <= '1996-12-31'
    runtime filters: RF000 -> c_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=112.97MB Threads=10
+Per-Host Resource Estimates: Memory=997MB
 PLAN-ROOT SINK
 |
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -766,7 +794,7 @@ PLAN-ROOT SINK
 |--19:EXCHANGE [BROADCAST]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.region.r_nations n2]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 13:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: s_nationkey = n1.n_nationkey
@@ -775,7 +803,7 @@ PLAN-ROOT SINK
 |--18:EXCHANGE [BROADCAST]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.region.r_nations n1]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 12:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_suppkey = s_suppkey
@@ -783,7 +811,7 @@ PLAN-ROOT SINK
 |--17:EXCHANGE [BROADCAST]
 |  |
 |  09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF002 -> s_nationkey
 |
 01:SUBPLAN
@@ -803,7 +831,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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_shipdate >= '1995-01-01', l_shipdate <= '1996-12-31'
@@ -846,6 +874,8 @@ group by
 order by
   o_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=67.75MB Threads=6
+Per-Host Resource Estimates: Memory=746MB
 PLAN-ROOT SINK
 |
 22:SORT
@@ -860,7 +890,7 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n2.n_nationkey
 |
 |--16:SCAN HDFS [tpch_nested_parquet.region.r_nations n2]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 19:HASH JOIN [INNER JOIN]
 |  hash predicates: c_nationkey = n1.n_nationkey
@@ -875,21 +905,21 @@ PLAN-ROOT SINK
 |  |  14:UNNEST [r.r_nations n1]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'AMERICA', !empty(r.r_nations)
 |
 18:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
 |
 |--10:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_type = 'ECONOMY ANODIZED STEEL'
 |
 17:HASH JOIN [INNER JOIN]
 |  hash predicates: l_suppkey = s_suppkey
 |
 |--09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF000 -> s_nationkey
 |
 01:SUBPLAN
@@ -909,11 +939,13 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1995-01-01', o_orderdate <= '1996-12-31'
    runtime filters: RF002 -> c_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=110.91MB Threads=12
+Per-Host Resource Estimates: Memory=1.01GB
 PLAN-ROOT SINK
 |
 29:MERGING-EXCHANGE [UNPARTITIONED]
@@ -939,7 +971,7 @@ PLAN-ROOT SINK
 |--26:EXCHANGE [BROADCAST]
 |  |
 |  16:SCAN HDFS [tpch_nested_parquet.region.r_nations n2]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 19:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: c_nationkey = n1.n_nationkey
@@ -956,7 +988,7 @@ PLAN-ROOT SINK
 |  |  14:UNNEST [r.r_nations n1]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.region r]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: r_name = 'AMERICA', !empty(r.r_nations)
 |
 18:HASH JOIN [INNER JOIN, BROADCAST]
@@ -965,7 +997,7 @@ PLAN-ROOT SINK
 |--24:EXCHANGE [BROADCAST]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_type = 'ECONOMY ANODIZED STEEL'
 |
 17:HASH JOIN [INNER JOIN, BROADCAST]
@@ -974,7 +1006,7 @@ PLAN-ROOT SINK
 |--23:EXCHANGE [BROADCAST]
 |  |
 |  09:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF000 -> s_nationkey
 |
 01:SUBPLAN
@@ -994,7 +1026,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1995-01-01', o_orderdate <= '1996-12-31'
    runtime filters: RF002 -> c_nationkey
@@ -1031,6 +1063,8 @@ order by
   nation,
   o_year desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=72.31MB Threads=5
+Per-Host Resource Estimates: Memory=830MB
 PLAN-ROOT SINK
 |
 16:SORT
@@ -1045,13 +1079,13 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n_nationkey
 |
 |--11:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 13:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
 |
 |--10:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_name LIKE '%green%'
 |
 12:HASH JOIN [INNER JOIN]
@@ -1066,7 +1100,7 @@ PLAN-ROOT SINK
 |  |  08:UNNEST [s.s_partsupps ps]
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF000 -> s_nationkey
 |
@@ -1079,9 +1113,11 @@ PLAN-ROOT SINK
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(o.o_lineitems)
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=143.33MB Threads=10
+Per-Host Resource Estimates: Memory=1.09GB
 PLAN-ROOT SINK
 |
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1107,7 +1143,7 @@ PLAN-ROOT SINK
 |--19:EXCHANGE [BROADCAST]
 |  |
 |  11:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 13:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_partkey = p_partkey
@@ -1115,7 +1151,7 @@ PLAN-ROOT SINK
 |--18:EXCHANGE [BROADCAST]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_name LIKE '%green%'
 |
 12:HASH JOIN [INNER JOIN, BROADCAST]
@@ -1132,7 +1168,7 @@ PLAN-ROOT SINK
 |  |  08:UNNEST [s.s_partsupps ps]
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF000 -> s_nationkey
 |
@@ -1145,7 +1181,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(o.o_lineitems)
 ====
 # TPCH-Q10
@@ -1182,6 +1218,8 @@ order by
   revenue desc
 limit 20
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=60.94MB Threads=3
+Per-Host Resource Estimates: Memory=835MB
 PLAN-ROOT SINK
 |
 12:TOP-N [LIMIT=20]
@@ -1196,7 +1234,7 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n_nationkey
 |
 |--09:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 01:SUBPLAN
 |
@@ -1215,12 +1253,14 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1993-10-01', o_orderdate < '1994-01-01'
    predicates on l: l_returnflag = 'R'
    runtime filters: RF000 -> c_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=94.95MB Threads=6
+Per-Host Resource Estimates: Memory=995MB
 PLAN-ROOT SINK
 |
 16:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1247,7 +1287,7 @@ PLAN-ROOT SINK
 |--13:EXCHANGE [BROADCAST]
 |  |
 |  09:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |
 01:SUBPLAN
 |
@@ -1266,7 +1306,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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), o_orderdate >= '1993-10-01', o_orderdate < '1994-01-01'
    predicates on l: l_returnflag = 'R'
@@ -1306,6 +1346,8 @@ where
 order by
   value desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=71.89MB Threads=5
+Per-Host Resource Estimates: Memory=558MB
 PLAN-ROOT SINK
 |
 17:SORT
@@ -1322,7 +1364,7 @@ PLAN-ROOT SINK
 |  |  runtime filters: RF002 <- n_nationkey
 |  |
 |  |--13:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: n_name = 'GERMANY'
 |  |
 |  09:SUBPLAN
@@ -1334,7 +1376,7 @@ PLAN-ROOT SINK
 |  |  11:UNNEST [s.s_partsupps ps]
 |  |
 |  08:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF002 -> s_nationkey
 |
@@ -1347,7 +1389,7 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n_nationkey
 |
 |--05:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: n_name = 'GERMANY'
 |
 01:SUBPLAN
@@ -1359,10 +1401,12 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: !empty(s.s_partsupps)
    runtime filters: RF000 -> s_nationkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=111.91MB Threads=11
+Per-Host Resource Estimates: Memory=744MB
 PLAN-ROOT SINK
 |
 25:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1391,7 +1435,7 @@ PLAN-ROOT SINK
 |  |--21:EXCHANGE [BROADCAST]
 |  |  |
 |  |  13:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: n_name = 'GERMANY'
 |  |
 |  09:SUBPLAN
@@ -1403,7 +1447,7 @@ PLAN-ROOT SINK
 |  |  11:UNNEST [s.s_partsupps ps]
 |  |
 |  08:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF002 -> s_nationkey
 |
@@ -1424,7 +1468,7 @@ PLAN-ROOT SINK
 |--18:EXCHANGE [BROADCAST]
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: n_name = 'GERMANY'
 |
 01:SUBPLAN
@@ -1436,7 +1480,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: !empty(s.s_partsupps)
    runtime filters: RF000 -> s_nationkey
 ====
@@ -1470,6 +1514,8 @@ group by
 order by
   l_shipmode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=58.00MB Threads=2
+Per-Host Resource Estimates: Memory=568MB
 PLAN-ROOT SINK
 |
 06:SORT
@@ -1488,10 +1534,12 @@ PLAN-ROOT SINK
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(o.o_lineitems)
    predicates on l: l_shipmode IN ('MAIL', 'SHIP'), l_commitdate < l_receiptdate, l_shipdate < l_commitdate, l_receiptdate >= '1994-01-01', l_receiptdate < '1995-01-01'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=104.00MB Threads=4
+Per-Host Resource Estimates: Memory=718MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1519,7 +1567,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [o.o_lineitems l]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders o]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: !empty(o.o_lineitems)
    predicates on l: l_shipmode IN ('MAIL', 'SHIP'), l_commitdate < l_receiptdate, l_shipdate < l_commitdate, l_receiptdate >= '1994-01-01', l_receiptdate < '1995-01-01'
 ====
@@ -1545,6 +1593,8 @@ order by
   custdist desc,
   c_count desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=40.00MB Threads=2
+Per-Host Resource Estimates: Memory=274MB
 PLAN-ROOT SINK
 |
 07:SORT
@@ -1567,9 +1617,11 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders]
 |
 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 on c_orders: (NOT o_comment LIKE '%special%requests%')
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=96.94MB Threads=5
+Per-Host Resource Estimates: Memory=546MB
 PLAN-ROOT SINK
 |
 12:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1607,7 +1659,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders]
 |
 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 on c_orders: (NOT o_comment LIKE '%special%requests%')
 ====
 # TPCH-Q14
@@ -1626,6 +1678,8 @@ where
   and l_shipdate >= '1995-09-01'
   and l_shipdate < '1995-10-01'
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=36.00MB Threads=3
+Per-Host Resource Estimates: Memory=402MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -1636,13 +1690,15 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- p_partkey
 |
 |--01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1995-10-01', l_shipdate >= '1995-09-01'
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=36.00MB Threads=5
+Per-Host Resource Estimates: Memory=422MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -1660,10 +1716,10 @@ PLAN-ROOT SINK
 |--04:EXCHANGE [BROADCAST]
 |  |
 |  01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1995-10-01', l_shipdate >= '1995-09-01'
    runtime filters: RF000 -> l_partkey
 ====
@@ -1700,6 +1756,8 @@ where
 order by
   s_suppkey
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=104.88MB Threads=4
+Per-Host Resource Estimates: Memory=1.16GB
 PLAN-ROOT SINK
 |
 08:SORT
@@ -1716,7 +1774,7 @@ PLAN-ROOT SINK
 |  |  group by: l_suppkey
 |  |
 |  03:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=292.36MB
+|     partitions=1/1 files=4 size=288.98MB
 |     predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
 |
 06:HASH JOIN [INNER JOIN]
@@ -1724,17 +1782,19 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- s_suppkey
 |
 |--00:SCAN HDFS [tpch_nested_parquet.supplier]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |
 02:AGGREGATE [FINALIZE]
 |  output: sum(l_extendedprice * (1 - l_discount))
 |  group by: l_suppkey
 |
 01:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
    runtime filters: RF000 -> l.l_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=186.88MB Threads=10
+Per-Host Resource Estimates: Memory=1.45GB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1767,7 +1827,7 @@ PLAN-ROOT SINK
 |  |  group by: l_suppkey
 |  |
 |  03:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=292.36MB
+|     partitions=1/1 files=4 size=288.98MB
 |     predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
 |
 06:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -1777,7 +1837,7 @@ PLAN-ROOT SINK
 |--11:EXCHANGE [HASH(s_suppkey)]
 |  |
 |  00:SCAN HDFS [tpch_nested_parquet.supplier]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |
 10:AGGREGATE [FINALIZE]
 |  output: sum:merge(l_extendedprice * (1 - l_discount))
@@ -1790,7 +1850,7 @@ PLAN-ROOT SINK
 |  group by: l_suppkey
 |
 01:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
    runtime filters: RF000 -> l.l_suppkey
 ====
@@ -1821,6 +1881,8 @@ order by
   p_type,
   p_size
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=3
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 09:SORT
@@ -1837,7 +1899,7 @@ PLAN-ROOT SINK
 |  hash predicates: ps_partkey = p_partkey
 |
 |--05:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size IN (49, 14, 23, 45, 19, 3, 36, 9), p_brand != 'Brand#45', NOT p_type LIKE 'MEDIUM POLISHED%'
 |
 01:SUBPLAN
@@ -1849,9 +1911,11 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: NOT s_comment LIKE '%Customer%Complaints%', !empty(s.s_partsupps)
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=31.81MB Threads=7
+Per-Host Resource Estimates: Memory=286MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1884,7 +1948,7 @@ PLAN-ROOT SINK
 |--10:EXCHANGE [BROADCAST]
 |  |
 |  05:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size IN (49, 14, 23, 45, 19, 3, 36, 9), p_brand != 'Brand#45', NOT p_type LIKE 'MEDIUM POLISHED%'
 |
 01:SUBPLAN
@@ -1896,7 +1960,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [s.s_partsupps ps]
 |
 00:SCAN HDFS [tpch_nested_parquet.supplier s]
-   partitions=1/1 files=1 size=43.00MB
+   partitions=1/1 files=1 size=41.79MB
    predicates: NOT s_comment LIKE '%Customer%Complaints%', !empty(s.s_partsupps)
 ====
 # TPCH-Q17
@@ -1919,6 +1983,8 @@ where
       l_partkey = p_partkey
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=96.94MB Threads=4
+Per-Host Resource Estimates: Memory=703MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -1934,21 +2000,23 @@ PLAN-ROOT SINK
 |  |  group by: l_partkey
 |  |
 |  02:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=292.36MB
+|     partitions=1/1 files=4 size=288.98MB
 |
 04:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
 |  runtime filters: RF002 <- p_partkey
 |
 |--01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_container = 'MED BOX', p_brand = 'Brand#23'
 |     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    runtime filters: RF000 -> l.l_partkey, RF002 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=154.94MB Threads=8
+Per-Host Resource Estimates: Memory=865MB
 PLAN-ROOT SINK
 |
 12:AGGREGATE [FINALIZE]
@@ -1975,7 +2043,7 @@ PLAN-ROOT SINK
 |  |  group by: l_partkey
 |  |
 |  02:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-|     partitions=1/1 files=4 size=292.36MB
+|     partitions=1/1 files=4 size=288.98MB
 |
 10:EXCHANGE [HASH(p_partkey)]
 |
@@ -1986,12 +2054,12 @@ PLAN-ROOT SINK
 |--07:EXCHANGE [BROADCAST]
 |  |
 |  01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_container = 'MED BOX', p_brand = 'Brand#23'
 |     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    runtime filters: RF000 -> l.l_partkey, RF002 -> l_partkey
 ====
 # TPCH-Q18
@@ -2014,6 +2082,8 @@ order by
   o_orderdate
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=24.00MB Threads=2
+Per-Host Resource Estimates: Memory=538MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=100]
@@ -2040,9 +2110,11 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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)
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=24.00MB Threads=3
+Per-Host Resource Estimates: Memory=538MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2073,7 +2145,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 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)
 ====
 # TPCH-Q19
@@ -2114,6 +2186,8 @@ where
     )
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=3
+Per-Host Resource Estimates: Memory=596MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -2125,14 +2199,16 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- p_partkey
 |
 |--01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size >= 1
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipmode IN ('AIR', 'AIR REG'), l_shipinstruct = 'DELIVER IN PERSON'
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=5
+Per-Host Resource Estimates: Memory=616MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -2151,11 +2227,11 @@ PLAN-ROOT SINK
 |--04:EXCHANGE [BROADCAST]
 |  |
 |  01:SCAN HDFS [tpch_nested_parquet.part p]
-|     partitions=1/1 files=1 size=6.24MB
+|     partitions=1/1 files=1 size=6.23MB
 |     predicates: p_size >= 1
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipmode IN ('AIR', 'AIR REG'), l_shipinstruct = 'DELIVER IN PERSON'
    runtime filters: RF000 -> l_partkey
 ====
@@ -2194,6 +2270,8 @@ where
 order by
   s_name
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=90.81MB Threads=5
+Per-Host Resource Estimates: Memory=888MB
 PLAN-ROOT SINK
 |
 13:SORT
@@ -2211,7 +2289,7 @@ PLAN-ROOT SINK
 |  |  hash predicates: ps_partkey = p_partkey
 |  |
 |  |--06:SCAN HDFS [tpch_nested_parquet.part p]
-|  |     partitions=1/1 files=1 size=6.24MB
+|  |     partitions=1/1 files=1 size=6.23MB
 |  |     predicates: p_name LIKE 'forest%'
 |  |
 |  09:HASH JOIN [INNER JOIN]
@@ -2219,7 +2297,7 @@ PLAN-ROOT SINK
 |  |  runtime filters: RF006 <- n_nationkey
 |  |
 |  |--05:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: n_name = 'CANADA'
 |  |
 |  01:SUBPLAN
@@ -2231,7 +2309,7 @@ PLAN-ROOT SINK
 |  |  03:UNNEST [s.s_partsupps ps]
 |  |
 |  00:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF006 -> s_nationkey
 |
@@ -2240,10 +2318,12 @@ PLAN-ROOT SINK
 |  group by: l_partkey, l_suppkey
 |
 07:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> l.l_partkey, RF001 -> l.l_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=164.33MB Threads=11
+Per-Host Resource Estimates: Memory=1.04GB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2273,7 +2353,7 @@ PLAN-ROOT SINK
 |  |--17:EXCHANGE [BROADCAST]
 |  |  |
 |  |  06:SCAN HDFS [tpch_nested_parquet.part p]
-|  |     partitions=1/1 files=1 size=6.24MB
+|  |     partitions=1/1 files=1 size=6.23MB
 |  |     predicates: p_name LIKE 'forest%'
 |  |
 |  09:HASH JOIN [INNER JOIN, BROADCAST]
@@ -2283,7 +2363,7 @@ PLAN-ROOT SINK
 |  |--16:EXCHANGE [BROADCAST]
 |  |  |
 |  |  05:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|  |     partitions=1/1 files=1 size=3.24KB
+|  |     partitions=1/1 files=1 size=3.36KB
 |  |     predicates: n_name = 'CANADA'
 |  |
 |  01:SUBPLAN
@@ -2295,7 +2375,7 @@ PLAN-ROOT SINK
 |  |  03:UNNEST [s.s_partsupps ps]
 |  |
 |  00:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     predicates: !empty(s.s_partsupps)
 |     runtime filters: RF006 -> s_nationkey
 |
@@ -2310,7 +2390,7 @@ PLAN-ROOT SINK
 |  group by: l_partkey, l_suppkey
 |
 07:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=292.36MB
+   partitions=1/1 files=4 size=288.98MB
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> l.l_partkey, RF001 -> l.l_suppkey
 ====
@@ -2355,6 +2435,8 @@ order by
   s_name
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=39.33MB Threads=4
+Per-Host Resource Estimates: Memory=919MB
 PLAN-ROOT SINK
 |
 20:TOP-N [LIMIT=100]
@@ -2383,14 +2465,14 @@ PLAN-ROOT SINK
 |  runtime filters: RF000 <- n_nationkey
 |
 |--10:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: n_name = 'SAUDI ARABIA'
 |
 11:HASH JOIN [INNER JOIN]
 |  hash predicates: l1.l_suppkey = s_suppkey
 |
 |--00:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF000 -> s_nationkey
 |
 02:SUBPLAN
@@ -2410,12 +2492,14 @@ PLAN-ROOT SINK
 |  04:UNNEST [c.c_orders o]
 |
 01: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), o_orderstatus = 'F'
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
    predicates on l3: l3.l_receiptdate > l3.l_commitdate
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=42.84MB Threads=10
+Per-Host Resource Estimates: Memory=1.10GB
 PLAN-ROOT SINK
 |
 25:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2456,7 +2540,7 @@ PLAN-ROOT SINK
 |--22:EXCHANGE [BROADCAST]
 |  |
 |  10:SCAN HDFS [tpch_nested_parquet.region.r_nations n]
-|     partitions=1/1 files=1 size=3.24KB
+|     partitions=1/1 files=1 size=3.36KB
 |     predicates: n_name = 'SAUDI ARABIA'
 |
 11:HASH JOIN [INNER JOIN, BROADCAST]
@@ -2465,7 +2549,7 @@ PLAN-ROOT SINK
 |--21:EXCHANGE [BROADCAST]
 |  |
 |  00:SCAN HDFS [tpch_nested_parquet.supplier s]
-|     partitions=1/1 files=1 size=43.00MB
+|     partitions=1/1 files=1 size=41.79MB
 |     runtime filters: RF000 -> s_nationkey
 |
 02:SUBPLAN
@@ -2485,7 +2569,7 @@ PLAN-ROOT SINK
 |  04:UNNEST [c.c_orders o]
 |
 01: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), o_orderstatus = 'F'
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
@@ -2526,6 +2610,8 @@ group by
 order by
   cntrycode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=3
+Per-Host Resource Estimates: Memory=460MB
 PLAN-ROOT SINK
 |
 09:SORT
@@ -2550,13 +2636,15 @@ PLAN-ROOT SINK
 |  |  output: avg(c_acctbal)
 |  |
 |  01: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_acctbal > 0.00, substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', '17')
 |
 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: substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', '17')
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=25.94MB Threads=8
+Per-Host Resource Estimates: Memory=688MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2597,10 +2685,10 @@ PLAN-ROOT SINK
 |  |  output: avg(c_acctbal)
 |  |
 |  01: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_acctbal > 0.00, substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', '17')
 |
 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: substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', '17')
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-query/queries/QueryTest/admission-reject-mem-estimate.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/admission-reject-mem-estimate.test b/testdata/workloads/functional-query/queries/QueryTest/admission-reject-mem-estimate.test
index 530b623..986c3ad 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/admission-reject-mem-estimate.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/admission-reject-mem-estimate.test
@@ -22,7 +22,7 @@ STRING,STRING
 row_regex: .*Query Options \(set by configuration\).*MAX_MEM_ESTIMATE_FOR_ADMISSION=31457280.*
 # Memory estimate sent to backend is overridden, but the explain plan shows the planner output.
 row_regex: .*Estimated Per-Host Mem: 31457280.*
-row_regex: .*Per-Host Resource Estimates: Memory=82.94MB.*
+row_regex: .*Per-Host Resource Estimates: Memory=83MB.*
 ====
 ---- QUERY
 # If the estimate is set to a higher value that is still > the max mem resources for
@@ -61,7 +61,7 @@ STRING,STRING
 row_regex: .*Query Options \(set by configuration\).*MEM_LIMIT=41943040.*MAX_MEM_ESTIMATE_FOR_ADMISSION=47185920.*
 # Memory estimate sent to backend is overridden, but the explain plan shows the planner output.
 row_regex: .*Estimated Per-Host Mem: 47185920.*
-row_regex: .*Per-Host Resource Estimates: Memory=82.94MB.*
+row_regex: .*Per-Host Resource Estimates: Memory=83MB.*
 ====
 ---- QUERY
 # Larger queries that use more memory than the estimate can still run because no mem_limit is set.
@@ -75,7 +75,7 @@ STRING
 row_regex: .*Query Options \(set by configuration\).*MAX_MEM_ESTIMATE_FOR_ADMISSION=10485760.*
 # Memory estimate sent to backend is overridden, but the explain plan shows the planner output.
 row_regex: .*Estimated Per-Host Mem: 10485760.*
-row_regex: .*Per-Host Resource Estimates: Memory=90.00MB.*
+row_regex: .*Per-Host Resource Estimates: Memory=90MB.*
 ====
 ---- QUERY
 # If the memory estimate is less than max_mem_estimate_for_admission, then the estimate
@@ -90,5 +90,5 @@ STRING
 ---- RUNTIME_PROFILE
 row_regex: .*Query Options \(set by configuration\).*MAX_MEM_ESTIMATE_FOR_ADMISSION=52428800.*
 row_regex: .*Estimated Per-Host Mem: 10485760.*
-row_regex: .*Per-Host Resource Estimates: Memory=10.00MB.*
+row_regex: .*Per-Host Resource Estimates: Memory=10MB.*
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-query/queries/QueryTest/stats-extrapolation.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/stats-extrapolation.test b/testdata/workloads/functional-query/queries/QueryTest/stats-extrapolation.test
index 55ec0a8..c3472ab 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/stats-extrapolation.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/stats-extrapolation.test
@@ -131,7 +131,7 @@ select * from functional_parquet.alltypes where year = 2010;
 explain select id from alltypes where year = 2010;
 ---- RESULTS: VERIFY_IS_EQUAL
 row_regex:.*Max Per-Host Resource Reservation: Memory=.*
-row_regex:.*Per-Host Resource Estimates: Memory=16.00MB'
+row_regex:.*Per-Host Resource Estimates: Memory=16MB'
 'Codegen disabled by planner'
 ''
 'F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1'
@@ -157,7 +157,7 @@ compute stats alltypes;
 explain select id from alltypes where year = 2010;
 ---- RESULTS: VERIFY_IS_EQUAL
 row_regex:.*Max Per-Host Resource Reservation: Memory=.*
-row_regex:.*Per-Host Resource Estimates: Memory=16.00MB'
+row_regex:.*Per-Host Resource Estimates: Memory=16MB'
 'Codegen disabled by planner'
 ''
 'F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1'

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/tests/stress/concurrent_select.py
----------------------------------------------------------------------
diff --git a/tests/stress/concurrent_select.py b/tests/stress/concurrent_select.py
index 1e31fa4..7754e74 100755
--- a/tests/stress/concurrent_select.py
+++ b/tests/stress/concurrent_select.py
@@ -98,7 +98,7 @@ EXPECTED_TPCH_QUERIES_COUNT = 22
 # The unit prefixes can be found in
 # fe/src/main/java/org/apache/impala/common/PrintUtils.java
 MEM_ESTIMATE_PATTERN = re.compile(
-    r"Per-Host Resource Estimates: Memory=(\d+.?\d*)(P|T|G|M|K)?B")
+    r"Per-Host Resource Estimates: Memory=(\d+\.?\d*)(P|T|G|M|K)?B")
 
 PROFILES_DIR = "profiles"
 RESULT_HASHES_DIR = "result_hashes"


[2/5] impala git commit: IMPALA-7354: planner test resource estimates for more workloads

Posted by ta...@apache.org.
http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
index 31f0738..6cdb497 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
@@ -23,6 +23,8 @@ order by
   brand_id
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=4
+Per-Host Resource Estimates: Memory=214MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=100]
@@ -49,9 +51,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manufact_id = 436
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=34.81MB Threads=9
+Per-Host Resource Estimates: Memory=235MB
 PLAN-ROOT SINK
 |
 12:MERGING-EXCHANGE [UNPARTITIONED]
@@ -94,9 +98,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manufact_id = 436
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=69.62MB Threads=11
+Per-Host Resource Estimates: Memory=166MB
 PLAN-ROOT SINK
 |
 12:MERGING-EXCHANGE [UNPARTITIONED]
@@ -147,7 +153,7 @@ PLAN-ROOT SINK
 |     predicates: item.i_manufact_id = 436
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ====
 # TPCDS-Q7
@@ -180,6 +186,8 @@ order by
   i_item_id
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.38MB Threads=6
+Per-Host Resource Estimates: Memory=434MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=100]
@@ -221,9 +229,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_promo_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=54.31MB Threads=12
+Per-Host Resource Estimates: Memory=454MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -283,9 +293,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_promo_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=108.62MB Threads=13
+Per-Host Resource Estimates: Memory=397MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -361,7 +373,7 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_promo_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ====
 # TPCDS-Q8
@@ -434,6 +446,8 @@ order by
   s_store_name
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=33.32MB Threads=6
+Per-Host Resource Estimates: Memory=281MB
 PLAN-ROOT SINK
 |
 11:TOP-N [LIMIT=100]
@@ -482,9 +496,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> substr(store.s_zip, 1, 2)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=90/1824 files=90 size=9.71MB
+   partitions=90/1824 files=90 size=10.32MB
    runtime filters: RF002 -> store_sales.ss_store_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=47.07MB Threads=13
+Per-Host Resource Estimates: Memory=327MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -557,9 +573,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> substr(store.s_zip, 1, 2)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=90/1824 files=90 size=9.71MB
+   partitions=90/1824 files=90 size=10.32MB
    runtime filters: RF002 -> store_sales.ss_store_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=94.14MB Threads=15
+Per-Host Resource Estimates: Memory=285MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -648,7 +666,7 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> substr(store.s_zip, 1, 2)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=90/1824 files=90 size=9.71MB
+   partitions=90/1824 files=90 size=10.32MB
    runtime filters: RF002 -> store_sales.ss_store_sk
 ====
 # TPCDS-Q19
@@ -689,6 +707,8 @@ order by
   i_manufact
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=43.32MB Threads=7
+Per-Host Resource Estimates: Memory=331MB
 PLAN-ROOT SINK
 |
 12:TOP-N [LIMIT=100]
@@ -731,7 +751,7 @@ PLAN-ROOT SINK
 |  |  |     predicates: i_manager_id = 7
 |  |  |
 |  |  01:SCAN HDFS [tpcds.store_sales]
-|  |     partitions=30/1824 files=30 size=9.93MB
+|  |     partitions=30/1824 files=30 size=10.55MB
 |  |     runtime filters: RF000 -> ss_store_sk, RF006 -> ss_sold_date_sk, RF008 -> ss_item_sk
 |  |
 |  03:SCAN HDFS [tpcds.customer]
@@ -742,6 +762,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=5.25MB
    runtime filters: RF002 -> ca_address_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=54.13MB Threads=16
+Per-Host Resource Estimates: Memory=358MB
 PLAN-ROOT SINK
 |
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -815,9 +837,11 @@ PLAN-ROOT SINK
 |     predicates: i_manager_id = 7
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=30/1824 files=30 size=9.93MB
+   partitions=30/1824 files=30 size=10.55MB
    runtime filters: RF000 -> ss_store_sk, RF004 -> ss_customer_sk, RF006 -> ss_sold_date_sk, RF008 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=108.27MB Threads=19
+Per-Host Resource Estimates: Memory=299MB
 PLAN-ROOT SINK
 |
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -911,7 +935,7 @@ PLAN-ROOT SINK
 |     predicates: i_manager_id = 7
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=30/1824 files=30 size=9.93MB
+   partitions=30/1824 files=30 size=10.55MB
    runtime filters: RF000 -> ss_store_sk, RF004 -> ss_customer_sk, RF006 -> ss_sold_date_sk, RF008 -> ss_item_sk
 ====
 # TPCDS-Q27
@@ -946,6 +970,8 @@ order by
   s_state
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.32MB Threads=6
+Per-Host Resource Estimates: Memory=434MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=100]
@@ -987,9 +1013,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_store_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=54.26MB Threads=12
+Per-Host Resource Estimates: Memory=454MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1049,9 +1077,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_store_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=108.52MB Threads=13
+Per-Host Resource Estimates: Memory=397MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1127,7 +1157,7 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 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 -> ss_item_sk, RF002 -> ss_store_sk, RF004 -> ss_cdemo_sk, RF006 -> ss_sold_date_sk
 ====
 # TPCDS-Q34
@@ -1175,6 +1205,8 @@ order by
   c_preferred_cust_flag desc
 limit 100000
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=34.07MB Threads=6
+Per-Host Resource Estimates: Memory=298MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=100000]
@@ -1214,13 +1246,15 @@ PLAN-ROOT SINK
 |  |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), (CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END) > 1.2
 |  |
 |  00:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 |
 08:SCAN HDFS [tpcds.customer]
    partitions=1/1 files=1 size=12.60MB
    runtime filters: RF000 -> c_customer_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=56.01MB Threads=13
+Per-Host Resource Estimates: Memory=339MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1283,9 +1317,11 @@ PLAN-ROOT SINK
 |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), (CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END) > 1.2
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=95.02MB Threads=15
+Per-Host Resource Estimates: Memory=276MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1364,7 +1400,7 @@ PLAN-ROOT SINK
 |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), (CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END) > 1.2
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 ====
 # TPCDS-Q42
@@ -1394,6 +1430,8 @@ order by
   item.i_category
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=4
+Per-Host Resource Estimates: Memory=214MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=100]
@@ -1420,9 +1458,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=33.81MB Threads=8
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1463,9 +1503,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=67.62MB Threads=9
+Per-Host Resource Estimates: Memory=164MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1514,7 +1556,7 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ====
 # TPCDS-Q43
@@ -1552,6 +1594,8 @@ order by
   sat_sales
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=21.88MB Threads=4
+Per-Host Resource Estimates: Memory=214MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=100]
@@ -1578,9 +1622,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=25.82MB Threads=8
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1621,9 +1667,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=51.64MB Threads=9
+Per-Host Resource Estimates: Memory=164MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1672,7 +1720,7 @@ PLAN-ROOT SINK
 |     predicates: d_year = 1998
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk
 ====
 # TPCDS-Q46
@@ -1727,6 +1775,8 @@ order by
   ss_ticket_number
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=84.06MB Threads=8
+Per-Host Resource Estimates: Memory=378MB
 PLAN-ROOT SINK
 |
 14:TOP-N [LIMIT=100]
@@ -1784,9 +1834,11 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=130.70MB Threads=17
+Per-Host Resource Estimates: Memory=442MB
 PLAN-ROOT SINK
 |
 24:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1868,9 +1920,11 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=259.52MB Threads=19
+Per-Host Resource Estimates: Memory=435MB
 PLAN-ROOT SINK
 |
 24:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1976,7 +2030,7 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ====
 # TPCDS-Q52
@@ -2005,6 +2059,8 @@ order by
   brand_id
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=4
+Per-Host Resource Estimates: Memory=214MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=100]
@@ -2031,9 +2087,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=33.81MB Threads=8
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2074,9 +2132,11 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=67.62MB Threads=9
+Per-Host Resource Estimates: Memory=164MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2125,7 +2185,7 @@ PLAN-ROOT SINK
 |     predicates: item.i_manager_id = 1
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> store_sales.ss_sold_date_sk, RF002 -> store_sales.ss_item_sk
 ====
 # TPCDS-Q53
@@ -2160,6 +2220,8 @@ order by
   i_manufact_id
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=32.82MB Threads=5
+Per-Host Resource Estimates: Memory=249MB
 PLAN-ROOT SINK
 |
 08:TOP-N [LIMIT=100]
@@ -2193,9 +2255,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=36.76MB Threads=10
+Per-Host Resource Estimates: Memory=269MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2245,9 +2309,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=73.52MB Threads=11
+Per-Host Resource Estimates: Memory=202MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2309,7 +2375,7 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'reference', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ====
 # TPCDS-Q55
@@ -2335,6 +2401,8 @@ order by
   i_brand_id
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.88MB Threads=4
+Per-Host Resource Estimates: Memory=214MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=100]
@@ -2361,9 +2429,11 @@ PLAN-ROOT SINK
 |     predicates: i_manager_id = 36
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_sold_date_sk, RF002 -> ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=33.81MB Threads=8
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2404,9 +2474,11 @@ PLAN-ROOT SINK
 |     predicates: i_manager_id = 36
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_sold_date_sk, RF002 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=67.62MB Threads=9
+Per-Host Resource Estimates: Memory=164MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2455,7 +2527,7 @@ PLAN-ROOT SINK
 |     predicates: i_manager_id = 36
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_sold_date_sk, RF002 -> ss_item_sk
 ====
 # TPCDS-Q59
@@ -2541,6 +2613,8 @@ order by
   d_week_seq1
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=74.27MB Threads=9
+Per-Host Resource Estimates: Memory=537MB
 PLAN-ROOT SINK
 |
 17:TOP-N [LIMIT=100]
@@ -2578,7 +2652,7 @@ PLAN-ROOT SINK
 |  |     runtime filters: RF012 -> tpcds.date_dim.d_week_seq
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> tpcds.store_sales.ss_store_sk, RF014 -> ss_sold_date_sk
 |
 07:HASH JOIN [INNER JOIN]
@@ -2611,9 +2685,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> tpcds.date_dim.d_week_seq, RF006 -> tpcds.date_dim.d_week_seq
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> tpcds.store_sales.ss_store_sk, RF008 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=106.89MB Threads=20
+Per-Host Resource Estimates: Memory=589MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2669,7 +2745,7 @@ PLAN-ROOT SINK
 |  |     runtime filters: RF012 -> tpcds.date_dim.d_week_seq
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> tpcds.store_sales.ss_store_sk, RF014 -> ss_sold_date_sk
 |
 28:EXCHANGE [HASH(d_week_seq,s_store_id)]
@@ -2716,9 +2792,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> tpcds.date_dim.d_week_seq, RF006 -> tpcds.date_dim.d_week_seq
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> tpcds.store_sales.ss_store_sk, RF008 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=210.03MB Threads=23
+Per-Host Resource Estimates: Memory=470MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2790,7 +2868,7 @@ PLAN-ROOT SINK
 |  |     runtime filters: RF012 -> tpcds.date_dim.d_week_seq
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> tpcds.store_sales.ss_store_sk, RF014 -> ss_sold_date_sk
 |
 28:EXCHANGE [HASH(d_week_seq,s_store_id)]
@@ -2849,7 +2927,7 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> tpcds.date_dim.d_week_seq, RF006 -> tpcds.date_dim.d_week_seq
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> tpcds.store_sales.ss_store_sk, RF008 -> ss_sold_date_sk
 ====
 # TPCDS-Q63
@@ -2889,6 +2967,8 @@ order by
   sum_sales
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=29.32MB Threads=5
+Per-Host Resource Estimates: Memory=253MB
 PLAN-ROOT SINK
 |
 11:TOP-N [LIMIT=100]
@@ -2932,9 +3012,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'refernece', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=364/1824 files=364 size=62.92MB
+   partitions=364/1824 files=364 size=66.85MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=39.26MB Threads=10
+Per-Host Resource Estimates: Memory=279MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2994,9 +3076,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'refernece', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=364/1824 files=364 size=62.92MB
+   partitions=364/1824 files=364 size=66.85MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=78.52MB Threads=11
+Per-Host Resource Estimates: Memory=222MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3068,7 +3152,7 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Books', 'Children', 'Electronics') AND i_class IN ('personal', 'portable', 'refernece', 'self-help') AND i_brand IN ('scholaramalgamalg #14', 'scholaramalgamalg #7', 'exportiunivamalg #9', 'scholaramalgamalg #9')) OR (i_category IN ('Women', 'Music', 'Men') AND i_class IN ('accessories', 'classical', 'fragrances', 'pants') AND i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=364/1824 files=364 size=62.92MB
+   partitions=364/1824 files=364 size=66.85MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ====
 # TPCDS-Q65
@@ -3127,6 +3211,8 @@ order by
   i_item_desc
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=55.57MB Threads=7
+Per-Host Resource Estimates: Memory=432MB
 PLAN-ROOT SINK
 |
 14:TOP-N [LIMIT=100]
@@ -3154,7 +3240,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |  |
 |  02:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF008 -> ss_sold_date_sk
 |
 12:HASH JOIN [INNER JOIN]
@@ -3185,9 +3271,11 @@ PLAN-ROOT SINK
 |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |
 07:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> tpcds.store_sales.ss_store_sk, RF002 -> tpcds.store_sales.ss_item_sk, RF004 -> tpcds.store_sales.ss_store_sk, RF006 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=76.51MB Threads=17
+Per-Host Resource Estimates: Memory=495MB
 PLAN-ROOT SINK
 |
 27:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3235,7 +3323,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |  |
 |  02:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF008 -> ss_sold_date_sk
 |
 12:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -3280,9 +3368,11 @@ PLAN-ROOT SINK
 |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |
 07:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> tpcds.store_sales.ss_store_sk, RF002 -> tpcds.store_sales.ss_item_sk, RF004 -> tpcds.store_sales.ss_store_sk, RF006 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=153.02MB Threads=21
+Per-Host Resource Estimates: Memory=381MB
 PLAN-ROOT SINK
 |
 27:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3338,7 +3428,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |  |
 |  02:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF008 -> ss_sold_date_sk
 |
 12:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -3395,7 +3485,7 @@ PLAN-ROOT SINK
 |     predicates: d_month_seq <= 1223, d_month_seq >= 1212
 |
 07:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> tpcds.store_sales.ss_store_sk, RF002 -> tpcds.store_sales.ss_item_sk, RF004 -> tpcds.store_sales.ss_store_sk, RF006 -> ss_sold_date_sk
 ====
 # TPCDS-Q68
@@ -3448,6 +3538,8 @@ order by
   ss_ticket_number
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=84.06MB Threads=8
+Per-Host Resource Estimates: Memory=378MB
 PLAN-ROOT SINK
 |
 14:TOP-N [LIMIT=100]
@@ -3505,9 +3597,11 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=136.32MB Threads=16
+Per-Host Resource Estimates: Memory=511MB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3587,9 +3681,11 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=272.64MB Threads=17
+Per-Host Resource Estimates: Memory=574MB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3693,7 +3789,7 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 5 OR household_demographics.hd_vehicle_count = 3)
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF002 -> tpcds.store_sales.ss_customer_sk, RF004 -> store_sales.ss_addr_sk, RF006 -> store_sales.ss_store_sk, RF008 -> store_sales.ss_sold_date_sk, RF010 -> store_sales.ss_hdemo_sk
 ====
 # TPCDS-Q73
@@ -3735,6 +3831,8 @@ order by
   cnt desc
 limit 1000
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=34.07MB Threads=6
+Per-Host Resource Estimates: Memory=298MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=1000]
@@ -3773,13 +3871,15 @@ PLAN-ROOT SINK
 |  |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END > 1
 |  |
 |  00:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 |
 08:SCAN HDFS [tpcds.customer]
    partitions=1/1 files=1 size=12.60MB
    runtime filters: RF000 -> c_customer_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=61.82MB Threads=13
+Per-Host Resource Estimates: Memory=336MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3841,9 +3941,11 @@ PLAN-ROOT SINK
 |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END > 1
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=106.64MB Threads=15
+Per-Host Resource Estimates: Memory=271MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3921,7 +4023,7 @@ PLAN-ROOT SINK
 |     predicates: household_demographics.hd_vehicle_count > 0, household_demographics.hd_buy_potential IN ('>10000', 'unknown'), CASE WHEN household_demographics.hd_vehicle_count > 0 THEN household_demographics.hd_dep_count / household_demographics.hd_vehicle_count ELSE NULL END > 1
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_store_sk, RF004 -> store_sales.ss_sold_date_sk, RF006 -> store_sales.ss_hdemo_sk
 ====
 # TPCDS-Q79
@@ -3968,6 +4070,8 @@ order by
   profit
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=34.07MB Threads=6
+Per-Host Resource Estimates: Memory=298MB
 PLAN-ROOT SINK
 |
 10:TOP-N [LIMIT=100]
@@ -4006,13 +4110,15 @@ PLAN-ROOT SINK
 |  |     predicates: (household_demographics.hd_dep_count = 8 OR household_demographics.hd_vehicle_count > 0)
 |  |
 |  00:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF002 -> store_sales.ss_sold_date_sk, RF004 -> store_sales.ss_store_sk, RF006 -> store_sales.ss_hdemo_sk
 |
 08:SCAN HDFS [tpcds.customer]
    partitions=1/1 files=1 size=12.60MB
    runtime filters: RF000 -> c_customer_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=53.32MB Threads=13
+Per-Host Resource Estimates: Memory=327MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4074,9 +4180,11 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 8 OR household_demographics.hd_vehicle_count > 0)
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_sold_date_sk, RF004 -> store_sales.ss_store_sk, RF006 -> store_sales.ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=99.14MB Threads=15
+Per-Host Resource Estimates: Memory=263MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4154,7 +4262,7 @@ PLAN-ROOT SINK
 |     predicates: (household_demographics.hd_dep_count = 8 OR household_demographics.hd_vehicle_count > 0)
 |
 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 -> tpcds.store_sales.ss_customer_sk, RF002 -> store_sales.ss_sold_date_sk, RF004 -> store_sales.ss_store_sk, RF006 -> store_sales.ss_hdemo_sk
 ====
 # TPCDS-Q89
@@ -4184,6 +4292,8 @@ where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales
 order by sum_sales - avg_monthly_sales, s_store_name
 limit 100) tmp2
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=36.82MB Threads=5
+Per-Host Resource Estimates: Memory=253MB
 PLAN-ROOT SINK
 |
 11:TOP-N [LIMIT=100]
@@ -4227,9 +4337,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Children', 'Music', 'Home') AND i_class IN ('toddlers', 'pop', 'lighting')) OR (i_category IN ('Jewelry', 'Books', 'Sports') AND i_class IN ('costume', 'travel', 'football')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=54.70MB Threads=10
+Per-Host Resource Estimates: Memory=285MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4289,9 +4401,11 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Children', 'Music', 'Home') AND i_class IN ('toddlers', 'pop', 'lighting')) OR (i_category IN ('Jewelry', 'Books', 'Sports') AND i_class IN ('costume', 'travel', 'football')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=109.39MB Threads=11
+Per-Host Resource Estimates: Memory=234MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4363,7 +4477,7 @@ PLAN-ROOT SINK
 |     predicates: ((i_category IN ('Children', 'Music', 'Home') AND i_class IN ('toddlers', 'pop', 'lighting')) OR (i_category IN ('Jewelry', 'Books', 'Sports') AND i_class IN ('costume', 'travel', 'football')))
 |
 01:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_sold_date_sk, RF004 -> ss_item_sk
 ====
 # TPCDS-Q96
@@ -4382,6 +4496,8 @@ WHERE
   AND hd.hd_dep_count = 5
   AND s.s_store_name = 'ese'
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=25.07MB Threads=5
+Per-Host Resource Estimates: Memory=233MB
 PLAN-ROOT SINK
 |
 07:AGGREGATE [FINALIZE]
@@ -4412,9 +4528,11 @@ PLAN-ROOT SINK
 |     predicates: td.t_hour = 8, td.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales ss]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss.ss_store_sk, RF002 -> ss.ss_hdemo_sk, RF004 -> ss.ss_sold_time_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=25.07MB Threads=9
+Per-Host Resource Estimates: Memory=253MB
 PLAN-ROOT SINK
 |
 12:AGGREGATE [FINALIZE]
@@ -4456,9 +4574,11 @@ PLAN-ROOT SINK
 |     predicates: td.t_hour = 8, td.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales ss]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss.ss_store_sk, RF002 -> ss.ss_hdemo_sk, RF004 -> ss.ss_sold_time_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=50.14MB Threads=9
+Per-Host Resource Estimates: Memory=176MB
 PLAN-ROOT SINK
 |
 12:AGGREGATE [FINALIZE]
@@ -4512,7 +4632,7 @@ PLAN-ROOT SINK
 |     predicates: td.t_hour = 8, td.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales ss]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss.ss_store_sk, RF002 -> ss.ss_hdemo_sk, RF004 -> ss.ss_sold_time_sk
 ====
 # TPCDS-Q98
@@ -4547,6 +4667,8 @@ order by
   revenueratio
 limit 1000
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=26.50MB Threads=4
+Per-Host Resource Estimates: Memory=218MB
 PLAN-ROOT SINK
 |
 08:TOP-N [LIMIT=1000]
@@ -4576,7 +4698,7 @@ PLAN-ROOT SINK
 |  runtime filters: RF002 <- ss_item_sk
 |
 |--00:SCAN HDFS [tpcds.store_sales]
-|     partitions=31/1824 files=31 size=3.43MB
+|     partitions=31/1824 files=31 size=3.64MB
 |     runtime filters: RF000 -> ss_sold_date_sk
 |
 01:SCAN HDFS [tpcds.item]
@@ -4584,6 +4706,8 @@ PLAN-ROOT SINK
    predicates: i_category IN ('Jewelry', 'Sports', 'Books')
    runtime filters: RF002 -> i_item_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=58.81MB Threads=9
+Per-Host Resource Estimates: Memory=253MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4633,9 +4757,11 @@ PLAN-ROOT SINK
 09:EXCHANGE [HASH(ss_item_sk)]
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=31/1824 files=31 size=3.43MB
+   partitions=31/1824 files=31 size=3.64MB
    runtime filters: RF000 -> ss_sold_date_sk, RF002 -> ss_item_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=115.75MB Threads=11
+Per-Host Resource Estimates: Memory=200MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4693,7 +4819,7 @@ PLAN-ROOT SINK
 09:EXCHANGE [HASH(ss_item_sk)]
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=31/1824 files=31 size=3.43MB
+   partitions=31/1824 files=31 size=3.64MB
    runtime filters: RF000 -> ss_sold_date_sk, RF002 -> ss_item_sk
 ====
 # TPCD-Q6
@@ -4723,6 +4849,8 @@ select * from (
  having count(*) >= 10
  order by cnt limit 100) as t
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=74.56MB Threads=8
+Per-Host Resource Estimates: Memory=403MB
 PLAN-ROOT SINK
 |
 16:TOP-N [LIMIT=100]
@@ -4789,9 +4917,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF008 -> c.c_current_addr_sk
 |
 02:SCAN HDFS [tpcds.store_sales s]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> s.ss_item_sk, RF006 -> s.ss_sold_date_sk, RF010 -> s.ss_customer_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=89.38MB Threads=19
+Per-Host Resource Estimates: Memory=450MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4894,9 +5024,11 @@ PLAN-ROOT SINK
 |     runtime filters: RF008 -> c.c_current_addr_sk
 |
 02:SCAN HDFS [tpcds.store_sales s]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> s.ss_item_sk, RF006 -> s.ss_sold_date_sk, RF010 -> s.ss_customer_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=178.75MB Threads=22
+Per-Host Resource Estimates: Memory=435MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5023,7 +5155,7 @@ PLAN-ROOT SINK
 |     runtime filters: RF008 -> c.c_current_addr_sk
 |
 02:SCAN HDFS [tpcds.store_sales s]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> s.ss_item_sk, RF006 -> s.ss_sold_date_sk, RF010 -> s.ss_customer_sk
 ====
 # TPCDS-Q47
@@ -5077,6 +5209,8 @@ with v1 as (
  limit 100
  ) as v3
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=171.25MB Threads=13
+Per-Host Resource Estimates: Memory=765MB
 PLAN-ROOT SINK
 |
 35:TOP-N [LIMIT=100]
@@ -5121,7 +5255,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF012 -> ss_store_sk, RF014 -> ss_item_sk, RF016 -> ss_sold_date_sk
 |
 33:HASH JOIN [INNER JOIN]
@@ -5173,7 +5307,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  01:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF006 -> ss_store_sk, RF008 -> ss_item_sk, RF010 -> ss_sold_date_sk
 |
 22:ANALYTIC
@@ -5212,9 +5346,11 @@ PLAN-ROOT SINK
 |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |
 14:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_item_sk, RF004 -> ss_sold_date_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=393.21MB Threads=29
+Per-Host Resource Estimates: Memory=1.33GB
 PLAN-ROOT SINK
 |
 54:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5277,7 +5413,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF012 -> ss_store_sk, RF014 -> ss_item_sk, RF016 -> ss_sold_date_sk
 |
 52:EXCHANGE [HASH(rank(),s_store_name,i_category,s_company_name,i_brand)]
@@ -5345,7 +5481,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  01:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF006 -> ss_store_sk, RF008 -> ss_item_sk, RF010 -> ss_sold_date_sk
 |
 22:ANALYTIC
@@ -5396,9 +5532,11 @@ PLAN-ROOT SINK
 |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |
 14:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_item_sk, RF004 -> ss_sold_date_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=752.42MB Threads=33
+Per-Host Resource Estimates: Memory=1.33GB
 PLAN-ROOT SINK
 |
 54:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5477,7 +5615,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF012 -> ss_store_sk, RF014 -> ss_item_sk, RF016 -> ss_sold_date_sk
 |
 52:EXCHANGE [HASH(rank(),s_store_name,i_category,s_company_name,i_brand)]
@@ -5561,7 +5699,7 @@ PLAN-ROOT SINK
 |  |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |  |
 |  01:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF006 -> ss_store_sk, RF008 -> ss_item_sk, RF010 -> ss_sold_date_sk
 |
 22:ANALYTIC
@@ -5624,7 +5762,7 @@ PLAN-ROOT SINK
 |     predicates: (d_year = 2000 OR (d_year = 1999 AND d_moy = 12) OR (d_year = 2001 AND d_moy = 1))
 |
 14:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF000 -> ss_store_sk, RF002 -> ss_item_sk, RF004 -> ss_sold_date_sk
 ====
 # TPCDS-Q66
@@ -5669,6 +5807,8 @@ from
    and   d_moy  = 11) all_sales
 order by promotions, total
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=111.39MB Threads=14
+Per-Host Resource Estimates: Memory=703MB
 PLAN-ROOT SINK
 |
 27:SORT
@@ -5719,7 +5859,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_year = 2000, d_moy = 11
 |  |
 |  14:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF020 -> ss_sold_date_sk, RF018 -> ss_item_sk, RF014 -> ss_customer_sk
 |
 13:AGGREGATE [FINALIZE]
@@ -5774,9 +5914,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 2000, d_moy = 11
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF010 -> ss_sold_date_sk, RF008 -> ss_item_sk, RF006 -> ss_promo_sk, RF002 -> ss_customer_sk, RF004 -> ss_store_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=121.39MB Threads=30
+Per-Host Resource Estimates: Memory=753MB
 PLAN-ROOT SINK
 |
 27:SORT
@@ -5846,7 +5988,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_year = 2000, d_moy = 11
 |  |
 |  14:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF020 -> ss_sold_date_sk, RF018 -> ss_item_sk, RF014 -> ss_customer_sk
 |
 36:AGGREGATE [FINALIZE]
@@ -5920,9 +6062,11 @@ PLAN-ROOT SINK
 |     predicates: d_year = 2000, d_moy = 11
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF010 -> ss_sold_date_sk, RF008 -> ss_item_sk, RF006 -> ss_promo_sk, RF002 -> ss_customer_sk, RF004 -> ss_store_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=236.78MB Threads=32
+Per-Host Resource Estimates: Memory=617MB
 PLAN-ROOT SINK
 |
 27:SORT
@@ -6016,7 +6160,7 @@ PLAN-ROOT SINK
 |  |     predicates: d_year = 2000, d_moy = 11
 |  |
 |  14:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF020 -> ss_sold_date_sk, RF018 -> ss_item_sk, RF014 -> ss_customer_sk
 |
 36:AGGREGATE [FINALIZE]
@@ -6114,7 +6258,7 @@ PLAN-ROOT SINK
 |     predicates: d_year = 2000, d_moy = 11
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF010 -> ss_sold_date_sk, RF008 -> ss_item_sk, RF006 -> ss_promo_sk, RF002 -> ss_customer_sk, RF004 -> ss_store_sk
 ====
 # TPCDS-Q88
@@ -6209,6 +6353,8 @@ from
           (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2))
      and store.s_store_name = 'ese') s8
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=186.56MB Threads=33
+Per-Host Resource Estimates: Memory=1.81GB
 PLAN-ROOT SINK
 |
 70:NESTED LOOP JOIN [CROSS JOIN]
@@ -6239,7 +6385,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 12, time_dim.t_minute < 30
 |  |
 |  56:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF046 -> ss_sold_time_sk
 |
 69:NESTED LOOP JOIN [CROSS JOIN]
@@ -6270,7 +6416,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute >= 30
 |  |
 |  48:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF040 -> ss_sold_time_sk
 |
 68:NESTED LOOP JOIN [CROSS JOIN]
@@ -6301,7 +6447,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute < 30
 |  |
 |  40:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF034 -> ss_sold_time_sk
 |
 67:NESTED LOOP JOIN [CROSS JOIN]
@@ -6332,7 +6478,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute >= 30
 |  |
 |  32:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF028 -> ss_sold_time_sk
 |
 66:NESTED LOOP JOIN [CROSS JOIN]
@@ -6363,7 +6509,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute < 30
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF022 -> ss_sold_time_sk
 |
 65:NESTED LOOP JOIN [CROSS JOIN]
@@ -6394,7 +6540,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute >= 30
 |  |
 |  16:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF016 -> ss_sold_time_sk
 |
 64:NESTED LOOP JOIN [CROSS JOIN]
@@ -6426,7 +6572,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute < 30
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> ss_sold_time_sk, RF008 -> ss_hdemo_sk
 |
 07:AGGREGATE [FINALIZE]
@@ -6456,9 +6602,11 @@ PLAN-ROOT SINK
 |     predicates: time_dim.t_hour = 8, time_dim.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> ss_sold_time_sk, RF002 -> ss_hdemo_sk
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=186.56MB Threads=72
+Per-Host Resource Estimates: Memory=1.96GB
 PLAN-ROOT SINK
 |
 70:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6502,7 +6650,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 12, time_dim.t_minute < 30
 |  |
 |  56:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF046 -> ss_sold_time_sk
 |
 69:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6546,7 +6694,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute >= 30
 |  |
 |  48:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF040 -> ss_sold_time_sk
 |
 68:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6590,7 +6738,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute < 30
 |  |
 |  40:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF034 -> ss_sold_time_sk
 |
 67:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6634,7 +6782,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute >= 30
 |  |
 |  32:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF028 -> ss_sold_time_sk
 |
 66:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6678,7 +6826,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute < 30
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF022 -> ss_sold_time_sk
 |
 65:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6722,7 +6870,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute >= 30
 |  |
 |  16:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF016 -> ss_sold_time_sk
 |
 64:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6767,7 +6915,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute < 30
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> ss_sold_time_sk, RF008 -> ss_hdemo_sk
 |
 75:AGGREGATE [FINALIZE]
@@ -6808,9 +6956,11 @@ PLAN-ROOT SINK
 |     predicates: time_dim.t_hour = 8, time_dim.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> ss_sold_time_sk, RF002 -> ss_hdemo_sk
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=373.12MB Threads=72
+Per-Host Resource Estimates: Memory=1.34GB
 PLAN-ROOT SINK
 |
 70:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6870,7 +7020,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 12, time_dim.t_minute < 30
 |  |
 |  56:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF046 -> ss_sold_time_sk
 |
 69:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6930,7 +7080,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute >= 30
 |  |
 |  48:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF040 -> ss_sold_time_sk
 |
 68:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -6990,7 +7140,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 11, time_dim.t_minute < 30
 |  |
 |  40:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF034 -> ss_sold_time_sk
 |
 67:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -7050,7 +7200,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute >= 30
 |  |
 |  32:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF028 -> ss_sold_time_sk
 |
 66:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -7110,7 +7260,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 10, time_dim.t_minute < 30
 |  |
 |  24:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF022 -> ss_sold_time_sk
 |
 65:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -7170,7 +7320,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute >= 30
 |  |
 |  16:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF016 -> ss_sold_time_sk
 |
 64:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
@@ -7231,7 +7381,7 @@ PLAN-ROOT SINK
 |  |     predicates: time_dim.t_hour = 9, time_dim.t_minute < 30
 |  |
 |  08:SCAN HDFS [tpcds.store_sales]
-|     partitions=1824/1824 files=1824 size=326.32MB
+|     partitions=1824/1824 files=1824 size=346.60MB
 |     runtime filters: RF010 -> ss_sold_time_sk, RF008 -> ss_hdemo_sk
 |
 75:AGGREGATE [FINALIZE]
@@ -7284,6 +7434,6 @@ PLAN-ROOT SINK
 |     predicates: time_dim.t_hour = 8, time_dim.t_minute >= 30
 |
 00:SCAN HDFS [tpcds.store_sales]
-   partitions=1824/1824 files=1824 size=326.32MB
+   partitions=1824/1824 files=1824 size=346.60MB
    runtime filters: RF004 -> ss_sold_time_sk, RF002 -> ss_hdemo_sk
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
index d4a7d55..510b47b 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
@@ -22,6 +22,8 @@ order by
   l_returnflag,
   l_linestatus
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=2
+Per-Host Resource Estimates: Memory=274MB
 PLAN-ROOT SINK
 |
 02:SORT
@@ -35,6 +37,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l_shipdate <= '1998-09-02'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=23.94MB Threads=4
+Per-Host Resource Estimates: Memory=296MB
 PLAN-ROOT SINK
 |
 05:MERGING-EXCHANGE [UNPARTITIONED]
@@ -57,6 +61,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l_shipdate <= '1998-09-02'
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=47.88MB Threads=5
+Per-Host Resource Estimates: Memory=240MB
 PLAN-ROOT SINK
 |
 05:MERGING-EXCHANGE [UNPARTITIONED]
@@ -126,6 +132,8 @@ order by
   p_partkey
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.39MB Threads=10
+Per-Host Resource Estimates: Memory=628MB
 PLAN-ROOT SINK
 |
 18:TOP-N [LIMIT=100]
@@ -203,6 +211,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF000 -> tpch.partsupp.ps_partkey, RF008 -> ps_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=65.28MB Threads=21
+Per-Host Resource Estimates: Memory=656MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -308,6 +318,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF000 -> tpch.partsupp.ps_partkey, RF008 -> ps_suppkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=126.81MB Threads=23
+Per-Host Resource Estimates: Memory=703MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -471,6 +483,8 @@ order by
   o_orderdate
 limit 10
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=36.44MB Threads=4
+Per-Host Resource Estimates: Memory=516MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=10]
@@ -502,6 +516,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate > '1995-03-15'
    runtime filters: RF002 -> l_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=41.38MB Threads=8
+Per-Host Resource Estimates: Memory=537MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -547,6 +563,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate > '1995-03-15'
    runtime filters: RF002 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=82.75MB Threads=9
+Per-Host Resource Estimates: Memory=483MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -624,6 +642,8 @@ group by
 order by
   o_orderpriority
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=34.00MB Threads=3
+Per-Host Resource Estimates: Memory=458MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -646,6 +666,8 @@ PLAN-ROOT SINK
    predicates: l_commitdate < l_receiptdate
    runtime filters: RF000 -> l_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=42.44MB Threads=7
+Per-Host Resource Estimates: Memory=482MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -681,6 +703,8 @@ PLAN-ROOT SINK
    predicates: l_commitdate < l_receiptdate
    runtime filters: RF000 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=77.38MB Threads=9
+Per-Host Resource Estimates: Memory=430MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -747,6 +771,8 @@ group by
 order by
   revenue desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=49.20MB Threads=7
+Per-Host Resource Estimates: Memory=623MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -801,6 +827,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF005 -> l_suppkey, RF010 -> l_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=70.14MB Threads=14
+Per-Host Resource Estimates: Memory=660MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -874,6 +902,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF005 -> l_suppkey, RF010 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=140.28MB Threads=15
+Per-Host Resource Estimates: Memory=632MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -979,6 +1009,8 @@ where
   and l_discount between 0.05 and 0.07
   and l_quantity < 24
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
+Per-Host Resource Estimates: Memory=274MB
 PLAN-ROOT SINK
 |
 01:AGGREGATE [FINALIZE]
@@ -988,6 +1020,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l_discount <= 0.07, l_discount >= 0.05, l_quantity < 24, l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
+Per-Host Resource Estimates: Memory=284MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -1002,6 +1036,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l_discount <= 0.07, l_discount >= 0.05, l_quantity < 24, l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
+Per-Host Resource Estimates: Memory=206MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -1057,6 +1093,8 @@ order by
   cust_nation,
   l_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=89.69MB Threads=7
+Per-Host Resource Estimates: Memory=648MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -1110,6 +1148,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate <= '1996-12-31', l_shipdate >= '1995-01-01'
    runtime filters: RF006 -> l_suppkey, RF008 -> l_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=103.95MB Threads=15
+Per-Host Resource Estimates: Memory=689MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1184,6 +1224,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate <= '1996-12-31', l_shipdate >= '1995-01-01'
    runtime filters: RF006 -> l_suppkey, RF008 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=194.78MB Threads=17
+Per-Host Resource Estimates: Memory=683MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1318,6 +1360,8 @@ group by
 order by
   o_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.71MB Threads=9
+Per-Host Resource Estimates: Memory=713MB
 PLAN-ROOT SINK
 |
 16:SORT
@@ -1387,6 +1431,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=23.08MB
    runtime filters: RF004 -> c_nationkey, RF006 -> c_custkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=73.34MB Threads=21
+Per-Host Resource Estimates: Memory=751MB
 PLAN-ROOT SINK
 |
 29:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1485,6 +1531,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF008 -> l_suppkey, RF010 -> l_orderkey, RF012 -> l_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=142.92MB Threads=25
+Per-Host Resource Estimates: Memory=715MB
 PLAN-ROOT SINK
 |
 29:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1645,6 +1693,8 @@ order by
   nation,
   o_year desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=114.76MB Threads=7
+Per-Host Resource Estimates: Memory=844MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -1696,6 +1746,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF002 -> l_partkey, RF003 -> l_suppkey, RF006 -> l_suppkey, RF008 -> l_orderkey, RF010 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=140.70MB Threads=15
+Per-Host Resource Estimates: Memory=864MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1768,6 +1820,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF002 -> l_partkey, RF003 -> l_suppkey, RF006 -> l_suppkey, RF008 -> l_orderkey, RF010 -> l_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=247.39MB Threads=17
+Per-Host Resource Estimates: Memory=862MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1896,6 +1950,8 @@ order by
   revenue desc
 limit 20
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=63.94MB Threads=5
+Per-Host Resource Estimates: Memory=549MB
 PLAN-ROOT SINK
 |
 08:TOP-N [LIMIT=20]
@@ -1933,6 +1989,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=23.08MB
    runtime filters: RF000 -> c_nationkey, RF002 -> c_custkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=124.45MB Threads=11
+Per-Host Resource Estimates: Memory=669MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1989,6 +2047,8 @@ PLAN-ROOT SINK
    predicates: l_returnflag = 'R'
    runtime filters: RF004 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=231.89MB Threads=13
+Per-Host Resource Estimates: Memory=697MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2093,6 +2153,8 @@ where
 order by
   value desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=31.77MB Threads=7
+Per-Host Resource Estimates: Memory=492MB
 PLAN-ROOT SINK
 |
 13:SORT
@@ -2148,6 +2210,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF002 -> ps_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=43.70MB Threads=15
+Per-Host Resource Estimates: Memory=540MB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2227,6 +2291,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF002 -> ps_suppkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=87.41MB Threads=16
+Per-Host Resource Estimates: Memory=590MB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2357,6 +2423,8 @@ group by
 order by
   l_shipmode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=51.00MB Threads=3
+Per-Host Resource Estimates: Memory=477MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -2378,6 +2446,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=162.56MB
    runtime filters: RF000 -> o_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=67.94MB Threads=7
+Per-Host Resource Estimates: Memory=508MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2412,6 +2482,8 @@ PLAN-ROOT SINK
    predicates: l_shipmode IN ('MAIL', 'SHIP'), l_commitdate < l_receiptdate, l_receiptdate < '1995-01-01', l_receiptdate >= '1994-01-01', l_shipdate < l_commitdate
    runtime filters: RF000 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=101.88MB Threads=9
+Per-Host Resource Estimates: Memory=454MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2473,6 +2545,8 @@ order by
   custdist desc,
   c_count desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=19.88MB Threads=3
+Per-Host Resource Estimates: Memory=244MB
 PLAN-ROOT SINK
 |
 05:SORT
@@ -2498,6 +2572,8 @@ PLAN-ROOT SINK
    predicates: NOT o_comment LIKE '%special%requests%'
    runtime filters: RF000 -> o_custkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=41.38MB Threads=7
+Per-Host Resource Estimates: Memory=281MB
 PLAN-ROOT SINK
 |
 10:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2536,6 +2612,8 @@ PLAN-ROOT SINK
    predicates: NOT o_comment LIKE '%special%requests%'
    runtime filters: RF000 -> o_custkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=77.12MB Threads=9
+Per-Host Resource Estimates: Memory=320MB
 PLAN-ROOT SINK
 |
 10:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2594,6 +2672,8 @@ where
   and l_shipdate >= '1995-09-01'
   and l_shipdate < '1995-10-01'
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=34.00MB Threads=3
+Per-Host Resource Estimates: Memory=346MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -2611,6 +2691,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate < '1995-10-01', l_shipdate >= '1995-09-01'
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=22.75MB Threads=6
+Per-Host Resource Estimates: Memory=355MB
 PLAN-ROOT SINK
 |
 07:AGGREGATE [FINALIZE]
@@ -2637,6 +2719,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate < '1995-10-01', l_shipdate >= '1995-09-01'
    runtime filters: RF000 -> l_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=41.75MB Threads=7
+Per-Host Resource Estimates: Memory=280MB
 PLAN-ROOT SINK
 |
 07:AGGREGATE [FINALIZE]
@@ -2700,6 +2784,8 @@ where
 order by
   s_suppkey
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=22.88MB Threads=4
+Per-Host Resource Estimates: Memory=581MB
 PLAN-ROOT SINK
 |
 08:SORT
@@ -2735,6 +2821,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=1.33MB
    runtime filters: RF000 -> s_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=44.69MB Threads=10
+Per-Host Resource Estimates: Memory=639MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2794,6 +2882,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
    runtime filters: RF000 -> tpch.lineitem.l_suppkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=87.50MB Threads=12
+Per-Host Resource Estimates: Memory=530MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2894,6 +2984,8 @@ order by
   p_type,
   p_size
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=23.06MB Threads=4
+Per-Host Resource Estimates: Memory=277MB
 PLAN-ROOT SINK
 |
 07:SORT
@@ -2925,6 +3017,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF000 -> ps_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=54.56MB Threads=9
+Per-Host Resource Estimates: Memory=329MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2974,6 +3068,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=112.71MB
    runtime filters: RF000 -> ps_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=101.38MB Threads=11
+Per-Host Resource Estimates: Memory=386MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3051,6 +3147,8 @@ where
       l_partkey = p_partkey
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=32.69MB Threads=4
+Per-Host Resource Estimates: Memory=606MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -3081,6 +3179,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF000 -> tpch.lineitem.l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=38.75MB Threads=8
+Per-Host Resource Estimates: Memory=639MB
 PLAN-ROOT SINK
 |
 12:AGGREGATE [FINALIZE]
@@ -3126,6 +3226,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF000 -> tpch.lineitem.l_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=75.62MB Threads=9
+Per-Host Resource Estimates: Memory=500MB
 PLAN-ROOT SINK
 |
 12:AGGREGATE [FINALIZE]
@@ -3216,6 +3318,8 @@ order by
   o_orderdate
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=92.25MB Threads=5
+Per-Host Resource Estimates: Memory=868MB
 PLAN-ROOT SINK
 |
 09:TOP-N [LIMIT=100]
@@ -3256,6 +3360,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF004 -> l_orderkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=191.12MB Threads=11
+Per-Host Resource Estimates: Memory=996MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3318,6 +3424,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF004 -> l_orderkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=336.88MB Threads=13
+Per-Host Resource Estimates: Memory=991MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3430,6 +3538,8 @@ where
     )
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=19.88MB Threads=3
+Per-Host Resource Estimates: Memory=332MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -3449,6 +3559,8 @@ PLAN-ROOT SINK
    predicates: l_shipmode IN ('AIR', 'AIR REG'), l_shipinstruct = 'DELIVER IN PERSON'
    runtime filters: RF000 -> l_partkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=19.88MB Threads=5
+Per-Host Resource Estimates: Memory=352MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -3475,6 +3587,8 @@ PLAN-ROOT SINK
    predicates: l_shipmode IN ('AIR', 'AIR REG'), l_shipinstruct = 'DELIVER IN PERSON'
    runtime filters: RF000 -> l_partkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=39.75MB Threads=5
+Per-Host Resource Estimates: Memory=278MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -3545,6 +3659,8 @@ where
 order by
   s_name
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=71.75MB Threads=6
+Per-Host Resource Estimates: Memory=612MB
 PLAN-ROOT SINK
 |
 10:SORT
@@ -3592,6 +3708,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> tpch.lineitem.l_suppkey, RF002 -> tpch.lineitem.l_partkey, RF003 -> tpch.lineitem.l_suppkey
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=124.63MB Threads=13
+Per-Host Resource Estimates: Memory=667MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3658,6 +3776,8 @@ PLAN-ROOT SINK
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> tpch.lineitem.l_suppkey, RF002 -> tpch.lineitem.l_partkey, RF003 -> tpch.lineitem.l_suppkey
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=247.39MB Threads=15
+Per-Host Resource Estimates: Memory=675MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3783,6 +3903,8 @@ order by
   s_name
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=58.88MB Threads=7
+Per-Host Resource Estimates: Memory=1.03GB
 PLAN-ROOT SINK
 |
 12:TOP-N [LIMIT=100]
@@ -3838,6 +3960,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l3.l_receiptdate > l3.l_commitdate
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=56.51MB Threads=15
+Per-Host Resource Estimates: Memory=1.05GB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3915,6 +4039,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=718.94MB
    predicates: l3.l_receiptdate > l3.l_commitdate
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=109.27MB Threads=17
+Per-Host Resource Estimates: Memory=841MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4049,6 +4175,8 @@ group by
 order by
   cntrycode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=24.00MB Threads=4
+Per-Host Resource Estimates: Memory=314MB
 PLAN-ROOT SINK
 |
 07:SORT
@@ -4078,6 +4206,8 @@ PLAN-ROOT SINK
 03:SCAN HDFS [tpch.orders]
    partitions=1/1 files=1 size=162.56MB
 ---- DISTRIBUTEDPLAN
+Max Per-Host Resource Reservation: Memory=41.88MB Threads=10
+Per-Host Resource Estimates: Memory=358MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4127,6 +4257,8 @@ PLAN-ROOT SINK
 03:SCAN HDFS [tpch.orders]
    partitions=1/1 files=1 size=162.56MB
 ---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=83.75MB Threads=12
+Per-Host Resource Estimates: Memory=402MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
index 9c4da19..3de3714 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
@@ -21,6 +21,8 @@ order by
   l_returnflag,
   l_linestatus
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=2
+Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
 02:SORT
@@ -79,6 +81,8 @@ order by
   p_partkey
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=18.31MB Threads=10
+Per-Host Resource Estimates: Memory=24MB
 PLAN-ROOT SINK
 |
 18:TOP-N [LIMIT=100]
@@ -173,6 +177,8 @@ order by
   o_orderdate
 limit 10
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=12.38MB Threads=4
+Per-Host Resource Estimates: Memory=20MB
 PLAN-ROOT SINK
 |
 06:TOP-N [LIMIT=10]
@@ -224,6 +230,8 @@ group by
 order by
   o_orderpriority
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=3
+Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -270,6 +278,8 @@ group by
 order by
   revenue desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=15.38MB Threads=7
+Per-Host Resource Estimates: Memory=23MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -329,6 +339,8 @@ where
   and l_discount between 0.05 and 0.07
   and l_quantity < 24
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=0B Threads=2
+Per-Host Resource Estimates: Memory=10MB
 PLAN-ROOT SINK
 |
 01:AGGREGATE [FINALIZE]
@@ -377,6 +389,8 @@ order by
   cust_nation,
   l_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=76.69MB Threads=7
+Per-Host Resource Estimates: Memory=83MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -463,6 +477,8 @@ group by
 order by
   o_year
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=12.56MB Threads=9
+Per-Host Resource Estimates: Memory=18MB
 PLAN-ROOT SINK
 |
 16:SORT
@@ -557,6 +573,8 @@ order by
   nation,
   o_year desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=79.50MB Threads=7
+Per-Host Resource Estimates: Memory=104MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -637,6 +655,8 @@ order by
   revenue desc
 limit 20
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=44.44MB Threads=5
+Per-Host Resource Estimates: Memory=61MB
 PLAN-ROOT SINK
 |
 08:TOP-N [LIMIT=20]
@@ -705,6 +725,8 @@ where
 order by
   value desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=9.69MB Threads=7
+Per-Host Resource Estimates: Memory=28MB
 PLAN-ROOT SINK
 |
 13:SORT
@@ -784,6 +806,8 @@ group by
 order by
   l_shipmode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=35.94MB Threads=3
+Per-Host Resource Estimates: Memory=46MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -826,6 +850,8 @@ order by
   custdist desc,
   c_count desc
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=10.75MB Threads=3
+Per-Host Resource Estimates: Memory=20MB
 PLAN-ROOT SINK
 |
 05:SORT
@@ -864,6 +890,8 @@ where
   and l_shipdate >= '1995-09-01'
   and l_shipdate < '1995-10-01'
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=17.00MB Threads=3
+Per-Host Resource Estimates: Memory=27MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -911,6 +939,8 @@ where
 order by
   s_suppkey
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=15.88MB Threads=4
+Per-Host Resource Estimates: Memory=32MB
 PLAN-ROOT SINK
 |
 08:SORT
@@ -975,6 +1005,8 @@ order by
   p_type,
   p_size
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=16.75MB Threads=4
+Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
 07:SORT
@@ -1023,6 +1055,8 @@ where
       l_partkey = p_partkey
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=8.62MB Threads=4
+Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -1086,6 +1120,8 @@ order by
   o_orderdate
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=81.25MB Threads=5
+Per-Host Resource Estimates: Memory=155MB
 PLAN-ROOT SINK
 |
 09:TOP-N [LIMIT=100]
@@ -1159,6 +1195,8 @@ where
     )
   )
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=2.88MB Threads=3
+Per-Host Resource Estimates: Memory=13MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -1214,6 +1252,8 @@ where
 order by
   s_name
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=50.81MB Threads=6
+Per-Host Resource Estimates: Memory=51MB
 PLAN-ROOT SINK
 |
 10:SORT
@@ -1298,6 +1338,8 @@ order by
   s_name
 limit 100
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=10.56MB Threads=7
+Per-Host Resource Estimates: Memory=12MB
 PLAN-ROOT SINK
 |
 12:TOP-N [LIMIT=100]
@@ -1383,6 +1425,8 @@ group by
 order by
   cntrycode
 ---- PLAN
+Max Per-Host Resource Reservation: Memory=13.94MB Threads=4
+Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
 07:SORT


[4/5] impala git commit: Print DebugString() when hitting DCHECK in BufferPool::Client

Posted by ta...@apache.org.
Print DebugString() when hitting DCHECK in BufferPool::Client

To aid in debugging IMPALA-7402, print a bit more info when hitting the
DCHECK.

Change-Id: I334f323520f2174817c3400e660ce53efb10b16e
Reviewed-on: http://gerrit.cloudera.org:8080/11133
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/75a11d41
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/75a11d41
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/75a11d41

Branch: refs/heads/master
Commit: 75a11d41f714a897b32d5df3217296dbd3fb88a6
Parents: a8d7a50
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Mon Aug 6 15:03:15 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Tue Aug 7 08:48:05 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/bufferpool/buffer-pool-internal.h | 10 +++++++---
 be/src/runtime/bufferpool/buffer-pool.cc         | 12 ++++++++----
 2 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/75a11d41/be/src/runtime/bufferpool/buffer-pool-internal.h
----------------------------------------------------------------------
diff --git a/be/src/runtime/bufferpool/buffer-pool-internal.h b/be/src/runtime/bufferpool/buffer-pool-internal.h
index 64c92e5..4cd8cf9 100644
--- a/be/src/runtime/bufferpool/buffer-pool-internal.h
+++ b/be/src/runtime/bufferpool/buffer-pool-internal.h
@@ -289,22 +289,23 @@ class BufferPool::Client {
     return pinned_pages_.size() < num_pages_;
   }
 
+  /// Print debugging info about the state of the client. Caller must not hold 'lock_'.
   std::string DebugString();
 
  private:
   // Check consistency of client, DCHECK if inconsistent. 'lock_' must be held.
   void DCheckConsistency() {
-    DCHECK_GE(buffers_allocated_bytes_, 0);
+    DCHECK_GE(buffers_allocated_bytes_, 0) << DebugStringLocked();
     pinned_pages_.DCheckConsistency();
     dirty_unpinned_pages_.DCheckConsistency();
     in_flight_write_pages_.DCheckConsistency();
     DCHECK_LE(pinned_pages_.size() + dirty_unpinned_pages_.size()
             + in_flight_write_pages_.size(),
-        num_pages_);
+        num_pages_) << DebugStringLocked();
     // Check that we flushed enough pages to disk given our eviction policy.
     DCHECK_GE(reservation_.GetReservation(), buffers_allocated_bytes_
             + pinned_pages_.bytes() + dirty_unpinned_pages_.bytes()
-            + in_flight_write_pages_.bytes());
+            + in_flight_write_pages_.bytes()) << DebugStringLocked();
   }
 
   /// Must be called once before allocating or reclaiming a buffer of 'len'. Ensures that
@@ -330,6 +331,9 @@ class BufferPool::Client {
   Status StartMoveEvictedToPinned(
       boost::unique_lock<boost::mutex>* client_lock, ClientHandle* client, Page* page);
 
+  /// Same as DebugString() except the caller must already hold 'lock_'.
+  std::string DebugStringLocked();
+
   /// The buffer pool that owns the client.
   BufferPool* const pool_;
 

http://git-wip-us.apache.org/repos/asf/impala/blob/75a11d41/be/src/runtime/bufferpool/buffer-pool.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/bufferpool/buffer-pool.cc b/be/src/runtime/bufferpool/buffer-pool.cc
index 6b51ed3..7169bab 100644
--- a/be/src/runtime/bufferpool/buffer-pool.cc
+++ b/be/src/runtime/bufferpool/buffer-pool.cc
@@ -630,7 +630,7 @@ Status BufferPool::Client::CleanPages(unique_lock<mutex>* client_lock, int64_t l
   // Wait until enough writes have finished so that we can make the allocation without
   // violating the eviction policy. I.e. so that other clients can immediately get the
   // memory they're entitled to without waiting for this client's write to complete.
-  DCHECK_GE(in_flight_write_pages_.bytes(), min_bytes_to_write);
+  DCHECK_GE(in_flight_write_pages_.bytes(), min_bytes_to_write) << DebugStringLocked();
   while (dirty_unpinned_pages_.bytes() + in_flight_write_pages_.bytes()
       > target_dirty_bytes) {
     SCOPED_TIMER(counters().write_wait_time);
@@ -641,8 +641,8 @@ Status BufferPool::Client::CleanPages(unique_lock<mutex>* client_lock, int64_t l
 }
 
 void BufferPool::Client::WriteDirtyPagesAsync(int64_t min_bytes_to_write) {
-  DCHECK_GE(min_bytes_to_write, 0);
-  DCHECK_LE(min_bytes_to_write, dirty_unpinned_pages_.bytes());
+  DCHECK_GE(min_bytes_to_write, 0) << DebugStringLocked();
+  DCHECK_LE(min_bytes_to_write, dirty_unpinned_pages_.bytes()) << DebugStringLocked();
   if (file_group_ == NULL) {
     // Spilling disabled - there should be no unpinned pages to write.
     DCHECK_EQ(0, min_bytes_to_write);
@@ -698,7 +698,7 @@ void BufferPool::Client::WriteCompleteCallback(Page* page, const Status& write_s
 #endif
   {
     unique_lock<mutex> cl(lock_);
-    DCHECK(in_flight_write_pages_.Contains(page));
+    DCHECK(in_flight_write_pages_.Contains(page)) << DebugStringLocked();
     // The status should always be propagated.
     // TODO: if we add cancellation support to TmpFileMgr, consider cancellation path.
     if (!write_status.ok()) write_status_.MergeStatus(write_status);
@@ -732,6 +732,10 @@ void BufferPool::Client::WaitForAllWrites() {
 
 string BufferPool::Client::DebugString() {
   lock_guard<mutex> lock(lock_);
+  return DebugStringLocked();
+}
+
+string BufferPool::Client::DebugStringLocked() {
   stringstream ss;
   ss << Substitute("<BufferPool::Client> $0 name: $1 write_status: $2 "
                    "buffers allocated $3 num_pages: $4 pinned_bytes: $5 "


[3/5] impala git commit: IMPALA-7354: planner test resource estimates for more workloads

Posted by ta...@apache.org.
IMPALA-7354: planner test resource estimates for more workloads

Adds the resource estimates for key benchmark workloads:
TPC-H, TPC-DS, TPC-H Nested and TPC-H Kudu to the planner
test so that we can track changes in resource requirements
and estimates for these queries.

Also don't show decimal places for MB and KB estimates. The
estimates are not accurate to that level and displaying
extra precision has some disadvantages:
* It communicates to readers that the estimates have a high level of
  precision.
* It increases the odds of small variations in file sizes, etc
  causing test failures.

Also fixed a regex in the stress test that didn't escape the decimal
point correctly.

Testing:
Ran core tests.

Change-Id: I6a9f836699200ea87fb03bf36abad0e23949ac26
Reviewed-on: http://gerrit.cloudera.org:8080/11087
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/a8d7a50b
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/a8d7a50b
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/a8d7a50b

Branch: refs/heads/master
Commit: a8d7a50bd51f49c67291915164ad36154e83b8da
Parents: df3f165
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Mon Jul 30 17:31:06 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Tue Aug 7 08:34:33 2018 +0000

----------------------------------------------------------------------
 .../org/apache/impala/common/PrintUtils.java    |  16 +
 .../java/org/apache/impala/planner/Planner.java |   2 +-
 .../org/apache/impala/planner/PlannerTest.java  |  16 +-
 .../apache/impala/planner/PlannerTestBase.java  |  54 ++-
 .../org/apache/impala/util/PrintUtilsTest.java  |  81 ++++
 .../queries/PlannerTest/disable-codegen.test    |  20 +-
 .../queries/PlannerTest/max-row-size.test       |  12 +-
 .../PlannerTest/resource-requirements.test      | 218 +++++------
 .../PlannerTest/spillable-buffer-sizing.test    |  28 +-
 .../queries/PlannerTest/tpcds-all.test          | 372 +++++++++++++------
 .../queries/PlannerTest/tpch-all.test           | 132 +++++++
 .../queries/PlannerTest/tpch-kudu.test          |  44 +++
 .../queries/PlannerTest/tpch-nested.test        | 308 +++++++++------
 .../admission-reject-mem-estimate.test          |   8 +-
 .../queries/QueryTest/stats-extrapolation.test  |   4 +-
 tests/stress/concurrent_select.py               |   2 +-
 16 files changed, 925 insertions(+), 392 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/fe/src/main/java/org/apache/impala/common/PrintUtils.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/common/PrintUtils.java b/fe/src/main/java/org/apache/impala/common/PrintUtils.java
index 9f75134..264518f 100644
--- a/fe/src/main/java/org/apache/impala/common/PrintUtils.java
+++ b/fe/src/main/java/org/apache/impala/common/PrintUtils.java
@@ -49,6 +49,22 @@ public class PrintUtils {
     return bytes + "B";
   }
 
+  /**
+   * Same as printBytes() except 0 decimal points are shown for MB and KB.
+   */
+  public static String printBytesRoundedToMb(long bytes) {
+    double result = bytes;
+    // Avoid String.format() due to IMPALA-1572 which happens on JDK7 but not JDK6.
+    // IMPALA-6759: Please update tests/stress/concurrent_select.py MEM_ESTIMATE_PATTERN
+    // if you add additional unit prefixes.
+    if (bytes >= PETABYTE) return new DecimalFormat(".00PB").format(result / PETABYTE);
+    if (bytes >= TERABYTE) return new DecimalFormat(".00TB").format(result / TERABYTE);
+    if (bytes >= GIGABYTE) return new DecimalFormat(".00GB").format(result / GIGABYTE);
+    if (bytes >= MEGABYTE) return new DecimalFormat("0MB").format(result / MEGABYTE);
+    if (bytes >= KILOBYTE) return new DecimalFormat("0KB").format(result / KILOBYTE);
+    return bytes + "B";
+  }
+
   public static String printCardinality(String prefix, long cardinality) {
     return prefix + "cardinality=" +
         ((cardinality != -1) ? String.valueOf(cardinality) : "unavailable");

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/fe/src/main/java/org/apache/impala/planner/Planner.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/planner/Planner.java b/fe/src/main/java/org/apache/impala/planner/Planner.java
index 1496d9a..818c526 100644
--- a/fe/src/main/java/org/apache/impala/planner/Planner.java
+++ b/fe/src/main/java/org/apache/impala/planner/Planner.java
@@ -273,7 +273,7 @@ public class Planner {
           PrintUtils.printBytes(request.getMax_per_host_min_mem_reservation()),
           request.getMax_per_host_thread_reservation()));
       str.append(String.format("Per-Host Resource Estimates: Memory=%s\n",
-          PrintUtils.printBytes(request.getPer_host_mem_estimate())));
+          PrintUtils.printBytesRoundedToMb(request.getPer_host_mem_estimate())));
       hasHeader = true;
     }
     if (request.query_ctx.disable_codegen_hint) {

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
----------------------------------------------------------------------
diff --git a/fe/src/test/java/org/apache/impala/planner/PlannerTest.java b/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
index 063169d..87cd518 100644
--- a/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
+++ b/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
@@ -228,7 +228,9 @@ public class PlannerTest extends PlannerTestBase {
 
   @Test
   public void testTpch() {
-    runPlannerTestFile("tpch-all", "tpch");
+    runPlannerTestFile("tpch-all", "tpch",
+        ImmutableSet.of(PlannerTestOption.INCLUDE_RESOURCE_HEADER,
+            PlannerTestOption.VALIDATE_RESOURCES));
   }
 
   @Test
@@ -246,7 +248,9 @@ public class PlannerTest extends PlannerTestBase {
 
   @Test
   public void testTpchNested() {
-    runPlannerTestFile("tpch-nested", "tpch_nested_parquet");
+    runPlannerTestFile("tpch-nested", "tpch_nested_parquet",
+        ImmutableSet.of(PlannerTestOption.INCLUDE_RESOURCE_HEADER,
+            PlannerTestOption.VALIDATE_RESOURCES));
   }
 
   @Test
@@ -254,7 +258,9 @@ public class PlannerTest extends PlannerTestBase {
     // Uses ss_sold_date_sk as the partition key of store_sales to allow static partition
     // pruning. The original predicates were rephrased in terms of the ss_sold_date_sk
     // partition key, with the query semantics identical to the original queries.
-    runPlannerTestFile("tpcds-all", "tpcds");
+    runPlannerTestFile("tpcds-all", "tpcds",
+        ImmutableSet.of(PlannerTestOption.INCLUDE_RESOURCE_HEADER,
+            PlannerTestOption.VALIDATE_RESOURCES));
   }
 
   @Test
@@ -367,7 +373,9 @@ public class PlannerTest extends PlannerTestBase {
   @Test
   public void testKuduTpch() {
     Assume.assumeTrue(RuntimeEnv.INSTANCE.isKuduSupported());
-    runPlannerTestFile("tpch-kudu");
+    runPlannerTestFile("tpch-kudu", ImmutableSet.of(
+        PlannerTestOption.INCLUDE_RESOURCE_HEADER,
+        PlannerTestOption.VALIDATE_RESOURCES));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java
----------------------------------------------------------------------
diff --git a/fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java b/fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java
index 0c51036..da5b1bd 100644
--- a/fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java
+++ b/fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java
@@ -23,7 +23,6 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.nio.file.Paths;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -58,7 +57,6 @@ import org.apache.impala.thrift.THdfsPartitionLocation;
 import org.apache.impala.thrift.THdfsScanNode;
 import org.apache.impala.thrift.THdfsTable;
 import org.apache.impala.thrift.TLineageGraph;
-import org.apache.impala.thrift.TNetworkAddress;
 import org.apache.impala.thrift.TPlanExecInfo;
 import org.apache.impala.thrift.TPlanFragment;
 import org.apache.impala.thrift.TPlanNode;
@@ -522,9 +520,8 @@ public class PlannerTestBase extends FrontendTestBase {
     if (execRequest == null) return null;
 
     String explainStr = explainBuilder.toString();
-    if (!testOptions.contains(PlannerTestOption.INCLUDE_EXPLAIN_HEADER)) {
-      explainStr = removeExplainHeader(explainStr);
-    }
+    explainStr = removeExplainHeader(explainBuilder.toString(), testOptions);
+
     actualOutput.append(explainStr);
     LOG.info(section.toString() + ":" + explainStr);
     if (expectedErrorMsg != null) {
@@ -569,8 +566,8 @@ public class PlannerTestBase extends FrontendTestBase {
       queryCtx.client_request.getQuery_options().setExplain_level(origExplainLevel);
     }
     Preconditions.checkNotNull(execRequest);
-    String explainStr = removeExplainHeader(explainBuilder.toString());
-    return explainStr;
+    return removeExplainHeader(
+        explainBuilder.toString(), Collections.<PlannerTestOption>emptySet());
   }
 
   private void checkScanRangeLocations(TestCase testCase, TExecRequest execRequest,
@@ -747,20 +744,28 @@ public class PlannerTestBase extends FrontendTestBase {
   }
 
   /**
-   * Strips out the header containing resource estimates and the warning about missing
-   * stats from the given explain plan, because the estimates can change easily with
-   * stats/cardinality.
+   * If required by 'testOptions', strip out all or part of the the header containing
+   * resource estimates and the warning about missing stats from the given explain plan.
    */
-  private String removeExplainHeader(String explain) {
-    String[] lines = explain.split("\n");
-    // Find the first empty line - the end of the header.
-    for (int i = 0; i < lines.length - 1; ++i) {
-      if (lines[i].isEmpty()) {
-        return Joiner.on("\n").join(Arrays.copyOfRange(lines, i + 1 , lines.length))
-            + "\n";
+  private String removeExplainHeader(String explain, Set<PlannerTestOption> testOptions) {
+    if (testOptions.contains(PlannerTestOption.INCLUDE_EXPLAIN_HEADER)) return explain;
+    boolean keepResources =
+        testOptions.contains(PlannerTestOption.INCLUDE_RESOURCE_HEADER);
+    StringBuilder builder = new StringBuilder();
+    boolean inHeader = true;
+    for (String line: explain.split("\n")) {
+      if (inHeader) {
+        // The first empty line indicates the end of the header.
+        if (line.isEmpty()) {
+          inHeader = false;
+        } else if (keepResources && line.contains("Resource")) {
+          builder.append(line).append("\n");
+        }
+      } else {
+        builder.append(line).append("\n");
       }
     }
-    return explain;
+    return builder.toString();
   }
 
   /**
@@ -772,8 +777,12 @@ public class PlannerTestBase extends FrontendTestBase {
     EXTENDED_EXPLAIN,
     // Include the header of the explain plan (default is to strip the explain header).
     INCLUDE_EXPLAIN_HEADER,
-    // Validate the values of resource requirements (default is to ignore differences
-    // in resource values).
+    // Include the part of the explain header that has top-level resource consumption.
+    // If INCLUDE_EXPLAIN_HEADER is enabled, these are already included.
+    INCLUDE_RESOURCE_HEADER,
+    // Validate the values of resource requirement values within the plan (default is to
+    // ignore differences in resource values). Operator- and fragment-level resource
+    // requirements are only included if EXTENDED_EXPLAIN is also enabled.
     VALIDATE_RESOURCES,
   }
 
@@ -792,6 +801,11 @@ public class PlannerTestBase extends FrontendTestBase {
     runPlannerTestFile(testFile, "default", defaultQueryOptions(), testOptions);
   }
 
+  protected void runPlannerTestFile(
+      String testFile, String dbName, Set<PlannerTestOption> testOptions) {
+    runPlannerTestFile(testFile, dbName, defaultQueryOptions(), testOptions);
+  }
+
   private void runPlannerTestFile(String testFile, String dbName, TQueryOptions options,
         Set<PlannerTestOption> testOptions) {
     String fileName = testDir_.resolve(testFile + ".test").toString();

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/fe/src/test/java/org/apache/impala/util/PrintUtilsTest.java
----------------------------------------------------------------------
diff --git a/fe/src/test/java/org/apache/impala/util/PrintUtilsTest.java b/fe/src/test/java/org/apache/impala/util/PrintUtilsTest.java
new file mode 100644
index 0000000..8f55c7d
--- /dev/null
+++ b/fe/src/test/java/org/apache/impala/util/PrintUtilsTest.java
@@ -0,0 +1,81 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.impala.util;
+
+import static org.junit.Assert.*;
+
+import org.apache.impala.common.PrintUtils;
+import org.junit.Test;
+
+/**
+ * Unit tests for PrintUtils functions.
+ */
+public class PrintUtilsTest {
+
+  @Test
+  public void testPrintBytes() {
+    assertEquals("0B", PrintUtils.printBytes(0L));
+    assertEquals("55B", PrintUtils.printBytes(55L));
+    assertEquals("1023B", PrintUtils.printBytes(1023L));
+    assertEquals("1.00KB", PrintUtils.printBytes(1024L));
+    assertEquals("54.16KB", PrintUtils.printBytes(55463L));
+    assertEquals("54.16KB", PrintUtils.printBytes(55463L));
+    // The exact threshold before rounding is used to choose the unit.
+    // TODO: this behaviour seems fairly harmless but wrong
+    assertEquals("1024.00KB", PrintUtils.printBytes(1024L * 1024L - 1L));
+    assertEquals("1.00MB", PrintUtils.printBytes(1024L * 1024L));
+    assertEquals("1.00MB", PrintUtils.printBytes(1024L * 1024L + 10L));
+    assertEquals("1.00GB", PrintUtils.printBytes(1024L * 1024L * 1024L));
+    assertEquals("1.50GB", PrintUtils.printBytes((long)(1024L * 1024L * 1024L * 1.5)));
+    assertEquals("4.00TB", PrintUtils.printBytes(1024L * 1024L * 1024L * 1024L * 4L));
+    assertEquals("8.42PB",
+        PrintUtils.printBytes((long)(1024L * 1024L * 1024L * 1024L * 1024L * 8.42)));
+
+    // Negative values always get bytes as unit.
+    // TODO: fix this behaviour if needed.
+    assertEquals("-10B", PrintUtils.printBytes(-10L));
+    assertEquals("-123456789B", PrintUtils.printBytes(-123456789L));
+  }
+
+  @Test
+  public void testPrintBytesRoundedToMb() {
+    assertEquals("0B", PrintUtils.printBytesRoundedToMb(0L));
+    assertEquals("55B", PrintUtils.printBytesRoundedToMb(55L));
+    assertEquals("1023B", PrintUtils.printBytesRoundedToMb(1023L));
+    assertEquals("1KB", PrintUtils.printBytesRoundedToMb(1024L));
+    assertEquals("54KB", PrintUtils.printBytesRoundedToMb(55463L));
+    assertEquals("54KB", PrintUtils.printBytesRoundedToMb(55463L));
+    // The exact threshold before rounding is used to choose the unit.
+    // TODO: this behaviour seems fairly harmless but wrong
+    assertEquals("1024KB", PrintUtils.printBytesRoundedToMb(1024L * 1024L - 1L));
+    assertEquals("1MB", PrintUtils.printBytesRoundedToMb(1024L * 1024L));
+    assertEquals("1MB", PrintUtils.printBytesRoundedToMb(1024L * 1024L + 10L));
+    assertEquals("1.00GB", PrintUtils.printBytesRoundedToMb(1024L * 1024L * 1024L));
+    assertEquals("1.50GB",
+        PrintUtils.printBytesRoundedToMb((long)(1024L * 1024L * 1024L * 1.5)));
+    assertEquals("4.00TB",
+        PrintUtils.printBytesRoundedToMb(1024L * 1024L * 1024L * 1024L * 4L));
+    assertEquals("8.42PB", PrintUtils.printBytesRoundedToMb(
+        (long)(1024L * 1024L * 1024L * 1024L * 1024L * 8.42)));
+
+    // Negative values always get bytes as unit.
+    // TODO: fix this behaviour if needed.
+    assertEquals("-10B", PrintUtils.printBytesRoundedToMb(-10L));
+    assertEquals("-123456789B", PrintUtils.printBytesRoundedToMb(-123456789L));
+  }
+}

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/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 2adecc3..3987410 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/disable-codegen.test
@@ -2,7 +2,7 @@
 select count(*) from functional.alltypes
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=148.00MB
+Per-Host Resource Estimates: Memory=148MB
 Codegen disabled by planner
 
 PLAN-ROOT SINK
@@ -22,7 +22,7 @@ PLAN-ROOT SINK
 select count(*) from functional.alltypesagg
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=128.00KB Threads=3
-Per-Host Resource Estimates: Memory=100.00MB
+Per-Host Resource Estimates: Memory=100MB
 
 PLAN-ROOT SINK
 |
@@ -41,7 +41,7 @@ PLAN-ROOT SINK
 select count(*) from functional_parquet.alltypes
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=3
-Per-Host Resource Estimates: Memory=21.00MB
+Per-Host Resource Estimates: Memory=21MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -62,7 +62,7 @@ PLAN-ROOT SINK
 select * from functional_parquet.alltypes
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=88.00KB Threads=3
-Per-Host Resource Estimates: Memory=128.00MB
+Per-Host Resource Estimates: Memory=128MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -79,7 +79,7 @@ from functional.alltypes t1
 join functional.alltypestiny t2 on t1.id = t2.id
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=2.98MB Threads=5
-Per-Host Resource Estimates: Memory=182.94MB
+Per-Host Resource Estimates: Memory=183MB
 Codegen disabled by planner
 
 PLAN-ROOT SINK
@@ -109,7 +109,7 @@ PLAN-ROOT SINK
 select count(*) from functional.alltypes t1, functional.alltypes t2
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=64.00KB Threads=5
-Per-Host Resource Estimates: Memory=276.00MB
+Per-Host Resource Estimates: Memory=276MB
 
 PLAN-ROOT SINK
 |
@@ -138,7 +138,7 @@ select count(*) from (
   select * from functional.alltypestiny) v
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=148.00MB
+Per-Host Resource Estimates: Memory=148MB
 Codegen disabled by planner
 
 PLAN-ROOT SINK
@@ -167,7 +167,7 @@ select count(*) from (
   select * from functional.alltypes) v
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=148.00MB
+Per-Host Resource Estimates: Memory=148MB
 
 PLAN-ROOT SINK
 |
@@ -194,7 +194,7 @@ select sum(l_discount)
 from (select * from tpch.lineitem limit 1000) v
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=274.00MB
+Per-Host Resource Estimates: Memory=274MB
 Codegen disabled by planner
 
 PLAN-ROOT SINK
@@ -215,7 +215,7 @@ select sum(l_discount)
 from (select * from tpch.lineitem where l_orderkey > 100 limit 1000) v
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=274.00MB
+Per-Host Resource Estimates: Memory=274MB
 
 PLAN-ROOT SINK
 |

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/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 cec6162..c228c0b 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
@@ -5,7 +5,7 @@ from tpch_parquet.customer
     inner join tpch_parquet.nation on c_nationkey = n_nationkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=33.97MB Threads=5
-Per-Host Resource Estimates: Memory=57.94MB
+Per-Host Resource Estimates: Memory=58MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -57,7 +57,7 @@ from tpch_parquet.lineitem
     left join tpch_parquet.orders on l_orderkey = o_orderkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=110.00MB Threads=5
-Per-Host Resource Estimates: Memory=420.41MB
+Per-Host Resource Estimates: Memory=420MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -106,7 +106,7 @@ select * from tpch_parquet.lineitem
 where l_orderkey not in (select o_orderkey from tpch_parquet.orders)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=78.00MB Threads=5
-Per-Host Resource Estimates: Memory=154.00MB
+Per-Host Resource Estimates: Memory=154MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -157,7 +157,7 @@ group by 1, 2
 having count(*) = 1
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=125.00MB Threads=7
-Per-Host Resource Estimates: Memory=253.12MB
+Per-Host Resource Estimates: Memory=253MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -278,7 +278,7 @@ from tpch_parquet.lineitem
 group by 1, 2
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=98.00MB Threads=4
-Per-Host Resource Estimates: Memory=482.91MB
+Per-Host Resource Estimates: Memory=483MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -324,7 +324,7 @@ select max(tinyint_col) over(partition by int_col)
 from functional.alltypes
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=40.03MB Threads=4
-Per-Host Resource Estimates: Memory=56.00MB
+Per-Host Resource Estimates: Memory=56MB
 Codegen disabled by planner
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test b/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
index ee9a790..5a2e1c5 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
@@ -2,7 +2,7 @@
 select * from tpch_parquet.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=2
-Per-Host Resource Estimates: Memory=80.00MB
+Per-Host Resource Estimates: Memory=80MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=80.00MB mem-reservation=40.00MB thread-reservation=2
@@ -19,7 +19,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=3
-Per-Host Resource Estimates: Memory=80.00MB
+Per-Host Resource Estimates: Memory=80MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -42,7 +42,7 @@ Per-Host Resources: mem-estimate=80.00MB mem-reservation=40.00MB thread-reservat
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=80.00MB Threads=3
-Per-Host Resource Estimates: Memory=160.00MB
+Per-Host Resource Estimates: Memory=160MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -69,7 +69,7 @@ Per-Host Resources: mem-estimate=160.00MB mem-reservation=80.00MB thread-reserva
 select l_comment from tpch_parquet.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=2
-Per-Host Resource Estimates: Memory=80.00MB
+Per-Host Resource Estimates: Memory=80MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=80.00MB mem-reservation=4.00MB thread-reservation=2
@@ -86,7 +86,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=42B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=3
-Per-Host Resource Estimates: Memory=80.00MB
+Per-Host Resource Estimates: Memory=80MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -109,7 +109,7 @@ Per-Host Resources: mem-estimate=80.00MB mem-reservation=4.00MB thread-reservati
    tuple-ids=0 row-size=42B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=160.00MB
+Per-Host Resource Estimates: Memory=160MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -135,7 +135,7 @@ Per-Host Resources: mem-estimate=160.00MB mem-reservation=8.00MB thread-reservat
 select string_col from functional_parquet.alltypes;
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -155,7 +155,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=16B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=3
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -181,7 +181,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=16.00KB thread-reservat
    tuple-ids=0 row-size=16B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -211,7 +211,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=32.00KB thread-reservat
 select int_col, float_col, string_col from functional_parquet.alltypes;
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=24.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -231,7 +231,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=24B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=24.00KB Threads=3
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -257,7 +257,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=24.00KB thread-reservat
    tuple-ids=0 row-size=24B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=48.00KB Threads=3
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -287,7 +287,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=48.00KB thread-reservat
 select 'foo' from functional_parquet.alltypes
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=2
-Per-Host Resource Estimates: Memory=10.00MB
+Per-Host Resource Estimates: Memory=10MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -307,7 +307,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=0B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=3
-Per-Host Resource Estimates: Memory=10.00MB
+Per-Host Resource Estimates: Memory=10MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -333,7 +333,7 @@ Per-Host Resources: mem-estimate=1.00MB mem-reservation=16.00KB thread-reservati
    tuple-ids=0 row-size=0B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypes
 
@@ -363,7 +363,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=32.00KB thread-reservat
 select c_nationkey from tpch_parquet.customer
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=128.00KB Threads=2
-Per-Host Resource Estimates: Memory=24.00MB
+Per-Host Resource Estimates: Memory=24MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=24.00MB mem-reservation=128.00KB thread-reservation=2
@@ -384,7 +384,7 @@ PLAN-ROOT SINK
 select c_custkey from tpch_parquet.customer
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=2.00MB Threads=2
-Per-Host Resource Estimates: Memory=24.00MB
+Per-Host Resource Estimates: Memory=24MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=24.00MB mem-reservation=2.00MB thread-reservation=2
@@ -406,7 +406,7 @@ PLAN-ROOT SINK
 select c_mktsegment from functional_parquet.customer_multiblock
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=512.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.customer_multiblock
 
@@ -429,7 +429,7 @@ select o_orderkey, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_
 from tpch_nested_parquet.customer.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=24.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=24.00MB thread-reservation=2
@@ -451,7 +451,7 @@ select o_orderkey, pos
 from tpch_nested_parquet.customer.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=4.00MB thread-reservation=2
@@ -473,7 +473,7 @@ select pos
 from tpch_nested_parquet.customer.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=4.00MB thread-reservation=2
@@ -496,7 +496,7 @@ select c_custkey, o_orderkey, o_orderstatus, o_totalprice, o_orderdate, o_orderp
 from tpch_nested_parquet.customer c, c.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=32.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -539,7 +539,7 @@ select c_custkey, o_orderkey, pos
 from tpch_nested_parquet.customer c, c.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -583,7 +583,7 @@ select c_custkey, pos
 from tpch_nested_parquet.customer c, c.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -627,7 +627,7 @@ select c_custkey
 from tpch_nested_parquet.customer c, c.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -670,7 +670,7 @@ select o_orderkey
 from tpch_nested_parquet.customer c, c.c_orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -713,7 +713,7 @@ select c_custkey, o_orderkey, l_comment
 from tpch_nested_parquet.customer c, c.c_orders o, o.o_lineitems
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -773,7 +773,7 @@ PLAN-ROOT SINK
 select * from tpch.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=2
@@ -790,7 +790,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -813,7 +813,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=176.00MB
+Per-Host Resource Estimates: Memory=176MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -839,7 +839,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
 select l_comment from tpch.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=2
@@ -856,7 +856,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=42B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -879,7 +879,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=42B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=176.00MB
+Per-Host Resource Estimates: Memory=176MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -905,7 +905,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
 select * from functional.alltypes
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -924,7 +924,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=97B cardinality=7300
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 Codegen disabled by planner
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -949,7 +949,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=32.00KB thread-reservat
    tuple-ids=0 row-size=97B cardinality=7300
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=64.00KB Threads=3
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 Codegen disabled by planner
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -977,7 +977,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=64.00KB thread-reservat
 select * from tpch_avro.orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_avro.orders
 
@@ -996,7 +996,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=108B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_avro.orders
 
@@ -1021,7 +1021,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=108B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
-Per-Host Resource Estimates: Memory=176.00MB
+Per-Host Resource Estimates: Memory=176MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_avro.orders
 
@@ -1049,7 +1049,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
 select * from tpch_rc.customer
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_rc.customer
 
@@ -1068,7 +1068,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=98B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_rc.customer
 
@@ -1093,7 +1093,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=98B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
-Per-Host Resource Estimates: Memory=64.00MB
+Per-Host Resource Estimates: Memory=64MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_rc.customer
 
@@ -1121,7 +1121,7 @@ Per-Host Resources: mem-estimate=64.00MB mem-reservation=16.00MB thread-reservat
 select * from tpcds_seq_snap.web_returns
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpcds_seq_snap.web_returns
 
@@ -1140,7 +1140,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=104B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpcds_seq_snap.web_returns
 
@@ -1165,7 +1165,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=104B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpcds_seq_snap.web_returns
 
@@ -1193,7 +1193,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=16.00MB thread-reservat
 select * from tpch_orc_def.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=40.00MB
+Per-Host Resource Estimates: Memory=40MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=2
@@ -1213,7 +1213,7 @@ PLAN-ROOT SINK
 select l_comment from tpch_orc_def.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=40.00MB
+Per-Host Resource Estimates: Memory=40MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=2
@@ -1233,7 +1233,7 @@ PLAN-ROOT SINK
 select * from functional_orc_def.alltypes
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=88.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_orc_def.alltypes
 
@@ -1256,7 +1256,7 @@ PLAN-ROOT SINK
 select * from functional.alltypesmixedformat
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=88.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional.alltypesmixedformat
 
@@ -1276,7 +1276,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=88B cardinality=unavailable
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=88.00KB Threads=3
-Per-Host Resource Estimates: Memory=16.00MB
+Per-Host Resource Estimates: Memory=16MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional.alltypesmixedformat
 
@@ -1302,7 +1302,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=88.00KB thread-reservat
    tuple-ids=0 row-size=88B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=176.00KB Threads=5
-Per-Host Resource Estimates: Memory=32.00MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional.alltypesmixedformat
 
@@ -1456,7 +1456,7 @@ union all
 select * from tpch.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=2
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=2
@@ -1487,7 +1487,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1524,7 +1524,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=176.00MB
+Per-Host Resource Estimates: Memory=176MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1566,7 +1566,7 @@ from tpch_parquet.lineitem
 group by l_orderkey
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=38.00MB Threads=2
-Per-Host Resource Estimates: Memory=114.00MB
+Per-Host Resource Estimates: Memory=114MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=114.00MB mem-reservation=38.00MB thread-reservation=2
@@ -1589,7 +1589,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=8B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=46.50MB Threads=4
-Per-Host Resource Estimates: Memory=124.00MB
+Per-Host Resource Estimates: Memory=124MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1630,7 +1630,7 @@ Per-Host Resources: mem-estimate=114.00MB mem-reservation=38.00MB thread-reserva
    tuple-ids=0 row-size=8B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=85.50MB Threads=5
-Per-Host Resource Estimates: Memory=248.00MB
+Per-Host Resource Estimates: Memory=248MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1674,7 +1674,7 @@ Per-Host Resources: mem-estimate=228.00MB mem-reservation=76.00MB thread-reserva
 select count(*) from tpch_parquet.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=128.00KB Threads=2
-Per-Host Resource Estimates: Memory=11.00MB
+Per-Host Resource Estimates: Memory=11MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=11.00MB mem-reservation=128.00KB thread-reservation=2
@@ -1696,7 +1696,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=8B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=128.00KB Threads=3
-Per-Host Resource Estimates: Memory=21.00MB
+Per-Host Resource Estimates: Memory=21MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=10.00MB mem-reservation=0B thread-reservation=1
@@ -1729,7 +1729,7 @@ Per-Host Resources: mem-estimate=11.00MB mem-reservation=128.00KB thread-reserva
    tuple-ids=0 row-size=8B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=256.00KB Threads=3
-Per-Host Resource Estimates: Memory=190.00MB
+Per-Host Resource Estimates: Memory=190MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=10.00MB mem-reservation=0B thread-reservation=1
@@ -1767,7 +1767,7 @@ from tpch_parquet.lineitem
 order by l_comment
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=2
-Per-Host Resource Estimates: Memory=120.00MB
+Per-Host Resource Estimates: Memory=120MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=120.00MB mem-reservation=52.00MB thread-reservation=2
@@ -1789,7 +1789,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=3
-Per-Host Resource Estimates: Memory=120.00MB
+Per-Host Resource Estimates: Memory=120MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1818,7 +1818,7 @@ Per-Host Resources: mem-estimate=120.00MB mem-reservation=52.00MB thread-reserva
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=104.00MB Threads=3
-Per-Host Resource Estimates: Memory=240.00MB
+Per-Host Resource Estimates: Memory=240MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1853,7 +1853,7 @@ order by l_comment
 limit 100
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=2
-Per-Host Resource Estimates: Memory=80.03MB
+Per-Host Resource Estimates: Memory=80MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=80.03MB mem-reservation=40.00MB thread-reservation=2
@@ -1875,7 +1875,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=3
-Per-Host Resource Estimates: Memory=80.03MB
+Per-Host Resource Estimates: Memory=80MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1905,7 +1905,7 @@ Per-Host Resources: mem-estimate=80.03MB mem-reservation=40.00MB thread-reservat
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=80.00MB Threads=3
-Per-Host Resource Estimates: Memory=160.05MB
+Per-Host Resource Estimates: Memory=160MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -1939,7 +1939,7 @@ select *
 from tpch.lineitem inner join tpch.orders on l_orderkey = o_orderkey
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=51.00MB Threads=3
-Per-Host Resource Estimates: Memory=477.41MB
+Per-Host Resource Estimates: Memory=477MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=477.41MB mem-reservation=51.00MB thread-reservation=3 runtime-filters-memory=1.00MB
@@ -1973,7 +1973,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=51.00MB Threads=5
-Per-Host Resource Estimates: Memory=477.41MB
+Per-Host Resource Estimates: Memory=477MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2019,7 +2019,7 @@ Per-Host Resources: mem-estimate=389.41MB mem-reservation=43.00MB thread-reserva
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=102.00MB Threads=5
-Per-Host Resource Estimates: Memory=954.83MB
+Per-Host Resource Estimates: Memory=955MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2077,7 +2077,7 @@ select *
 from tpch.lineitem inner join /* +shuffle */ tpch.orders on l_orderkey = o_orderkey
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=51.00MB Threads=3
-Per-Host Resource Estimates: Memory=477.41MB
+Per-Host Resource Estimates: Memory=477MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=477.41MB mem-reservation=51.00MB thread-reservation=3 runtime-filters-memory=1.00MB
@@ -2111,7 +2111,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=6
-Per-Host Resource Estimates: Memory=278.14MB
+Per-Host Resource Estimates: Memory=278MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2163,7 +2163,7 @@ Per-Host Resources: mem-estimate=89.00MB mem-reservation=9.00MB thread-reservati
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=104.00MB Threads=7
-Per-Host Resource Estimates: Memory=456.14MB
+Per-Host Resource Estimates: Memory=456MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2227,7 +2227,7 @@ select *
 from tpch.lineitem, tpch.orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=449.10MB
+Per-Host Resource Estimates: Memory=449MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=449.10MB mem-reservation=16.00MB thread-reservation=3
@@ -2257,7 +2257,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
-Per-Host Resource Estimates: Memory=449.10MB
+Per-Host Resource Estimates: Memory=449MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2299,7 +2299,7 @@ Per-Host Resources: mem-estimate=361.10MB mem-reservation=8.00MB thread-reservat
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=32.00MB Threads=5
-Per-Host Resource Estimates: Memory=898.21MB
+Per-Host Resource Estimates: Memory=898MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2351,7 +2351,7 @@ Per-Host Resources: mem-estimate=722.21MB mem-reservation=16.00MB thread-reserva
 select * from functional.alltypes where 1 = 2
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=0B Threads=1
-Per-Host Resource Estimates: Memory=10.00MB
+Per-Host Resource Estimates: Memory=10MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2364,7 +2364,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=0B cardinality=0
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=0B Threads=1
-Per-Host Resource Estimates: Memory=10.00MB
+Per-Host Resource Estimates: Memory=10MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2377,7 +2377,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=0B cardinality=0
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=0B Threads=1
-Per-Host Resource Estimates: Memory=10.00MB
+Per-Host Resource Estimates: Memory=10MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2394,7 +2394,7 @@ select max(tinyint_col) over(partition by int_col)
 from functional.alltypes
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=10.03MB Threads=2
-Per-Host Resource Estimates: Memory=26.00MB
+Per-Host Resource Estimates: Memory=26MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2424,7 +2424,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=5B cardinality=7300
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=10.03MB Threads=4
-Per-Host Resource Estimates: Memory=26.00MB
+Per-Host Resource Estimates: Memory=26MB
 Codegen disabled by planner
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2466,7 +2466,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=32.00KB thread-reservat
    tuple-ids=0 row-size=5B cardinality=7300
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=20.06MB Threads=5
-Per-Host Resource Estimates: Memory=52.00MB
+Per-Host Resource Estimates: Memory=52MB
 Codegen disabled by planner
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -2515,7 +2515,7 @@ select *, row_number() over (order by o_totalprice) rnum_price,
 from tpch_parquet.orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=48.00MB Threads=2
-Per-Host Resource Estimates: Memory=70.00MB
+Per-Host Resource Estimates: Memory=70MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=70.00MB mem-reservation=48.00MB thread-reservation=2
@@ -2568,7 +2568,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=68.00MB Threads=3
-Per-Host Resource Estimates: Memory=102.00MB
+Per-Host Resource Estimates: Memory=102MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=44.00MB mem-reservation=32.00MB thread-reservation=1
@@ -2628,7 +2628,7 @@ Per-Host Resources: mem-estimate=58.00MB mem-reservation=36.00MB thread-reservat
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=104.00MB Threads=3
-Per-Host Resource Estimates: Memory=160.00MB
+Per-Host Resource Estimates: Memory=160MB
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=44.00MB mem-reservation=32.00MB thread-reservation=1
@@ -2701,7 +2701,7 @@ from tpch_parquet.lineitem join tpch_parquet.orders on l_orderkey = o_orderkey
 where l_shipmode = 'F'
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=78.00MB Threads=3
-Per-Host Resource Estimates: Memory=142.58MB
+Per-Host Resource Estimates: Memory=143MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=142.58MB mem-reservation=78.00MB thread-reservation=3 runtime-filters-memory=3.00MB
@@ -2806,7 +2806,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=78B cardinality=600122
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=123.75MB Threads=12
-Per-Host Resource Estimates: Memory=348.33MB
+Per-Host Resource Estimates: Memory=348MB
 
 F09:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -2952,7 +2952,7 @@ Per-Host Resources: mem-estimate=81.00MB mem-reservation=25.00MB thread-reservat
    tuple-ids=0 row-size=78B cardinality=600122
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=243.75MB Threads=13
-Per-Host Resource Estimates: Memory=692.91MB
+Per-Host Resource Estimates: Memory=693MB
 
 F09:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -3158,7 +3158,7 @@ order by
 limit 100
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=92.25MB Threads=5
-Per-Host Resource Estimates: Memory=396.18MB
+Per-Host Resource Estimates: Memory=396MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=396.18MB mem-reservation=92.25MB thread-reservation=5 runtime-filters-memory=3.00MB
@@ -3242,7 +3242,7 @@ PLAN-ROOT SINK
    tuple-ids=2 row-size=16B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=191.12MB Threads=11
-Per-Host Resource Estimates: Memory=523.66MB
+Per-Host Resource Estimates: Memory=524MB
 
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -3376,7 +3376,7 @@ Per-Host Resources: mem-estimate=90.00MB mem-reservation=10.00MB thread-reservat
    tuple-ids=2 row-size=16B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=336.88MB Threads=13
-Per-Host Resource Estimates: Memory=991.44MB
+Per-Host Resource Estimates: Memory=991MB
 
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -3541,7 +3541,7 @@ from functional.alltypes
 where year=2009 and month=05
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.03MB
+Per-Host Resource Estimates: Memory=16MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
@@ -3561,7 +3561,7 @@ WRITE TO HDFS [functional.alltypesnopart, OVERWRITE=false]
    tuple-ids=0 row-size=89B cardinality=310
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=2
-Per-Host Resource Estimates: Memory=16.03MB
+Per-Host Resource Estimates: Memory=16MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -3581,7 +3581,7 @@ WRITE TO HDFS [functional.alltypesnopart, OVERWRITE=false]
    tuple-ids=0 row-size=89B cardinality=310
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=64.00KB Threads=2
-Per-Host Resource Estimates: Memory=32.03MB
+Per-Host Resource Estimates: Memory=32MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -3606,7 +3606,7 @@ partitioned by (l_partkey) as
 select l_comment, l_partkey from tpch.lineitem
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=20.00MB Threads=2
-Per-Host Resource Estimates: Memory=306.99MB
+Per-Host Resource Estimates: Memory=307MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=306.99MB mem-reservation=20.00MB thread-reservation=2
@@ -3629,7 +3629,7 @@ WRITE TO HDFS [default.dummy_insert, OVERWRITE=false, PARTITION-KEYS=(l_partkey)
    tuple-ids=0 row-size=50B cardinality=6001215
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=20.00MB Threads=3
-Per-Host Resource Estimates: Memory=202.33MB
+Per-Host Resource Estimates: Memory=202MB
 
 F01:PLAN FRAGMENT [HASH(l_partkey)] hosts=3 instances=3
 |  Per-Host Resources: mem-estimate=114.33MB mem-reservation=12.00MB thread-reservation=1
@@ -3658,7 +3658,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
    tuple-ids=0 row-size=50B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=4
-Per-Host Resource Estimates: Memory=308.33MB
+Per-Host Resource Estimates: Memory=308MB
 
 F01:PLAN FRAGMENT [HASH(l_partkey)] hosts=3 instances=6
 |  Per-Host Resources: mem-estimate=132.33MB mem-reservation=24.00MB thread-reservation=2
@@ -3696,7 +3696,7 @@ from tpch_nested_parquet.customer c,
    order by o1.o_orderkey limit 100) v
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=85.94MB Threads=2
-Per-Host Resource Estimates: Memory=345.94MB
+Per-Host Resource Estimates: Memory=346MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -3759,7 +3759,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=66B cardinality=150000
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=119.94MB Threads=4
-Per-Host Resource Estimates: Memory=473.94MB
+Per-Host Resource Estimates: Memory=474MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -3839,7 +3839,7 @@ Per-Host Resources: mem-estimate=345.94MB mem-reservation=85.94MB thread-reserva
    tuple-ids=0 row-size=66B cardinality=150000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=239.88MB Threads=5
-Per-Host Resource Estimates: Memory=947.88MB
+Per-Host Resource Estimates: Memory=948MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -3928,7 +3928,7 @@ from tpch_nested_parquet.customer c,
    from c.c_orders) v;
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=104.00MB Threads=2
-Per-Host Resource Estimates: Memory=136.00MB
+Per-Host Resource Estimates: Memory=136MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -4001,7 +4001,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=254B cardinality=150000
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=104.00MB Threads=3
-Per-Host Resource Estimates: Memory=136.00MB
+Per-Host Resource Estimates: Memory=136MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -4080,7 +4080,7 @@ Per-Host Resources: mem-estimate=136.00MB mem-reservation=104.00MB thread-reserv
    tuple-ids=0 row-size=254B cardinality=150000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=208.00MB Threads=3
-Per-Host Resource Estimates: Memory=272.00MB
+Per-Host Resource Estimates: Memory=272MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 tpch_nested_parquet.customer
 
@@ -4173,7 +4173,7 @@ join (
 ) v1 on v1.k3 = t1.o_orderkey
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=99.00MB Threads=5
-Per-Host Resource Estimates: Memory=180.00MB
+Per-Host Resource Estimates: Memory=180MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=180.00MB mem-reservation=99.00MB thread-reservation=5 runtime-filters-memory=3.00MB
@@ -4241,7 +4241,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=100.50MB Threads=10
-Per-Host Resource Estimates: Memory=228.27MB
+Per-Host Resource Estimates: Memory=228MB
 
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -4339,7 +4339,7 @@ Per-Host Resources: mem-estimate=78.77MB mem-reservation=59.00MB thread-reservat
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=176.50MB Threads=11
-Per-Host Resource Estimates: Memory=432.03MB
+Per-Host Resource Estimates: Memory=432MB
 
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -4477,7 +4477,7 @@ join (
 ) v1
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=176.00KB Threads=5
-Per-Host Resource Estimates: Memory=137.99MB
+Per-Host Resource Estimates: Memory=138MB
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=137.99MB mem-reservation=176.00KB thread-reservation=5
@@ -4533,7 +4533,7 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=117B cardinality=25
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=176.00KB Threads=9
-Per-Host Resource Estimates: Memory=137.99MB
+Per-Host Resource Estimates: Memory=138MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -4613,7 +4613,7 @@ Per-Host Resources: mem-estimate=87.53MB mem-reservation=32.00KB thread-reservat
    tuple-ids=0 row-size=117B cardinality=25
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=352.00KB Threads=9
-Per-Host Resource Estimates: Memory=275.97MB
+Per-Host Resource Estimates: Memory=276MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -4723,7 +4723,7 @@ sum(smallint_col) over (partition by tinyint_col order by smallint_col
                                                 from functional.alltypesagg
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=18.12MB Threads=2
-Per-Host Resource Estimates: Memory=34.00MB
+Per-Host Resource Estimates: Memory=34MB
 Codegen disabled by planner
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1

http://git-wip-us.apache.org/repos/asf/impala/blob/a8d7a50b/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test b/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
index e849da6..5acc9ae 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
@@ -4,7 +4,7 @@ from tpch_parquet.customer
     inner join tpch_parquet.nation on c_nationkey = n_nationkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=18.97MB Threads=5
-Per-Host Resource Estimates: Memory=42.94MB
+Per-Host Resource Estimates: Memory=43MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -50,7 +50,7 @@ Per-Host Resources: mem-estimate=26.94MB mem-reservation=18.94MB thread-reservat
    tuple-ids=0 row-size=238B cardinality=150000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=37.94MB Threads=5
-Per-Host Resource Estimates: Memory=85.88MB
+Per-Host Resource Estimates: Memory=86MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -109,7 +109,7 @@ from tpch_parquet.lineitem
     left join tpch_parquet.orders on l_orderkey = o_orderkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=98.00MB Threads=5
-Per-Host Resource Estimates: Memory=420.41MB
+Per-Host Resource Estimates: Memory=420MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -153,7 +153,7 @@ Per-Host Resources: mem-estimate=380.41MB mem-reservation=74.00MB thread-reserva
    tuple-ids=0 row-size=263B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=196.00MB Threads=5
-Per-Host Resource Estimates: Memory=840.83MB
+Per-Host Resource Estimates: Memory=841MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -210,7 +210,7 @@ from tpch_parquet.orders
     join /*+shuffle*/ tpch_parquet.customer on o_custkey = c_custkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=76.00MB Threads=6
-Per-Host Resource Estimates: Memory=100.00MB
+Per-Host Resource Estimates: Memory=100MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -262,7 +262,7 @@ Per-Host Resources: mem-estimate=41.00MB mem-reservation=25.00MB thread-reservat
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=118.00MB Threads=7
-Per-Host Resource Estimates: Memory=166.00MB
+Per-Host Resource Estimates: Memory=166MB
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -327,7 +327,7 @@ from tpch_parquet.orders
     join /*+broadcast*/ tpch_parquet.customer on o_custkey = c_custkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=75.00MB Threads=5
-Per-Host Resource Estimates: Memory=102.38MB
+Per-Host Resource Estimates: Memory=102MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -373,7 +373,7 @@ Per-Host Resources: mem-estimate=78.38MB mem-reservation=59.00MB thread-reservat
    tuple-ids=0 row-size=191B cardinality=1500000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=150.00MB Threads=5
-Per-Host Resource Estimates: Memory=204.76MB
+Per-Host Resource Estimates: Memory=205MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -541,7 +541,7 @@ from tpch_parquet.customer
 group by c_nationkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=5.94MB Threads=4
-Per-Host Resource Estimates: Memory=44.00MB
+Per-Host Resource Estimates: Memory=44MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -582,7 +582,7 @@ Per-Host Resources: mem-estimate=34.00MB mem-reservation=4.00MB thread-reservati
    tuple-ids=0 row-size=10B cardinality=150000
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=11.88MB Threads=5
-Per-Host Resource Estimates: Memory=88.00MB
+Per-Host Resource Estimates: Memory=88MB
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -630,7 +630,7 @@ group by 1, 2
 having count(*) = 1
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=99.00MB Threads=7
-Per-Host Resource Estimates: Memory=227.12MB
+Per-Host Resource Estimates: Memory=227MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -701,7 +701,7 @@ Per-Host Resources: mem-estimate=81.00MB mem-reservation=5.00MB thread-reservati
    tuple-ids=0 row-size=8B cardinality=6001215
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=147.00MB Threads=9
-Per-Host Resource Estimates: Memory=363.00MB
+Per-Host Resource Estimates: Memory=363MB
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
@@ -867,7 +867,7 @@ from functional_parquet.alltypestiny
 group by string_col
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=68.01MB Threads=4
-Per-Host Resource Estimates: Memory=272.00MB
+Per-Host Resource Estimates: Memory=272MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypestiny
 
@@ -911,7 +911,7 @@ Per-Host Resources: mem-estimate=144.00MB mem-reservation=34.01MB thread-reserva
    tuple-ids=0 row-size=16B cardinality=unavailable
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=136.02MB Threads=5
-Per-Host Resource Estimates: Memory=544.00MB
+Per-Host Resource Estimates: Memory=544MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional_parquet.alltypestiny
 


[5/5] impala git commit: IMPALA-5031: Fix undefined behavior: ptr overflow

Posted by ta...@apache.org.
IMPALA-5031: Fix undefined behavior: ptr overflow

In expr.add, the standard says:

    When an expression that has integral type is added to or
    subtracted from a pointer, the result has the type of the pointer
    operand. ... If both the pointer operand and the result point to
    elements of the same array object, or one past the last element of
    the array object, the evaluation shall not produce an overflow;
    otherwise, the behavior is undefined.

In the end-to-end tests this is triggered, and the interesting part of
the backtrace is:

include/c++/4.9.2/bits/stl_iterator.h:782:45: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffe8
    #0 __normal_iterator<MemPool::ChunkInfo*, vector<MemPool::ChunkInfo>>::operator+(long) const stl_iterator.h:782:45
    #1 MemPool::AcquireData(MemPool*, bool) runtime/mem-pool.cc:190:62
    #2 RowBatch::TransferResourceOwnership(RowBatch*) runtime/row-batch.cc:444:26
    #3 RowBatch::AcquireState(RowBatch*) runtime/row-batch.cc:505:8
    #4 HdfsScanNode::GetNextInternal(RuntimeState*, RowBatch*, bool*) exec/hdfs-scan-node.cc:105:16
    #5 HdfsScanNode::GetNext(RuntimeState*, RowBatch*, bool*) exec/hdfs-scan-node.cc:81:19
    #6 StreamingAggregationNode::GetRowsStreaming(RuntimeState*, RowBatch*) exec/streaming-aggregation-node.cc:116:51
    #7 StreamingAggregationNode::GetNext(RuntimeState*, RowBatch*, bool*) exec/streaming-aggregation-node.cc:92:41

Change-Id: I3d28a80763adb62572b3dd81ea732d18d957d248
Reviewed-on: http://gerrit.cloudera.org:8080/11118
Reviewed-by: Jim Apple <jb...@apache.org>
Tested-by: Jim Apple <jb...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/b8222003
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/b8222003
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/b8222003

Branch: refs/heads/master
Commit: b8222003f9a0a39ea9b22eefe24f7b70102a5a8b
Parents: 75a11d4
Author: Jim Apple <jb...@apache.org>
Authored: Fri Aug 3 15:31:39 2018 -0700
Committer: Jim Apple <jb...@apache.org>
Committed: Tue Aug 7 16:14:36 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/mem-pool.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/b8222003/be/src/runtime/mem-pool.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/mem-pool.cc b/be/src/runtime/mem-pool.cc
index 8b6a4bf..a489630 100644
--- a/be/src/runtime/mem-pool.cc
+++ b/be/src/runtime/mem-pool.cc
@@ -186,8 +186,10 @@ void MemPool::AcquireData(MemPool* src, bool keep_current) {
 
   src->mem_tracker_->TransferTo(mem_tracker_, total_transfered_bytes);
 
-  // insert new chunks after current_chunk_idx_
-  vector<ChunkInfo>::iterator insert_chunk = chunks_.begin() + current_chunk_idx_ + 1;
+  // insert new chunks after current_chunk_idx_. We must calculate current_chunk_idx_ + 1
+  // before finding the offset from chunks_.begin() because current_chunk_idx_ can be -1
+  // and adding a negative number to chunks_.begin() is undefined behavior in C++.
+  vector<ChunkInfo>::iterator insert_chunk = chunks_.begin() + (current_chunk_idx_ + 1);
   chunks_.insert(insert_chunk, src->chunks_.begin(), end_chunk);
   src->chunks_.erase(src->chunks_.begin(), end_chunk);
   current_chunk_idx_ += num_acquired_chunks;