http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test
index 246891c..3088a58 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test
@@ -10,7 +10,7 @@ PLAN-ROOT SINK
 |  order by: random() ASC
 |  materialized: random()
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=105B cardinality=7300
+|  tuple-ids=1 row-size=97B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -21,7 +21,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # sort on a deterministic expr that exceeds the cost threshold
@@ -36,7 +36,7 @@ PLAN-ROOT SINK
 |  order by: abs(id) + abs(id) ASC
 |  materialized: abs(id) + abs(id)
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=105B cardinality=7300
+|  tuple-ids=1 row-size=97B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -47,7 +47,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # sort on a deterministic expr that doesn't exceed the cost threshold
@@ -61,7 +61,7 @@ PLAN-ROOT SINK
 01:SORT
 |  order by: tinyint_col + 1 ASC
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=97B cardinality=7300
+|  tuple-ids=1 row-size=89B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -72,7 +72,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # sort on multiple exprs, subset is materialized
@@ -88,7 +88,7 @@ PLAN-ROOT SINK
 |  order by: dayofweek(timestamp_col) ASC, TRUE ASC, id + 1 ASC, string_col = 
date_string_col ASC, id = tinyint_col ASC
 |  materialized: dayofweek(timestamp_col), string_col = date_string_col
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=102B cardinality=7300
+|  tuple-ids=1 row-size=94B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -99,7 +99,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # expensive analytic order by expr gets materialized
@@ -116,14 +116,14 @@ PLAN-ROOT SINK
 |  order by: to_date(timestamp_col) ASC, bool_col IS NULL ASC
 |  window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=3,2 row-size=41B cardinality=7300
+|  tuple-ids=3,2 row-size=37B cardinality=7300
 |  in pipelines: 01(GETNEXT)
 |
 01:SORT
 |  order by: to_date(timestamp_col) ASC, bool_col IS NULL ASC
 |  materialized: to_date(timestamp_col)
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=3 row-size=37B cardinality=7300
+|  tuple-ids=3 row-size=33B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -149,8 +149,8 @@ PLAN-ROOT SINK
 01:TOP-N [LIMIT=10]
 |  order by: string_col LIKE 'a.*b' ASC, id * bigint_col ASC, 
regexp_replace(string_col, 'a.*b', 'c') ASC
 |  materialized: string_col LIKE 'a.*b', regexp_replace(string_col, 'a.*b', 
'c')
-|  mem-estimate=290B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=29B cardinality=10
+|  mem-estimate=250B mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=25B cardinality=10
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -161,7 +161,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=29B cardinality=7300
+   tuple-ids=0 row-size=25B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # sort on udf, gets materialized
@@ -176,7 +176,7 @@ PLAN-ROOT SINK
 |  order by: default.testfn(double_col) ASC
 |  materialized: default.testfn(double_col)
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=101B cardinality=7300
+|  tuple-ids=1 row-size=93B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -187,7 +187,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # sort expr contains SlotRefs that don't need to be materialized separately
@@ -202,7 +202,7 @@ PLAN-ROOT SINK
 |  order by: concat(date_string_col, string_col) ASC
 |  materialized: concat(date_string_col, string_col)
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=16B cardinality=7300
+|  tuple-ids=1 row-size=12B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -213,7 +213,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=41B cardinality=7300
+   tuple-ids=0 row-size=33B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # IMPALA-5270: Rand() and udf inside inline view referenced by analytic 
function.

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 2615948..9da9bf1 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/spillable-buffer-sizing.test
@@ -5,19 +5,19 @@ from tpch_parquet.customer
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=18.97MB Threads=5
 Per-Host Resource Estimates: Memory=53MB
-Analyzed query: SELECT
+Analyzed query: SELECT 
 -- +straight_join
 * FROM tpch_parquet.customer INNER JOIN tpch_parquet.nation ON c_nationkey =
 n_nationkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.35MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.33MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.35MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=150000
+|  mem-estimate=10.33MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=327B cardinality=150000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -27,12 +27,12 @@ Per-Host Resources: mem-estimate=26.95MB 
mem-reservation=18.94MB thread-reservat
 |  fk/pk conjuncts: c_nationkey = n_nationkey
 |  runtime filters: RF000[bloom] <- n_nationkey
 |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=150000
+|  tuple-ids=0,1 row-size=327B cardinality=150000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--03:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=117B cardinality=25
+|  |  tuple-ids=1 row-size=109B cardinality=25
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -44,7 +44,7 @@ Per-Host Resources: mem-estimate=26.95MB 
mem-reservation=18.94MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=25
 |     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=1
-|     tuple-ids=1 row-size=117B cardinality=25
+|     tuple-ids=1 row-size=109B cardinality=25
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.customer, RANDOM]
@@ -55,24 +55,24 @@ Per-Host Resources: mem-estimate=26.95MB 
mem-reservation=18.94MB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=150000
    mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=238B cardinality=150000
+   tuple-ids=0 row-size=218B cardinality=150000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=37.94MB Threads=5
 Per-Host Resource Estimates: Memory=97MB
-Analyzed query: SELECT
+Analyzed query: SELECT 
 -- +straight_join
 * FROM tpch_parquet.customer INNER JOIN tpch_parquet.nation ON c_nationkey =
 n_nationkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.71MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.65MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.71MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=150000
+|  mem-estimate=10.65MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=327B cardinality=150000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -83,7 +83,7 @@ Per-Host Resources: mem-estimate=53.88MB 
mem-reservation=37.88MB thread-reservat
 |  fk/pk conjuncts: c_nationkey = n_nationkey
 |  runtime filters: RF000[bloom] <- n_nationkey
 |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=150000
+|  tuple-ids=0,1 row-size=327B cardinality=150000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -95,7 +95,7 @@ Per-Host Resources: mem-estimate=53.88MB 
mem-reservation=37.88MB thread-reservat
 |  |
 |  03:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=117B cardinality=25
+|  |  tuple-ids=1 row-size=109B cardinality=25
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -107,7 +107,7 @@ Per-Host Resources: mem-estimate=53.88MB 
mem-reservation=37.88MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=25
 |     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
-|     tuple-ids=1 row-size=117B cardinality=25
+|     tuple-ids=1 row-size=109B cardinality=25
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.customer, RANDOM]
@@ -118,7 +118,7 @@ Per-Host Resources: mem-estimate=53.88MB 
mem-reservation=37.88MB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=150000
    mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=0
-   tuple-ids=0 row-size=238B cardinality=150000
+   tuple-ids=0 row-size=218B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Join with large build side - should use default-sized buffers.
@@ -127,34 +127,34 @@ 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=442MB
-Analyzed query: SELECT
+Per-Host Resource Estimates: Memory=410MB
+Analyzed query: SELECT 
 -- +straight_join
 * FROM tpch_parquet.lineitem LEFT OUTER JOIN tpch_parquet.orders ON l_orderkey 
=
 o_orderkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=11.35MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=11.20MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.35MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1N row-size=454B cardinality=6001215
+|  mem-estimate=11.20MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1N row-size=402B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=390.80MB mem-reservation=74.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=359.29MB mem-reservation=74.00MB 
thread-reservation=2
 02:HASH JOIN [LEFT OUTER JOIN, BROADCAST]
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1N row-size=454B cardinality=6001215
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=0,1N row-size=402B cardinality=6001215
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=10.38MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=191B cardinality=1500000
+|  |  mem-estimate=10.34MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=171B cardinality=1500000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
@@ -166,7 +166,7 @@ Per-Host Resources: mem-estimate=390.80MB 
mem-reservation=74.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1177135
 |     mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=1
-|     tuple-ids=1 row-size=191B cardinality=1500000
+|     tuple-ids=1 row-size=171B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -174,36 +174,36 @@ Per-Host Resources: mem-estimate=390.80MB 
mem-reservation=74.00MB thread-reserva
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=40.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=196.00MB Threads=5
-Per-Host Resource Estimates: Memory=854MB
-Analyzed query: SELECT
+Per-Host Resource Estimates: Memory=790MB
+Analyzed query: SELECT 
 -- +straight_join
 * FROM tpch_parquet.lineitem LEFT OUTER JOIN tpch_parquet.orders ON l_orderkey 
=
 o_orderkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=12.71MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=12.40MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=12.71MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1N row-size=454B cardinality=6001215
+|  mem-estimate=12.40MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1N row-size=402B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
-Per-Host Resources: mem-estimate=760.83MB mem-reservation=148.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=697.89MB mem-reservation=148.00MB 
thread-reservation=2
 02:HASH JOIN [LEFT OUTER JOIN, BROADCAST]
 |  hash-table-id=00
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1N row-size=454B cardinality=6001215
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=0,1N row-size=402B cardinality=6001215
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -214,8 +214,8 @@ Per-Host Resources: mem-estimate=760.83MB 
mem-reservation=148.00MB thread-reserv
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=10.76MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=191B cardinality=1500000
+|  |  mem-estimate=10.68MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=171B cardinality=1500000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -227,7 +227,7 @@ Per-Host Resources: mem-estimate=760.83MB 
mem-reservation=148.00MB thread-reserv
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1177135
 |     mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=0
-|     tuple-ids=1 row-size=191B cardinality=1500000
+|     tuple-ids=1 row-size=171B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -235,9 +235,9 @@ Per-Host Resources: mem-estimate=760.83MB 
mem-reservation=148.00MB thread-reserv
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=40.00MB thread-reservation=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Shuffle join with mid-sized input.
@@ -245,37 +245,37 @@ select straight_join *
 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=131MB
-Analyzed query: SELECT
+Max Per-Host Resource Reservation: Memory=59.00MB Threads=6
+Per-Host Resource Estimates: Memory=114MB
+Analyzed query: SELECT 
 -- +straight_join
-* FROM tpch_parquet.orders INNER JOIN
+* FROM tpch_parquet.orders INNER JOIN 
 -- +shuffle
 tpch_parquet.customer ON o_custkey = c_custkey
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.85MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.77MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 05:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.85MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=10.77MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(o_custkey)] hosts=2 instances=2
-Per-Host Resources: mem-estimate=55.62MB mem-reservation=35.00MB 
thread-reservation=1 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=38.68MB mem-reservation=18.00MB 
thread-reservation=1 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: o_custkey = c_custkey
 |  fk/pk conjuncts: o_custkey = c_custkey
 |  runtime filters: RF000[bloom] <- c_custkey
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=17.12MB mem-reservation=17.00MB spill-buffer=1.00MB 
thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--04:EXCHANGE [HASH(c_custkey)]
-|  |  mem-estimate=10.24MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=238B cardinality=150000
+|  |  mem-estimate=10.22MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=218B cardinality=150000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -287,12 +287,12 @@ Per-Host Resources: mem-estimate=55.62MB 
mem-reservation=35.00MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=150000
 |     mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=1
-|     tuple-ids=1 row-size=238B cardinality=150000
+|     tuple-ids=1 row-size=218B cardinality=150000
 |     in pipelines: 01(GETNEXT)
 |
 03:EXCHANGE [HASH(o_custkey)]
-|  mem-estimate=10.38MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=191B cardinality=1500000
+|  mem-estimate=10.34MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=171B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
@@ -305,36 +305,36 @@ Per-Host Resources: mem-estimate=41.00MB 
mem-reservation=25.00MB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1177135
    mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=1
-   tuple-ids=0 row-size=191B cardinality=1500000
+   tuple-ids=0 row-size=171B cardinality=1500000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=118.00MB Threads=7
-Per-Host Resource Estimates: Memory=199MB
-Analyzed query: SELECT
+Max Per-Host Resource Reservation: Memory=101.00MB Threads=7
+Per-Host Resource Estimates: Memory=182MB
+Analyzed query: SELECT 
 -- +straight_join
-* FROM tpch_parquet.orders INNER JOIN
+* FROM tpch_parquet.orders INNER JOIN 
 -- +shuffle
 tpch_parquet.customer ON o_custkey = c_custkey
 
 F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=11.70MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=11.55MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 05:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.70MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=11.55MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(o_custkey)] hosts=2 instances=4
-Per-Host Resources: mem-estimate=57.52MB mem-reservation=36.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=40.48MB mem-reservation=19.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=00
 |  hash predicates: o_custkey = c_custkey
 |  fk/pk conjuncts: o_custkey = c_custkey
 |  runtime filters: RF000[bloom] <- c_custkey
-|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=8.56MB mem-reservation=8.50MB spill-buffer=512.00KB 
thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F04:PLAN FRAGMENT [HASH(o_custkey)] hosts=1 instances=2
@@ -345,8 +345,8 @@ Per-Host Resources: mem-estimate=57.52MB 
mem-reservation=36.00MB thread-reservat
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  04:EXCHANGE [HASH(c_custkey)]
-|  |  mem-estimate=10.47MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=238B cardinality=150000
+|  |  mem-estimate=10.43MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=218B cardinality=150000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -358,12 +358,12 @@ Per-Host Resources: mem-estimate=57.52MB 
mem-reservation=36.00MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=150000
 |     mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=0
-|     tuple-ids=1 row-size=238B cardinality=150000
+|     tuple-ids=1 row-size=218B cardinality=150000
 |     in pipelines: 01(GETNEXT)
 |
 03:EXCHANGE [HASH(o_custkey)]
-|  mem-estimate=10.76MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=191B cardinality=1500000
+|  mem-estimate=10.68MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=171B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -376,7 +376,7 @@ Per-Host Resources: mem-estimate=82.00MB 
mem-reservation=50.00MB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1177135
    mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=0
-   tuple-ids=0 row-size=191B cardinality=1500000
+   tuple-ids=0 row-size=171B cardinality=1500000
    in pipelines: 00(GETNEXT)
 ====
 # Broadcast join with mid-sized input - should use larger buffers than shuffle 
join.
@@ -385,36 +385,36 @@ 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=123MB
-Analyzed query: SELECT
+Per-Host Resource Estimates: Memory=120MB
+Analyzed query: SELECT 
 -- +straight_join
-* FROM tpch_parquet.orders INNER JOIN
+* FROM tpch_parquet.orders INNER JOIN 
 -- +broadcast
 tpch_parquet.customer ON o_custkey = c_custkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.85MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.77MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.85MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=10.77MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
-Per-Host Resources: mem-estimate=88.62MB mem-reservation=59.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=85.45MB mem-reservation=59.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: o_custkey = c_custkey
 |  fk/pk conjuncts: o_custkey = c_custkey
 |  runtime filters: RF000[bloom] <- c_custkey
-|  mem-estimate=37.38MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=34.23MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=10.24MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=238B cardinality=150000
+|  |  mem-estimate=10.22MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=218B cardinality=150000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -426,7 +426,7 @@ Per-Host Resources: mem-estimate=88.62MB 
mem-reservation=59.00MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=150000
 |     mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=1
-|     tuple-ids=1 row-size=238B cardinality=150000
+|     tuple-ids=1 row-size=218B cardinality=150000
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.orders, RANDOM]
@@ -437,36 +437,36 @@ Per-Host Resources: mem-estimate=88.62MB 
mem-reservation=59.00MB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1177135
    mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=1
-   tuple-ids=0 row-size=191B cardinality=1500000
+   tuple-ids=0 row-size=171B cardinality=1500000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=150.00MB Threads=5
-Per-Host Resource Estimates: Memory=216MB
-Analyzed query: SELECT
+Per-Host Resource Estimates: Memory=210MB
+Analyzed query: SELECT 
 -- +straight_join
-* FROM tpch_parquet.orders INNER JOIN
+* FROM tpch_parquet.orders INNER JOIN 
 -- +broadcast
 tpch_parquet.customer ON o_custkey = c_custkey
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=11.70MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=11.55MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.70MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=11.55MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
-Per-Host Resources: mem-estimate=156.76MB mem-reservation=118.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=150.47MB mem-reservation=118.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash-table-id=00
 |  hash predicates: o_custkey = c_custkey
 |  fk/pk conjuncts: o_custkey = c_custkey
 |  runtime filters: RF000[bloom] <- c_custkey
-|  mem-estimate=37.38MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=428B cardinality=1500000
+|  mem-estimate=34.23MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=0,1 row-size=388B cardinality=1500000
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -477,8 +477,8 @@ Per-Host Resources: mem-estimate=156.76MB 
mem-reservation=118.00MB thread-reserv
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=10.47MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=238B cardinality=150000
+|  |  mem-estimate=10.43MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=218B cardinality=150000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -490,7 +490,7 @@ Per-Host Resources: mem-estimate=156.76MB 
mem-reservation=118.00MB thread-reserv
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=150000
 |     mem-estimate=24.00MB mem-reservation=16.00MB thread-reservation=0
-|     tuple-ids=1 row-size=238B cardinality=150000
+|     tuple-ids=1 row-size=218B cardinality=150000
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.orders, RANDOM]
@@ -501,7 +501,7 @@ Per-Host Resources: mem-estimate=156.76MB 
mem-reservation=118.00MB thread-reserv
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1177135
    mem-estimate=40.00MB mem-reservation=24.00MB thread-reservation=0
-   tuple-ids=0 row-size=191B cardinality=1500000
+   tuple-ids=0 row-size=171B cardinality=1500000
    in pipelines: 00(GETNEXT)
 ====
 # Join with no stats for right input - should use default buffers.
@@ -513,19 +513,19 @@ Max Per-Host Resource Reservation: Memory=34.17MB 
Threads=5
 Per-Host Resource Estimates: Memory=2.03GB
 WARNING: The following tables are missing relevant table and/or column 
statistics.
 functional_parquet.alltypes, functional_parquet.alltypestiny
-Analyzed query: SELECT
+Analyzed query: SELECT 
 -- +straight_join
 * FROM functional_parquet.alltypes LEFT OUTER JOIN
 functional_parquet.alltypestiny ON alltypes.id = alltypestiny.id
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=551.94KB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=503.95KB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=551.94KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1N row-size=176B cardinality=unavailable
+|  mem-estimate=503.95KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1N row-size=160B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -534,12 +534,12 @@ Per-Host Resources: mem-estimate=2.02GB 
mem-reservation=34.09MB thread-reservati
 |  hash predicates: alltypes.id = alltypestiny.id
 |  fk/pk conjuncts: assumed fk/pk
 |  mem-estimate=2.00GB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1N row-size=176B cardinality=unavailable
+|  tuple-ids=0,1N row-size=160B cardinality=unavailable
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=275.91KB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=88B cardinality=unavailable
+|  |  mem-estimate=251.92KB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=80B cardinality=unavailable
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -552,37 +552,37 @@ Per-Host Resources: mem-estimate=2.02GB 
mem-reservation=34.09MB thread-reservati
 |       columns: unavailable
 |     extrapolated-rows=disabled max-scan-range-rows=unavailable
 |     mem-estimate=16.00MB mem-reservation=88.00KB thread-reservation=1
-|     tuple-ids=1 row-size=88B cardinality=unavailable
+|     tuple-ids=1 row-size=80B cardinality=unavailable
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [functional_parquet.alltypes, RANDOM]
-   partitions=24/24 files=24 size=188.54KB
+   partitions=24/24 files=24 size=189.12KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns missing stats: id, bool_col, tinyint_col, smallint_col, int_col, 
bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=88.00KB thread-reservation=1
-   tuple-ids=0 row-size=88B cardinality=unavailable
+   tuple-ids=0 row-size=80B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=68.34MB Threads=5
 Per-Host Resource Estimates: Memory=4.06GB
 WARNING: The following tables are missing relevant table and/or column 
statistics.
 functional_parquet.alltypestiny
-Analyzed query: SELECT
+Analyzed query: SELECT 
 -- +straight_join
 * FROM functional_parquet.alltypes LEFT OUTER JOIN
 functional_parquet.alltypestiny ON alltypes.id = alltypestiny.id
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=1.08MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=1007.95KB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=1.08MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1N row-size=176B cardinality=unavailable
+|  mem-estimate=1007.95KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1N row-size=160B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -592,7 +592,7 @@ Per-Host Resources: mem-estimate=4.03GB 
mem-reservation=68.17MB thread-reservati
 |  hash predicates: alltypes.id = alltypestiny.id
 |  fk/pk conjuncts: assumed fk/pk
 |  mem-estimate=2.00GB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=0,1N row-size=176B cardinality=unavailable
+|  tuple-ids=0,1N row-size=160B cardinality=unavailable
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F03:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -603,8 +603,8 @@ Per-Host Resources: mem-estimate=4.03GB 
mem-reservation=68.17MB thread-reservati
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  03:EXCHANGE [BROADCAST]
-|  |  mem-estimate=551.91KB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=88B cardinality=unavailable
+|  |  mem-estimate=503.92KB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=80B cardinality=unavailable
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -617,18 +617,18 @@ Per-Host Resources: mem-estimate=4.03GB 
mem-reservation=68.17MB thread-reservati
 |       columns: unavailable
 |     extrapolated-rows=disabled max-scan-range-rows=unavailable
 |     mem-estimate=16.00MB mem-reservation=88.00KB thread-reservation=0
-|     tuple-ids=1 row-size=88B cardinality=unavailable
+|     tuple-ids=1 row-size=80B cardinality=unavailable
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [functional_parquet.alltypes, RANDOM]
-   partitions=24/24 files=24 size=188.54KB
+   partitions=24/24 files=24 size=189.12KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable
      columns missing stats: id, bool_col, tinyint_col, smallint_col, int_col, 
bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=88.00KB thread-reservation=0
-   tuple-ids=0 row-size=88B cardinality=unavailable
+   tuple-ids=0 row-size=80B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Low NDV aggregation - should scale down buffers to minimum.
@@ -739,46 +739,46 @@ from tpch_parquet.lineitem
 group by 1, 2
 having count(*) = 1
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=99.00MB Threads=7
-Per-Host Resource Estimates: Memory=267MB
-Analyzed query: SELECT
+Max Per-Host Resource Reservation: Memory=82.00MB Threads=7
+Per-Host Resource Estimates: Memory=244MB
+Analyzed query: SELECT 
 -- +straight_join
 l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
 tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY CAST(1 AS 
INVALID_TYPE),
 CAST(2 AS INVALID_TYPE) HAVING count(*) = CAST(1 AS BIGINT)
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.11MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.10MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 08:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.11MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=10.10MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 07(GETNEXT)
 |
 F03:PLAN FRAGMENT [HASH(l_orderkey,o_orderstatus)] hosts=3 instances=3
-Per-Host Resources: mem-estimate=44.11MB mem-reservation=34.00MB 
thread-reservation=1
+Per-Host Resources: mem-estimate=27.10MB mem-reservation=17.00MB 
thread-reservation=1
 07:AGGREGATE [FINALIZE]
 |  output: count:merge(*)
 |  group by: l_orderkey, o_orderstatus
 |  having: count(*) = CAST(1 AS BIGINT)
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB 
thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 07(GETNEXT), 00(OPEN)
 |
 06:EXCHANGE [HASH(l_orderkey,o_orderstatus)]
-|  mem-estimate=10.11MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=10.10MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
-Per-Host Resources: mem-estimate=92.22MB mem-reservation=52.00MB 
thread-reservation=1 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=85.65MB mem-reservation=52.00MB 
thread-reservation=1 runtime-filters-memory=1.00MB
 03:AGGREGATE [STREAMING]
 |  output: count(*)
 |  group by: l_orderkey, o_orderstatus
-|  mem-estimate=54.12MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=47.56MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 00(GETNEXT)
 |
 02:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -786,12 +786,12 @@ Per-Host Resources: mem-estimate=92.22MB 
mem-reservation=52.00MB thread-reservat
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
 |  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=33B cardinality=5757710
+|  tuple-ids=0,1 row-size=29B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--05:EXCHANGE [HASH(o_orderkey)]
-|  |  mem-estimate=10.06MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=25B cardinality=1500000
+|  |  mem-estimate=10.05MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=21B cardinality=1500000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
@@ -803,7 +803,7 @@ Per-Host Resources: mem-estimate=92.22MB 
mem-reservation=52.00MB thread-reservat
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1177135
 |     mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=25B cardinality=1500000
+|     tuple-ids=1 row-size=21B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 04:EXCHANGE [HASH(l_orderkey)]
@@ -819,51 +819,51 @@ Per-Host Resources: mem-estimate=81.00MB 
mem-reservation=5.00MB thread-reservati
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=4.00MB thread-reservation=1
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=147.00MB Threads=9
-Per-Host Resource Estimates: Memory=414MB
-Analyzed query: SELECT
+Max Per-Host Resource Reservation: Memory=130.00MB Threads=9
+Per-Host Resource Estimates: Memory=400MB
+Analyzed query: SELECT 
 -- +straight_join
 l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
 tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY CAST(1 AS 
INVALID_TYPE),
 CAST(2 AS INVALID_TYPE) HAVING count(*) = CAST(1 AS BIGINT)
 
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.22MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.19MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 08:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.22MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=10.19MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 07(GETNEXT)
 |
 F03:PLAN FRAGMENT [HASH(l_orderkey,o_orderstatus)] hosts=3 instances=6
-Per-Host Resources: mem-estimate=54.43MB mem-reservation=34.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=40.39MB mem-reservation=17.00MB 
thread-reservation=2
 07:AGGREGATE [FINALIZE]
 |  output: count:merge(*)
 |  group by: l_orderkey, o_orderstatus
 |  having: count(*) = CAST(1 AS BIGINT)
-|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB 
thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=10.00MB mem-reservation=8.50MB spill-buffer=512.00KB 
thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 07(GETNEXT), 00(OPEN)
 |
 06:EXCHANGE [HASH(l_orderkey,o_orderstatus)]
-|  mem-estimate=10.22MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=10.19MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
-Per-Host Resources: mem-estimate=107.23MB mem-reservation=87.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=107.20MB mem-reservation=87.00MB 
thread-reservation=2 runtime-filters-memory=1.00MB
 03:AGGREGATE [STREAMING]
 |  output: count(*)
 |  group by: l_orderkey, o_orderstatus
 |  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  tuple-ids=2 row-size=29B cardinality=4690314
 |  in pipelines: 00(GETNEXT)
 |
 02:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -872,7 +872,7 @@ Per-Host Resources: mem-estimate=107.23MB 
mem-reservation=87.00MB thread-reserva
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
 |  mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB 
thread-reservation=0
-|  tuple-ids=0,1 row-size=33B cardinality=5757710
+|  tuple-ids=0,1 row-size=29B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F05:PLAN FRAGMENT [HASH(l_orderkey)] hosts=2 instances=4
@@ -883,8 +883,8 @@ Per-Host Resources: mem-estimate=107.23MB 
mem-reservation=87.00MB thread-reserva
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  05:EXCHANGE [HASH(o_orderkey)]
-|  |  mem-estimate=10.11MB mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1 row-size=25B cardinality=1500000
+|  |  mem-estimate=10.10MB mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1 row-size=21B cardinality=1500000
 |  |  in pipelines: 01(GETNEXT)
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -896,7 +896,7 @@ Per-Host Resources: mem-estimate=107.23MB 
mem-reservation=87.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1177135
 |     mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=0
-|     tuple-ids=1 row-size=25B cardinality=1500000
+|     tuple-ids=1 row-size=21B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 04:EXCHANGE [HASH(l_orderkey)]
@@ -912,7 +912,7 @@ Per-Host Resources: mem-estimate=162.00MB 
mem-reservation=10.00MB thread-reserva
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=4.00MB thread-reservation=0
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
@@ -922,38 +922,38 @@ select distinct *
 from tpch_parquet.lineitem
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=108.00MB Threads=4
-Per-Host Resource Estimates: Memory=1.71GB
+Per-Host Resource Estimates: Memory=1.52GB
 Analyzed query: SELECT DISTINCT * FROM tpch_parquet.lineitem
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.78MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.69MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 03(GETNEXT)
 |
 F01:PLAN FRAGMENT 
[HASH(tpch_parquet.lineitem.l_orderkey,tpch_parquet.lineitem.l_partkey,tpch_parquet.lineitem.l_suppkey,tpch_parquet.lineitem.l_linenumber,tpch_parquet.lineitem.l_quantity,tpch_parquet.lineitem.l_extendedprice,tpch_parquet.lineitem.l_discount,tpch_parquet.lineitem.l_tax,tpch_parquet.lineitem.l_returnflag,tpch_parquet.lineitem.l_linestatus,tpch_parquet.lineitem.l_shipdate,tpch_parquet.lineitem.l_commitdate,tpch_parquet.lineitem.l_receiptdate,tpch_parquet.lineitem.l_shipinstruct,tpch_parquet.lineitem.l_shipmode,tpch_parquet.lineitem.l_comment)]
 hosts=3 instances=3
-Per-Host Resources: mem-estimate=837.94MB mem-reservation=34.00MB 
thread-reservation=1
+Per-Host Resources: mem-estimate=737.12MB mem-reservation=34.00MB 
thread-reservation=1
 03:AGGREGATE [FINALIZE]
 |  group by: tpch_parquet.lineitem.l_orderkey, 
tpch_parquet.lineitem.l_partkey, tpch_parquet.lineitem.l_suppkey, 
tpch_parquet.lineitem.l_linenumber, tpch_parquet.lineitem.l_quantity, 
tpch_parquet.lineitem.l_extendedprice, tpch_parquet.lineitem.l_discount, 
tpch_parquet.lineitem.l_tax, tpch_parquet.lineitem.l_returnflag, 
tpch_parquet.lineitem.l_linestatus, tpch_parquet.lineitem.l_shipdate, 
tpch_parquet.lineitem.l_commitdate, tpch_parquet.lineitem.l_receiptdate, 
tpch_parquet.lineitem.l_shipinstruct, tpch_parquet.lineitem.l_shipmode, 
tpch_parquet.lineitem.l_comment
-|  mem-estimate=827.16MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=726.43MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 03(GETNEXT), 00(OPEN)
 |
 02:EXCHANGE 
[HASH(tpch_parquet.lineitem.l_orderkey,tpch_parquet.lineitem.l_partkey,tpch_parquet.lineitem.l_suppkey,tpch_parquet.lineitem.l_linenumber,tpch_parquet.lineitem.l_quantity,tpch_parquet.lineitem.l_extendedprice,tpch_parquet.lineitem.l_discount,tpch_parquet.lineitem.l_tax,tpch_parquet.lineitem.l_returnflag,tpch_parquet.lineitem.l_linestatus,tpch_parquet.lineitem.l_shipdate,tpch_parquet.lineitem.l_commitdate,tpch_parquet.lineitem.l_receiptdate,tpch_parquet.lineitem.l_shipinstruct,tpch_parquet.lineitem.l_shipmode,tpch_parquet.lineitem.l_comment)]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=907.16MB mem-reservation=74.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=806.43MB mem-reservation=74.00MB 
thread-reservation=2
 01:AGGREGATE [STREAMING]
 |  group by: tpch_parquet.lineitem.l_orderkey, 
tpch_parquet.lineitem.l_partkey, tpch_parquet.lineitem.l_suppkey, 
tpch_parquet.lineitem.l_linenumber, tpch_parquet.lineitem.l_quantity, 
tpch_parquet.lineitem.l_extendedprice, tpch_parquet.lineitem.l_discount, 
tpch_parquet.lineitem.l_tax, tpch_parquet.lineitem.l_returnflag, 
tpch_parquet.lineitem.l_linestatus, tpch_parquet.lineitem.l_shipdate, 
tpch_parquet.lineitem.l_commitdate, tpch_parquet.lineitem.l_receiptdate, 
tpch_parquet.lineitem.l_shipinstruct, tpch_parquet.lineitem.l_shipmode, 
tpch_parquet.lineitem.l_comment
-|  mem-estimate=827.16MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=726.43MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -961,44 +961,44 @@ Per-Host Resources: mem-estimate=907.16MB 
mem-reservation=74.00MB thread-reserva
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=40.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=216.00MB Threads=5
-Per-Host Resource Estimates: Memory=1.81GB
+Per-Host Resource Estimates: Memory=1.61GB
 Analyzed query: SELECT DISTINCT * FROM tpch_parquet.lineitem
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=11.56MB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=11.38MB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 03(GETNEXT)
 |
 F01:PLAN FRAGMENT 
[HASH(tpch_parquet.lineitem.l_orderkey,tpch_parquet.lineitem.l_partkey,tpch_parquet.lineitem.l_suppkey,tpch_parquet.lineitem.l_linenumber,tpch_parquet.lineitem.l_quantity,tpch_parquet.lineitem.l_extendedprice,tpch_parquet.lineitem.l_discount,tpch_parquet.lineitem.l_tax,tpch_parquet.lineitem.l_returnflag,tpch_parquet.lineitem.l_linestatus,tpch_parquet.lineitem.l_shipdate,tpch_parquet.lineitem.l_commitdate,tpch_parquet.lineitem.l_receiptdate,tpch_parquet.lineitem.l_shipinstruct,tpch_parquet.lineitem.l_shipmode,tpch_parquet.lineitem.l_comment)]
 hosts=3 instances=6
-Per-Host Resources: mem-estimate=850.29MB mem-reservation=68.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=749.19MB mem-reservation=68.00MB 
thread-reservation=2
 03:AGGREGATE [FINALIZE]
 |  group by: tpch_parquet.lineitem.l_orderkey, 
tpch_parquet.lineitem.l_partkey, tpch_parquet.lineitem.l_suppkey, 
tpch_parquet.lineitem.l_linenumber, tpch_parquet.lineitem.l_quantity, 
tpch_parquet.lineitem.l_extendedprice, tpch_parquet.lineitem.l_discount, 
tpch_parquet.lineitem.l_tax, tpch_parquet.lineitem.l_returnflag, 
tpch_parquet.lineitem.l_linestatus, tpch_parquet.lineitem.l_shipdate, 
tpch_parquet.lineitem.l_commitdate, tpch_parquet.lineitem.l_receiptdate, 
tpch_parquet.lineitem.l_shipinstruct, tpch_parquet.lineitem.l_shipmode, 
tpch_parquet.lineitem.l_comment
-|  mem-estimate=413.58MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=363.22MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 03(GETNEXT), 00(OPEN)
 |
 02:EXCHANGE 
[HASH(tpch_parquet.lineitem.l_orderkey,tpch_parquet.lineitem.l_partkey,tpch_parquet.lineitem.l_suppkey,tpch_parquet.lineitem.l_linenumber,tpch_parquet.lineitem.l_quantity,tpch_parquet.lineitem.l_extendedprice,tpch_parquet.lineitem.l_discount,tpch_parquet.lineitem.l_tax,tpch_parquet.lineitem.l_returnflag,tpch_parquet.lineitem.l_linestatus,tpch_parquet.lineitem.l_shipdate,tpch_parquet.lineitem.l_commitdate,tpch_parquet.lineitem.l_receiptdate,tpch_parquet.lineitem.l_shipinstruct,tpch_parquet.lineitem.l_shipmode,tpch_parquet.lineitem.l_comment)]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
-Per-Host Resources: mem-estimate=987.16MB mem-reservation=148.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=886.43MB mem-reservation=148.00MB 
thread-reservation=2
 01:AGGREGATE [STREAMING]
 |  group by: tpch_parquet.lineitem.l_orderkey, 
tpch_parquet.lineitem.l_partkey, tpch_parquet.lineitem.l_suppkey, 
tpch_parquet.lineitem.l_linenumber, tpch_parquet.lineitem.l_quantity, 
tpch_parquet.lineitem.l_extendedprice, tpch_parquet.lineitem.l_discount, 
tpch_parquet.lineitem.l_tax, tpch_parquet.lineitem.l_returnflag, 
tpch_parquet.lineitem.l_linestatus, tpch_parquet.lineitem.l_shipdate, 
tpch_parquet.lineitem.l_commitdate, tpch_parquet.lineitem.l_receiptdate, 
tpch_parquet.lineitem.l_shipinstruct, tpch_parquet.lineitem.l_shipmode, 
tpch_parquet.lineitem.l_comment
-|  mem-estimate=413.58MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=363.22MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -1006,9 +1006,9 @@ Per-Host Resources: mem-estimate=987.16MB 
mem-reservation=148.00MB thread-reserv
    stored statistics:
      table: rows=6001215 size=193.72MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=2141530
+   extrapolated-rows=disabled max-scan-range-rows=2141609
    mem-estimate=80.00MB mem-reservation=40.00MB thread-reservation=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Aggregation with unknown input - should use default buffer size.
@@ -1024,27 +1024,27 @@ Analyzed query: SELECT string_col, count(*) FROM 
functional_parquet.alltypestiny
 GROUP BY string_col
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=83.99KB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=71.99KB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=83.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  mem-estimate=71.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 03(GETNEXT)
 |
 F01:PLAN FRAGMENT [HASH(string_col)] hosts=3 instances=3
-Per-Host Resources: mem-estimate=128.08MB mem-reservation=34.00MB 
thread-reservation=1
+Per-Host Resources: mem-estimate=128.07MB mem-reservation=34.00MB 
thread-reservation=1
 03:AGGREGATE [FINALIZE]
 |  output: count:merge(*)
 |  group by: string_col
 |  mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 03(GETNEXT), 00(OPEN)
 |
 02:EXCHANGE [HASH(string_col)]
-|  mem-estimate=83.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  mem-estimate=71.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -1053,7 +1053,7 @@ Per-Host Resources: mem-estimate=144.00MB 
mem-reservation=34.01MB thread-reserva
 |  output: count(*)
 |  group by: string_col
 |  mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [functional_parquet.alltypestiny, RANDOM]
@@ -1064,7 +1064,7 @@ Per-Host Resources: mem-estimate=144.00MB 
mem-reservation=34.01MB thread-reserva
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=8.00KB thread-reservation=1
-   tuple-ids=0 row-size=16B cardinality=unavailable
+   tuple-ids=0 row-size=12B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=136.02MB Threads=5
@@ -1075,27 +1075,27 @@ Analyzed query: SELECT string_col, count(*) FROM 
functional_parquet.alltypestiny
 GROUP BY string_col
 
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=167.99KB mem-reservation=0B 
thread-reservation=1
+|  Per-Host Resources: mem-estimate=143.99KB mem-reservation=0B 
thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=167.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  mem-estimate=143.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 03(GETNEXT)
 |
 F01:PLAN FRAGMENT [HASH(string_col)] hosts=3 instances=6
-Per-Host Resources: mem-estimate=256.33MB mem-reservation=68.00MB 
thread-reservation=2
+Per-Host Resources: mem-estimate=256.28MB mem-reservation=68.00MB 
thread-reservation=2
 03:AGGREGATE [FINALIZE]
 |  output: count:merge(*)
 |  group by: string_col
 |  mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 03(GETNEXT), 00(OPEN)
 |
 02:EXCHANGE [HASH(string_col)]
-|  mem-estimate=167.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  mem-estimate=143.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -1104,7 +1104,7 @@ Per-Host Resources: mem-estimate=288.00MB 
mem-reservation=68.02MB thread-reserva
 |  output: count(*)
 |  group by: string_col
 |  mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB 
thread-reservation=0
-|  tuple-ids=1 row-size=24B cardinality=unavailable
+|  tuple-ids=1 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [functional_parquet.alltypestiny, RANDOM]
@@ -1115,6 +1115,6 @@ Per-Host Resources: mem-estimate=288.00MB 
mem-reservation=68.02MB thread-reserva
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=8.00KB thread-reservation=0
-   tuple-ids=0 row-size=16B cardinality=unavailable
+   tuple-ids=0 row-size=12B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
index 5b82705..7404491 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
@@ -2021,18 +2021,18 @@ select 1 from functional.alltypes t where id in
 ---- PLAN
 PLAN-ROOT SINK
 |
-02:HASH JOIN [LEFT SEMI JOIN]
+02:HASH JOIN [RIGHT SEMI JOIN]
 |  hash predicates: id = id
 |  other join predicates: a.tinyint_col >= t.tinyint_col, t.float_col >= 
a.float_col, a.smallint_col <= t.int_col, a.tinyint_col <= t.smallint_col, 
t.float_col <= a.double_col, a.double_col <= CAST(t.string_col AS INT), 
t.string_col >= a.string_col, a.double_col >= round(acos(t.float_col), 2)
 |  runtime filters: RF000 <- id
 |
-|--01:SCAN HDFS [functional.alltypesagg a]
-|     partitions=11/11 files=11 size=814.73KB
-|     predicates: a.int_col >= 20, a.smallint_col >= 10
+|--00:SCAN HDFS [functional.alltypes t]
+|     partitions=24/24 files=24 size=478.45KB
+|     predicates: t.bigint_col <= 20, t.string_col <= t.date_string_col
 |
-00:SCAN HDFS [functional.alltypes t]
-   partitions=24/24 files=24 size=478.45KB
-   predicates: t.bigint_col <= 20, t.string_col <= t.date_string_col
+01:SCAN HDFS [functional.alltypesagg a]
+   partitions=11/11 files=11 size=814.73KB
+   predicates: a.int_col >= 20, a.smallint_col >= 10
    runtime filters: RF000 -> id
 ====
 # IMPALA-4423: Correlated EXISTS and NOT EXISTS subqueries with aggregates. 
Both
@@ -2338,7 +2338,7 @@ PLAN-ROOT SINK
 01:SCAN HDFS [functional.alltypestiny]
    partitions=4/4 files=4 size=460B
    predicates: id < 5
-=======
+====
 # Subquery in binary predicate that needs cardinality check at runtime
 select bigint_col from functional.alltypes where id =
   (select id

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/tablesample.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/tablesample.test 
b/testdata/workloads/functional-planner/queries/PlannerTest/tablesample.test
index c7e09cc..6d434e5 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tablesample.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tablesample.test
@@ -14,7 +14,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=2449
    mem-estimate=32.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=730
+   tuple-ids=0 row-size=89B cardinality=730
    in pipelines: 00(GETNEXT)
 ====
 # Sample 50%
@@ -33,7 +33,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=621
    mem-estimate=80.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=3650
+   tuple-ids=0 row-size=89B cardinality=3650
    in pipelines: 00(GETNEXT)
 ====
 # Sampling and scan predicates. Scan predicates are evaluated after sampling 
and
@@ -55,7 +55,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=621
    mem-estimate=80.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=365
+   tuple-ids=0 row-size=89B cardinality=365
    in pipelines: 00(GETNEXT)
 ====
 # Partition pruning + sampling. Partition pruning happens before sampling.
@@ -75,7 +75,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1241
    mem-estimate=48.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=1825
+   tuple-ids=0 row-size=89B cardinality=1825
    in pipelines: 00(GETNEXT)
 ====
 # Edge case: sample 0%, no files should be selected
@@ -94,7 +94,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=0
    mem-estimate=0B mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=97B cardinality=0
+   tuple-ids=0 row-size=89B cardinality=0
    in pipelines: 00(GETNEXT)
 ====
 # Edge case: sample 1%, at least one file should be selected
@@ -113,7 +113,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=7300
    mem-estimate=32.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=73
+   tuple-ids=0 row-size=89B cardinality=73
    in pipelines: 00(GETNEXT)
 ====
 # Edge case: sample 1% and prune partitions, at least one file should be 
selected
@@ -133,7 +133,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=7300
    mem-estimate=32.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=37
+   tuple-ids=0 row-size=89B cardinality=37
    in pipelines: 00(GETNEXT)
 ====
 # Edge case: sample 100%, all files should be selected
@@ -152,7 +152,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # Table that has no stats.
@@ -164,7 +164,7 @@ PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=3/24 files=3 size=24.14KB
+   partitions=3/24 files=3 size=24.18KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/24 rows=unavailable

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 095f94d..da86c5e 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test
@@ -102,7 +102,7 @@ PLAN-ROOT SINK
    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=168MB
+Per-Host Resource Estimates: Memory=167MB
 PLAN-ROOT SINK
 |
 12:MERGING-EXCHANGE [UNPARTITIONED]
@@ -233,7 +233,7 @@ PLAN-ROOT SINK
    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=461MB
+Per-Host Resource Estimates: Memory=460MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -446,8 +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
+Max Per-Host Resource Reservation: Memory=32.38MB Threads=6
+Per-Host Resource Estimates: Memory=280MB
 PLAN-ROOT SINK
 |
 11:TOP-N [LIMIT=100]
@@ -499,8 +499,8 @@ PLAN-ROOT SINK
    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=328MB
+Max Per-Host Resource Reservation: Memory=46.13MB Threads=13
+Per-Host Resource Estimates: Memory=327MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -576,8 +576,8 @@ PLAN-ROOT SINK
    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
+Max Per-Host Resource Reservation: Memory=92.27MB Threads=15
+Per-Host Resource Estimates: Memory=284MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1017,7 +1017,7 @@ PLAN-ROOT SINK
    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=462MB
+Per-Host Resource Estimates: Memory=460MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1253,8 +1253,8 @@ PLAN-ROOT SINK
    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=348MB
+Max Per-Host Resource Reservation: Memory=47.51MB Threads=13
+Per-Host Resource Estimates: Memory=337MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1320,8 +1320,8 @@ PLAN-ROOT SINK
    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=291MB
+Max Per-Host Resource Reservation: Memory=87.52MB Threads=15
+Per-Host Resource Estimates: Memory=280MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1775,7 +1775,7 @@ order by
   ss_ticket_number
 limit 100
 ---- PLAN
-Max Per-Host Resource Reservation: Memory=84.06MB Threads=8
+Max Per-Host Resource Reservation: Memory=67.06MB Threads=8
 Per-Host Resource Estimates: Memory=378MB
 PLAN-ROOT SINK
 |
@@ -1837,8 +1837,8 @@ PLAN-ROOT SINK
    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=96.70MB Threads=17
-Per-Host Resource Estimates: Memory=428MB
+Max Per-Host Resource Reservation: Memory=80.20MB Threads=17
+Per-Host Resource Estimates: Memory=412MB
 PLAN-ROOT SINK
 |
 24:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1923,8 +1923,8 @@ PLAN-ROOT SINK
    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=158.52MB Threads=19
-Per-Host Resource Estimates: Memory=362MB
+Max Per-Host Resource Reservation: Memory=143.02MB Threads=19
+Per-Host Resource Estimates: Memory=361MB
 PLAN-ROOT SINK
 |
 24:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2136,7 +2136,7 @@ PLAN-ROOT SINK
    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=165MB
+Per-Host Resource Estimates: Memory=164MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2613,8 +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
+Max Per-Host Resource Reservation: Memory=70.52MB Threads=9
+Per-Host Resource Estimates: Memory=534MB
 PLAN-ROOT SINK
 |
 17:TOP-N [LIMIT=100]
@@ -2688,8 +2688,8 @@ PLAN-ROOT SINK
    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=606MB
+Max Per-Host Resource Reservation: Memory=103.14MB Threads=20
+Per-Host Resource Estimates: Memory=601MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2795,8 +2795,8 @@ PLAN-ROOT SINK
    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=491MB
+Max Per-Host Resource Reservation: Memory=202.53MB Threads=23
+Per-Host Resource Estimates: Memory=483MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3601,7 +3601,7 @@ PLAN-ROOT SINK
    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=467MB
+Per-Host Resource Estimates: Memory=465MB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3878,8 +3878,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=12.60MB
    runtime filters: RF000 -> c_customer_sk
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=57.95MB Threads=13
-Per-Host Resource Estimates: Memory=347MB
+Max Per-Host Resource Reservation: Memory=49.45MB Threads=13
+Per-Host Resource Estimates: Memory=337MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3944,8 +3944,8 @@ PLAN-ROOT SINK
    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=290MB
+Max Per-Host Resource Reservation: Memory=87.52MB Threads=15
+Per-Host Resource Estimates: Memory=279MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4117,8 +4117,8 @@ PLAN-ROOT SINK
    partitions=1/1 files=1 size=12.60MB
    runtime filters: RF000 -> c_customer_sk
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=49.45MB Threads=13
-Per-Host Resource Estimates: Memory=335MB
+Max Per-Host Resource Reservation: Memory=45.70MB Threads=13
+Per-Host Resource Estimates: Memory=330MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4183,8 +4183,8 @@ PLAN-ROOT SINK
    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=87.52MB Threads=15
-Per-Host Resource Estimates: Memory=275MB
+Max Per-Host Resource Reservation: Memory=83.77MB Threads=15
+Per-Host Resource Estimates: Memory=270MB
 PLAN-ROOT SINK
 |
 18:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4706,8 +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=255MB
+Max Per-Host Resource Reservation: Memory=57.88MB Threads=9
+Per-Host Resource Estimates: Memory=254MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -4849,8 +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
+Max Per-Host Resource Reservation: Memory=73.62MB Threads=8
+Per-Host Resource Estimates: Memory=402MB
 PLAN-ROOT SINK
 |
 16:TOP-N [LIMIT=100]
@@ -4920,8 +4920,8 @@ PLAN-ROOT SINK
    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=453MB
+Max Per-Host Resource Reservation: Memory=88.44MB Threads=19
+Per-Host Resource Estimates: Memory=452MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5027,8 +5027,8 @@ PLAN-ROOT SINK
    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
+Max Per-Host Resource Reservation: Memory=176.88MB Threads=22
+Per-Host Resource Estimates: Memory=433MB
 PLAN-ROOT SINK
 |
 30:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5209,8 +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
+Max Per-Host Resource Reservation: Memory=168.44MB Threads=13
+Per-Host Resource Estimates: Memory=762MB
 PLAN-ROOT SINK
 |
 35:TOP-N [LIMIT=100]
@@ -5349,8 +5349,8 @@ PLAN-ROOT SINK
    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.10GB
+Max Per-Host Resource Reservation: Memory=390.40MB Threads=29
+Per-Host Resource Estimates: Memory=1.06GB
 PLAN-ROOT SINK
 |
 54:MERGING-EXCHANGE [UNPARTITIONED]
@@ -5535,8 +5535,8 @@ PLAN-ROOT SINK
    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.04GB
+Max Per-Host Resource Reservation: Memory=746.80MB Threads=33
+Per-Host Resource Estimates: Memory=1.03GB
 PLAN-ROOT SINK
 |
 54:MERGING-EXCHANGE [UNPARTITIONED]
@@ -6066,7 +6066,7 @@ PLAN-ROOT SINK
    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=622MB
+Per-Host Resource Estimates: Memory=621MB
 PLAN-ROOT SINK
 |
 27:SORT

Reply via email to