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/11/19 17:27:28 UTC

[1/6] impala git commit: IMPALA-5031: signed overflow is undefined behavior

Repository: impala
Updated Branches:
  refs/heads/master 153663c22 -> 2a4835cfb


IMPALA-5031: signed overflow is undefined behavior

This patch fixes a signed overflow in the backend test
DecimalTest.Overflow. The interesting part of the backtrace is:

runtime/decimal-value.inline.h:254:17: runtime error: signed integer
         overflow: 0x4b3b4ca85a86c47a098a223fffffffff +
         0x4b3b4ca85a86c47a098a223fffffffff cannot be represented in
         type '__int128'
    #0 detail::AddLarge(__int128, int, __int128, int, int, bool,
         bool*) runtime/decimal-value.inline.h:254:17
    #1 DecimalValue<__int128> DecimalValue<__int128>::Add<__int128>(
         int, DecimalValue<__int128> const&, int, int, int, bool,
         bool*) const runtime/decimal-value.inline.h:371:14
    #2 DecimalTest_Overflow_Test::TestBody()
         runtime/decimal-test.cc:540:9

Change-Id: I146bcf35d34cc0e14be0633427d3e4bd0e5a261e
Reviewed-on: http://gerrit.cloudera.org:8080/11917
Reviewed-by: Jim Apple <jb...@apache.org>
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/53ce6bb5
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/53ce6bb5
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/53ce6bb5

Branch: refs/heads/master
Commit: 53ce6bb571cd9ae07ba5255197d35aa852a6f97c
Parents: 153663c
Author: Jim Apple <jb...@apache.org>
Authored: Fri Nov 9 09:37:00 2018 -0800
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Sun Nov 18 06:50:50 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/decimal-value.inline.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/53ce6bb5/be/src/runtime/decimal-value.inline.h
----------------------------------------------------------------------
diff --git a/be/src/runtime/decimal-value.inline.h b/be/src/runtime/decimal-value.inline.h
index 3150aef..cb889e6 100644
--- a/be/src/runtime/decimal-value.inline.h
+++ b/be/src/runtime/decimal-value.inline.h
@@ -28,6 +28,7 @@
 #include <sstream>
 
 #include "common/logging.h"
+#include "util/arithmetic-util.h"
 #include "util/bit-util.h"
 #include "util/decimal-util.h"
 #include "util/hash-util.h"
@@ -251,7 +252,9 @@ inline int128_t AddLarge(int128_t x, int x_scale, int128_t y, int y_scale,
   DCHECK(right <= DecimalUtil::GetScaleMultiplier<int128_t>(result_scale));
 
   *overflow |= x_left > DecimalUtil::MAX_UNSCALED_DECIMAL16 - y_left - carry_to_left;
-  left = x_left + y_left + carry_to_left;
+  left = ArithmeticUtil::AsUnsigned<std::plus>(
+      ArithmeticUtil::AsUnsigned<std::plus>(x_left, y_left),
+      static_cast<int128_t>(carry_to_left));
 
   int128_t mult = DecimalUtil::GetScaleMultiplier<int128_t>(result_scale);
   if (UNLIKELY(!*overflow &&


[3/6] impala git commit: IMPALA-7367: Pack StringValue and CollectionValue slots

Posted by ta...@apache.org.
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


[4/6] impala git commit: IMPALA-7367: Pack StringValue and CollectionValue slots

Posted by ta...@apache.org.
http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 8d8f8e3..f86dd5a 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/resource-requirements.test
@@ -15,9 +15,9 @@ PLAN-ROOT SINK
    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)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=3
@@ -25,13 +25,13 @@ Per-Host Resource Estimates: Memory=91MB
 Analyzed query: SELECT * FROM tpch_parquet.lineitem
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -41,23 +41,23 @@ Per-Host Resources: mem-estimate=80.00MB mem-reservation=40.00MB thread-reservat
    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=80.00MB Threads=3
-Per-Host Resource Estimates: Memory=172MB
+Per-Host Resource Estimates: Memory=171MB
 Analyzed query: SELECT * FROM tpch_parquet.lineitem
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -67,9 +67,9 @@ Per-Host Resources: mem-estimate=160.00MB mem-reservation=80.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=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Single column parquet scan - memory reservation is reduced compared to multi-column
@@ -90,9 +90,9 @@ PLAN-ROOT SINK
    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=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=4.00MB Threads=3
@@ -100,13 +100,13 @@ Per-Host Resource Estimates: Memory=90MB
 Analyzed query: SELECT l_comment FROM tpch_parquet.lineitem
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.14MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.12MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.14MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=42B cardinality=6001215
+|  mem-estimate=10.12MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=38B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -116,9 +116,9 @@ Per-Host Resources: mem-estimate=80.00MB mem-reservation=4.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=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -126,13 +126,13 @@ Per-Host Resource Estimates: Memory=170MB
 Analyzed query: SELECT l_comment FROM tpch_parquet.lineitem
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.27MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.25MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=42B cardinality=6001215
+|  mem-estimate=10.25MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=38B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -142,9 +142,9 @@ Per-Host Resources: mem-estimate=160.00MB mem-reservation=8.00MB thread-reservat
    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=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Small parquet files - memory reservation is reduced because of small file size.
@@ -162,14 +162,14 @@ PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=1
-   tuple-ids=0 row-size=16B cardinality=unavailable
+   tuple-ids=0 row-size=12B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=16.00KB Threads=3
@@ -179,26 +179,26 @@ functional_parquet.alltypes
 Analyzed query: SELECT string_col FROM functional_parquet.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=60.00KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=48.00KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=60.00KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=16B cardinality=unavailable
+|  mem-estimate=48.00KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=12B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
 Per-Host Resources: mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=2
 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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=16.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=32.00KB Threads=3
@@ -208,26 +208,26 @@ functional_parquet.alltypes
 Analyzed query: SELECT string_col FROM functional_parquet.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=120.00KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=96.00KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=120.00KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=16B cardinality=unavailable
+|  mem-estimate=96.00KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=12B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
 Per-Host Resources: mem-estimate=32.00MB mem-reservation=32.00KB thread-reservation=2
 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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
-   tuple-ids=0 row-size=16B cardinality=unavailable
+   tuple-ids=0 row-size=12B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Multi-column parquet scan with small files - memory reservation is reduced because of
@@ -247,14 +247,14 @@ PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=24.00KB Threads=3
@@ -265,26 +265,26 @@ Analyzed query: SELECT int_col, float_col, string_col FROM
 functional_parquet.alltypes
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=83.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=24B cardinality=unavailable
+|  mem-estimate=71.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
 Per-Host Resources: mem-estimate=16.00MB mem-reservation=24.00KB thread-reservation=2
 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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=48.00KB Threads=3
@@ -295,26 +295,26 @@ Analyzed query: SELECT int_col, float_col, string_col FROM
 functional_parquet.alltypes
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=167.99KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=24B cardinality=unavailable
+|  mem-estimate=143.99KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=20B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
 Per-Host Resources: mem-estimate=32.00MB mem-reservation=48.00KB thread-reservation=2
 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: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=24.00KB thread-reservation=0
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Parquet scan with no materialized columns. Need reservation to scan levels to determine
@@ -333,7 +333,7 @@ PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   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
@@ -362,7 +362,7 @@ PLAN-ROOT SINK
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
 Per-Host Resources: mem-estimate=1.00MB mem-reservation=16.00KB thread-reservation=2
 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
@@ -391,7 +391,7 @@ PLAN-ROOT SINK
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
 Per-Host Resources: mem-estimate=32.00MB mem-reservation=32.00KB thread-reservation=2
 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
@@ -470,7 +470,7 @@ PLAN-ROOT SINK
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=16.00MB mem-reservation=512.00KB thread-reservation=1
-   tuple-ids=0 row-size=16B cardinality=unavailable
+   tuple-ids=0 row-size=12B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, unnested in scan - should reserve memory for each column.
@@ -492,9 +492,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=24.00MB thread-reservation=1
-   tuple-ids=0 row-size=80B cardinality=1500000
+   tuple-ids=0 row-size=64B cardinality=1500000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, unnested in scan - don't reserve extra memory for "pos" virtual
@@ -517,7 +517,7 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=4.00MB thread-reservation=1
    tuple-ids=0 row-size=16B cardinality=1500000
    in pipelines: 00(GETNEXT)
@@ -541,7 +541,7 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns: all
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=4.00MB thread-reservation=1
    tuple-ids=0 row-size=8B cardinality=1500000
    in pipelines: 00(GETNEXT)
@@ -567,18 +567,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0 row-size=104B cardinality=1500000
+|  tuple-ids=1,0 row-size=84B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=104B cardinality=10
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=84B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders]
@@ -593,9 +593,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=32.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=150000
+   tuple-ids=0 row-size=20B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, left nested in scan - should reserve memory for each scalar
@@ -617,18 +617,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0 row-size=40B cardinality=1500000
+|  tuple-ids=1,0 row-size=36B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=40B cardinality=10
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=36B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders]
@@ -643,9 +643,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=150000
+   tuple-ids=0 row-size=20B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, left nested in scan - should reserve memory for virtual
@@ -668,18 +668,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0 row-size=32B cardinality=1500000
+|  tuple-ids=1,0 row-size=28B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=32B cardinality=10
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=28B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders]
@@ -694,9 +694,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=150000
+   tuple-ids=0 row-size=20B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, left nested in scan - should reserve memory for nested column
@@ -718,18 +718,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0 row-size=24B cardinality=1500000
+|  tuple-ids=1,0 row-size=20B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=24B cardinality=10
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=20B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders]
@@ -744,9 +744,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=150000
+   tuple-ids=0 row-size=20B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types, left nested in scan - should reserve memory for nested column
@@ -768,18 +768,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0 row-size=24B cardinality=1500000
+|  tuple-ids=1,0 row-size=20B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=16B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=24B cardinality=10
+|  |  mem-estimate=12B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=20B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=16B cardinality=1
+|  |     tuple-ids=0 row-size=12B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders]
@@ -794,9 +794,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns: unavailable
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=4.00MB thread-reservation=1
-   tuple-ids=0 row-size=16B cardinality=150000
+   tuple-ids=0 row-size=12B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet nested types with two levels of nesting materialized in scan. Should
@@ -818,34 +818,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=64B cardinality=15000000
+|  tuple-ids=2,1,0 row-size=52B cardinality=15000000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=64B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=52B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=40B cardinality=100
+|  |  tuple-ids=2,1 row-size=32B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=40B cardinality=10
+|  |  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=32B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=24B cardinality=1
+|  |  |     tuple-ids=1 row-size=20B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems]
@@ -867,9 +867,9 @@ PLAN-ROOT SINK
    stored statistics:
      table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44232
+   extrapolated-rows=disabled max-scan-range-rows=44225
    mem-estimate=88.00MB mem-reservation=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=150000
+   tuple-ids=0 row-size=20B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Text scan
@@ -891,7 +891,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -899,13 +899,13 @@ Per-Host Resource Estimates: Memory=99MB
 Analyzed query: SELECT * FROM tpch.lineitem
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -917,21 +917,21 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.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=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=188MB
+Per-Host Resource Estimates: Memory=187MB
 Analyzed query: SELECT * FROM tpch.lineitem
 
 F01: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
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -943,7 +943,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Single column text scan - memory reservation is same as multi-column scan.
@@ -965,7 +965,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -973,13 +973,13 @@ Per-Host Resource Estimates: Memory=98MB
 Analyzed query: SELECT l_comment FROM tpch.lineitem
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.14MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.12MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.14MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=42B cardinality=6001215
+|  mem-estimate=10.12MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=38B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -991,7 +991,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
@@ -999,13 +999,13 @@ Per-Host Resource Estimates: Memory=186MB
 Analyzed query: SELECT l_comment FROM tpch.lineitem
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=10.27MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=10.25MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=42B cardinality=6001215
+|  mem-estimate=10.25MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=38B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -1017,7 +1017,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-   tuple-ids=0 row-size=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Text scan on small files - memory reservation is reduced.
@@ -1041,22 +1041,22 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=16.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)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=32.00KB Threads=3
-Per-Host Resource Estimates: Memory=17MB
+Per-Host Resource Estimates: Memory=16MB
 Codegen disabled by planner
 Analyzed query: SELECT * FROM functional.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=533.50KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=490.49KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=533.50KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=97B cardinality=7300
+|  mem-estimate=490.49KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=89B cardinality=7300
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -1069,7 +1069,7 @@ Per-Host Resources: mem-estimate=16.00MB mem-reservation=32.00KB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=16.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)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=64.00KB Threads=3
@@ -1078,13 +1078,13 @@ Codegen disabled by planner
 Analyzed query: SELECT * FROM functional.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=836.50KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=769.49KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=836.50KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=97B cardinality=7300
+|  mem-estimate=769.49KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=89B cardinality=7300
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -1097,7 +1097,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=64.00KB thread-reservat
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=310
    mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
-   tuple-ids=0 row-size=97B cardinality=7300
+   tuple-ids=0 row-size=89B cardinality=7300
    in pipelines: 00(GETNEXT)
 ====
 # Avro scan.
@@ -1121,7 +1121,7 @@ PLAN-ROOT SINK
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=108B cardinality=unavailable
+   tuple-ids=0 row-size=88B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -1131,13 +1131,13 @@ tpch_avro.orders
 Analyzed query: SELECT * FROM tpch_avro.orders
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=223.95KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=183.96KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=223.95KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=108B cardinality=unavailable
+|  mem-estimate=183.96KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=88B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
@@ -1149,7 +1149,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=108B cardinality=unavailable
+   tuple-ids=0 row-size=88B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
@@ -1159,13 +1159,13 @@ tpch_avro.orders
 Analyzed query: SELECT * FROM tpch_avro.orders
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=447.95KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=367.96KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=447.95KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=108B cardinality=unavailable
+|  mem-estimate=367.96KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=88B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -1177,7 +1177,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=108B cardinality=unavailable
+   tuple-ids=0 row-size=88B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # RC scan.
@@ -1201,7 +1201,7 @@ PLAN-ROOT SINK
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=32.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=98B cardinality=unavailable
+   tuple-ids=0 row-size=78B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -1211,13 +1211,13 @@ tpch_rc.customer
 Analyzed query: SELECT * FROM tpch_rc.customer
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=101.90KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=81.92KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=101.90KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=98B cardinality=unavailable
+|  mem-estimate=81.92KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=78B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -1229,7 +1229,7 @@ Per-Host Resources: mem-estimate=32.00MB mem-reservation=8.00MB thread-reservati
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=32.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=98B cardinality=unavailable
+   tuple-ids=0 row-size=78B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=5
@@ -1239,13 +1239,13 @@ tpch_rc.customer
 Analyzed query: SELECT * FROM tpch_rc.customer
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=203.90KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=163.92KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=203.90KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=98B cardinality=unavailable
+|  mem-estimate=163.92KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=78B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -1257,7 +1257,7 @@ Per-Host Resources: mem-estimate=64.00MB mem-reservation=16.00MB thread-reservat
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=32.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=98B cardinality=unavailable
+   tuple-ids=0 row-size=78B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Seq scan.
@@ -1359,7 +1359,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1075682
    mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Single column ORC scan - memory reservation is same as multi-column scan.
@@ -1381,7 +1381,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1075682
    mem-estimate=40.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=42B cardinality=6001215
+   tuple-ids=0 row-size=38B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # ORC scan on small files - memory reservation is reduced.
@@ -1406,7 +1406,7 @@ PLAN-ROOT SINK
      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)
 ====
 # Mixed table format scan
@@ -1424,14 +1424,14 @@ PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 00:SCAN HDFS [functional.alltypesmixedformat]
-   partitions=4/4 files=4 size=66.06KB
+   partitions=4/4 files=4 size=66.09KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/4 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)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=88.00KB Threads=3
@@ -1441,55 +1441,55 @@ functional.alltypesmixedformat
 Analyzed query: SELECT * FROM functional.alltypesmixedformat
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=275.97KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=251.97KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=275.97KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=88B cardinality=unavailable
+|  mem-estimate=251.97KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=80B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
 Per-Host Resources: mem-estimate=16.00MB mem-reservation=88.00KB thread-reservation=2
 00:SCAN HDFS [functional.alltypesmixedformat, RANDOM]
-   partitions=4/4 files=4 size=66.06KB
+   partitions=4/4 files=4 size=66.09KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/4 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=176.00KB Threads=5
-Per-Host Resource Estimates: Memory=33MB
+Per-Host Resource Estimates: Memory=32MB
 WARNING: The following tables are missing relevant table and/or column statistics.
 functional.alltypesmixedformat
 Analyzed query: SELECT * FROM functional.alltypesmixedformat
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=551.97KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=503.97KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=551.97KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=88B cardinality=unavailable
+|  mem-estimate=503.97KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=80B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
 Per-Host Resources: mem-estimate=32.00MB mem-reservation=176.00KB thread-reservation=4
 00:SCAN HDFS [functional.alltypesmixedformat, RANDOM]
-   partitions=4/4 files=4 size=66.06KB
+   partitions=4/4 files=4 size=66.09KB
    stored statistics:
      table: rows=unavailable size=unavailable
      partitions: 0/4 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)
 ====
 # HBase scan on table without stats.
@@ -1511,7 +1511,7 @@ PLAN-ROOT SINK
      table: rows=unavailable
      columns: unavailable
    mem-estimate=256.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=88B cardinality=14298
+   tuple-ids=0 row-size=80B cardinality=14298
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=0B Threads=2
@@ -1521,13 +1521,13 @@ functional_hbase.alltypes
 Analyzed query: SELECT * FROM functional_hbase.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=1.29MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=1.17MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=1.29MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=88B cardinality=14298
+|  mem-estimate=1.17MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=80B cardinality=14298
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
@@ -1537,7 +1537,7 @@ Per-Host Resources: mem-estimate=256.00KB mem-reservation=0B thread-reservation=
      table: rows=unavailable
      columns: unavailable
    mem-estimate=256.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=88B cardinality=14298
+   tuple-ids=0 row-size=80B cardinality=14298
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=0B Threads=3
@@ -1547,13 +1547,13 @@ functional_hbase.alltypes
 Analyzed query: SELECT * FROM functional_hbase.alltypes
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=1.38MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=1.25MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=1.38MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=88B cardinality=14298
+|  mem-estimate=1.25MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=80B cardinality=14298
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
@@ -1563,7 +1563,7 @@ Per-Host Resources: mem-estimate=512.00KB mem-reservation=0B thread-reservation=
      table: rows=unavailable
      columns: unavailable
    mem-estimate=256.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=88B cardinality=14298
+   tuple-ids=0 row-size=80B cardinality=14298
    in pipelines: 00(GETNEXT)
 ====
 # HBase scan on table with stats.
@@ -1584,7 +1584,7 @@ PLAN-ROOT SINK
      table: rows=100
      columns: all
    mem-estimate=4.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=97B cardinality=50
+   tuple-ids=0 row-size=89B cardinality=50
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=0B Threads=2
@@ -1593,13 +1593,13 @@ Codegen disabled by planner
 Analyzed query: SELECT * FROM functional_hbase.alltypessmall
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=16.37KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=16.00KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=16.37KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=97B cardinality=50
+|  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=89B cardinality=50
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -1609,7 +1609,7 @@ Per-Host Resources: mem-estimate=4.00KB mem-reservation=0B thread-reservation=1
      table: rows=100
      columns: all
    mem-estimate=4.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=97B cardinality=50
+   tuple-ids=0 row-size=89B cardinality=50
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=0B Threads=3
@@ -1618,13 +1618,13 @@ Codegen disabled by planner
 Analyzed query: SELECT * FROM functional_hbase.alltypessmall
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=31.17KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=28.69KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=31.17KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=97B cardinality=50
+|  mem-estimate=28.69KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=89B cardinality=50
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -1634,7 +1634,7 @@ Per-Host Resources: mem-estimate=8.00KB mem-reservation=0B thread-reservation=2
      table: rows=100
      columns: all
    mem-estimate=4.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=97B cardinality=50
+   tuple-ids=0 row-size=89B cardinality=50
    in pipelines: 00(GETNEXT)
 ====
 # Data source scan
@@ -1653,7 +1653,7 @@ PLAN-ROOT SINK
 |
 00:SCAN DATA SOURCE [functional.alltypes_datasource]
    mem-estimate=1.00GB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=116B cardinality=5000
+   tuple-ids=0 row-size=112B cardinality=5000
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=0B Threads=2
@@ -1663,20 +1663,20 @@ functional.alltypes_datasource
 Analyzed query: SELECT * FROM functional.alltypes_datasource
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=686.41KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=662.88KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=686.41KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=116B cardinality=5000
+|  mem-estimate=662.88KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=112B cardinality=5000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
 Per-Host Resources: mem-estimate=1.00GB mem-reservation=0B thread-reservation=1
 00:SCAN DATA SOURCE [functional.alltypes_datasource]
    mem-estimate=1.00GB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=116B cardinality=5000
+   tuple-ids=0 row-size=112B cardinality=5000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=0B Threads=3
@@ -1686,20 +1686,20 @@ functional.alltypes_datasource
 Analyzed query: SELECT * FROM functional.alltypes_datasource
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=806.41KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=778.88KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=806.41KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=116B cardinality=5000
+|  mem-estimate=778.88KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=112B cardinality=5000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
 Per-Host Resources: mem-estimate=2.00GB mem-reservation=0B thread-reservation=2
 00:SCAN DATA SOURCE [functional.alltypes_datasource]
    mem-estimate=1.00GB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=116B cardinality=5000
+   tuple-ids=0 row-size=112B cardinality=5000
    in pipelines: 00(GETNEXT)
 ====
 # Union
@@ -1720,7 +1720,7 @@ PLAN-ROOT SINK
 00:UNION
 |  pass-through-operands: all
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=263B cardinality=12002430
+|  tuple-ids=2 row-size=231B cardinality=12002430
 |  in pipelines: 01(GETNEXT), 02(GETNEXT)
 |
 |--02:SCAN HDFS [tpch.lineitem]
@@ -1730,7 +1730,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1068457
 |     mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=263B cardinality=6001215
+|     tuple-ids=1 row-size=231B cardinality=6001215
 |     in pipelines: 02(GETNEXT)
 |
 01:SCAN HDFS [tpch.lineitem]
@@ -1740,7 +1740,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=8.00MB Threads=3
@@ -1749,13 +1749,13 @@ Analyzed query: SELECT * FROM tpch.lineitem UNION ALL SELECT * FROM
 tpch.lineitem
 
 F03: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
 |
 03:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=263B cardinality=12002430
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=231B cardinality=12002430
 |  in pipelines: 01(GETNEXT), 02(GETNEXT)
 |
 F02:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -1763,7 +1763,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
 00:UNION
 |  pass-through-operands: all
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=263B cardinality=12002430
+|  tuple-ids=2 row-size=231B cardinality=12002430
 |  in pipelines: 01(GETNEXT), 02(GETNEXT)
 |
 |--02:SCAN HDFS [tpch.lineitem, RANDOM]
@@ -1773,7 +1773,7 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1068457
 |     mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=263B cardinality=6001215
+|     tuple-ids=1 row-size=231B cardinality=6001215
 |     in pipelines: 02(GETNEXT)
 |
 01:SCAN HDFS [tpch.lineitem, RANDOM]
@@ -1783,22 +1783,22 @@ Per-Host Resources: mem-estimate=88.00MB mem-reservation=8.00MB thread-reservati
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=188MB
+Per-Host Resource Estimates: Memory=187MB
 Analyzed query: SELECT * FROM tpch.lineitem UNION ALL SELECT * FROM
 tpch.lineitem
 
 F03: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
 |
 03:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=263B cardinality=12002430
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2 row-size=231B cardinality=12002430
 |  in pipelines: 01(GETNEXT), 02(GETNEXT)
 |
 F02:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -1806,7 +1806,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
 00:UNION
 |  pass-through-operands: all
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2 row-size=263B cardinality=12002430
+|  tuple-ids=2 row-size=231B cardinality=12002430
 |  in pipelines: 01(GETNEXT), 02(GETNEXT)
 |
 |--02:SCAN HDFS [tpch.lineitem, RANDOM]
@@ -1816,7 +1816,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1068457
 |     mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-|     tuple-ids=1 row-size=263B cardinality=6001215
+|     tuple-ids=1 row-size=231B cardinality=6001215
 |     in pipelines: 02(GETNEXT)
 |
 01:SCAN HDFS [tpch.lineitem, RANDOM]
@@ -1826,7 +1826,7 @@ Per-Host Resources: mem-estimate=176.00MB mem-reservation=16.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 01(GETNEXT)
 ====
 # Grouping aggregation
@@ -1856,7 +1856,7 @@ PLAN-ROOT SINK
    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)
@@ -1904,7 +1904,7 @@ Per-Host Resources: mem-estimate=114.00MB mem-reservation=38.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=1
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
@@ -1952,7 +1952,7 @@ Per-Host Resources: mem-estimate=228.00MB mem-reservation=76.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)
@@ -1980,7 +1980,7 @@ PLAN-ROOT SINK
    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=1.00MB mem-reservation=128.00KB thread-reservation=1
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
@@ -2018,7 +2018,7 @@ Per-Host Resources: mem-estimate=11.00MB mem-reservation=128.00KB 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=1.00MB mem-reservation=128.00KB thread-reservation=1
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
@@ -2056,7 +2056,7 @@ Per-Host Resources: mem-estimate=180.00MB mem-reservation=256.00KB 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=128.00KB thread-reservation=0
    tuple-ids=0 row-size=8B cardinality=6001215
    in pipelines: 00(GETNEXT)
@@ -2067,18 +2067,18 @@ from tpch_parquet.lineitem
 order by l_comment
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=2
-Per-Host Resource Estimates: Memory=120MB
+Per-Host Resource Estimates: Memory=118MB
 Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=120.00MB mem-reservation=52.00MB thread-reservation=2
+|  Per-Host Resources: mem-estimate=118.00MB mem-reservation=52.00MB thread-reservation=2
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:SORT
 |  order by: l_comment ASC
-|  mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=38.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem]
@@ -2086,32 +2086,32 @@ PLAN-ROOT SINK
    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)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=3
-Per-Host Resource Estimates: Memory=151MB
+Per-Host Resource Estimates: Memory=149MB
 Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=30.78MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=30.69MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 02:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: l_comment ASC
-|  mem-estimate=30.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=30.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 01(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=120.00MB mem-reservation=52.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=118.00MB mem-reservation=52.00MB thread-reservation=2
 01:SORT
 |  order by: l_comment ASC
-|  mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=38.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -2119,32 +2119,32 @@ Per-Host Resources: mem-estimate=120.00MB mem-reservation=52.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=104.00MB Threads=3
-Per-Host Resource Estimates: Memory=302MB
+Per-Host Resource Estimates: Memory=297MB
 Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=61.56MB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=61.38MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 02:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: l_comment ASC
-|  mem-estimate=61.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=61.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 01(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
-Per-Host Resources: mem-estimate=240.00MB mem-reservation=104.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=236.00MB mem-reservation=104.00MB thread-reservation=2
 01:SORT
 |  order by: l_comment ASC
-|  mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=38.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=6001215
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -2152,9 +2152,9 @@ Per-Host Resources: mem-estimate=240.00MB mem-reservation=104.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)
 ====
 # TOP-N
@@ -2169,14 +2169,14 @@ Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC LIMIT
 CAST(100 AS TINYINT)
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=80.03MB mem-reservation=40.00MB thread-reservation=2
+|  Per-Host Resources: mem-estimate=80.02MB mem-reservation=40.00MB thread-reservation=2
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 01:TOP-N [LIMIT=100]
 |  order by: l_comment ASC
-|  mem-estimate=25.66KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=100
+|  mem-estimate=22.54KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=100
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem]
@@ -2184,9 +2184,9 @@ PLAN-ROOT SINK
    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)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=40.00MB Threads=3
@@ -2195,23 +2195,23 @@ Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC LIMIT
 CAST(100 AS TINYINT)
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=86.71KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=76.29KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 02:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: l_comment ASC
 |  limit: 100
-|  mem-estimate=86.71KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=100
+|  mem-estimate=76.29KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=100
 |  in pipelines: 01(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=80.03MB mem-reservation=40.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=80.02MB mem-reservation=40.00MB thread-reservation=2
 01:TOP-N [LIMIT=100]
 |  order by: l_comment ASC
-|  mem-estimate=25.66KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=100
+|  mem-estimate=22.54KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=100
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -2219,9 +2219,9 @@ Per-Host Resources: mem-estimate=80.03MB mem-reservation=40.00MB thread-reservat
    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=80.00MB Threads=3
@@ -2230,23 +2230,23 @@ Analyzed query: SELECT * FROM tpch_parquet.lineitem ORDER BY l_comment ASC LIMIT
 CAST(100 AS TINYINT)
 
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=164.87KB mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=145.08KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 02:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: l_comment ASC
 |  limit: 100
-|  mem-estimate=164.87KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=100
+|  mem-estimate=145.08KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=100
 |  in pipelines: 01(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
-Per-Host Resources: mem-estimate=160.05MB mem-reservation=80.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=160.04MB mem-reservation=80.00MB thread-reservation=2
 01:TOP-N [LIMIT=100]
 |  order by: l_comment ASC
-|  mem-estimate=25.66KB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=100
+|  mem-estimate=22.54KB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=231B cardinality=100
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -2254,9 +2254,9 @@ Per-Host Resources: mem-estimate=160.05MB mem-reservation=80.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=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Broadcast Hash Join
@@ -2264,12 +2264,12 @@ 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=477MB
+Per-Host Resource Estimates: Memory=446MB
 Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN tpch.orders ON l_orderkey
 = o_orderkey
 
 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
+|  Per-Host Resources: mem-estimate=445.94MB mem-reservation=51.00MB thread-reservation=3 runtime-filters-memory=1.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -2277,8 +2277,8 @@ PLAN-ROOT SINK
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpch.orders]
@@ -2288,7 +2288,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.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.lineitem]
@@ -2299,37 +2299,37 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=51.00MB Threads=5
-Per-Host Resource Estimates: Memory=499MB
+Per-Host Resource Estimates: Memory=467MB
 Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN tpch.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,1 row-size=454B cardinality=5757710
+|  mem-estimate=11.20MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=399.80MB mem-reservation=43.00MB thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=368.29MB mem-reservation=43.00MB thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  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
@@ -2341,7 +2341,7 @@ Per-Host Resources: mem-estimate=399.80MB mem-reservation=43.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.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.lineitem, RANDOM]
@@ -2352,33 +2352,33 @@ Per-Host Resources: mem-estimate=399.80MB mem-reservation=43.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.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=102.00MB Threads=5
-Per-Host Resource Estimates: Memory=968MB
+Per-Host Resource Estimates: Memory=904MB
 Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN tpch.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,1 row-size=454B cardinality=5757710
+|  mem-estimate=12.40MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
-Per-Host Resources: mem-estimate=778.83MB mem-reservation=86.00MB thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=715.89MB mem-reservation=86.00MB thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash-table-id=00
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
@@ -2389,8 +2389,8 @@ Per-Host Resources: mem-estimate=778.83MB mem-reservation=86.00MB thread-reserva
 |  |  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
@@ -2402,7 +2402,7 @@ Per-Host Resources: mem-estimate=778.83MB mem-reservation=86.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.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.lineitem, RANDOM]
@@ -2413,7 +2413,7 @@ Per-Host Resources: mem-estimate=778.83MB mem-reservation=86.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.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 Hash Join
@@ -2421,13 +2421,13 @@ 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=477MB
-Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN
+Per-Host Resource Estimates: Memory=446MB
+Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN 
 -- +shuffle
 tpch.orders ON l_orderkey = o_orderkey
 
 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
+|  Per-Host Resources: mem-estimate=445.94MB mem-reservation=51.00MB thread-reservation=3 runtime-filters-memory=1.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -2435,8 +2435,8 @@ PLAN-ROOT SINK
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=268.94MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpch.orders]
@@ -2446,7 +2446,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.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.lineitem]
@@ -2457,38 +2457,38 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=52.00MB Threads=6
-Per-Host Resource Estimates: Memory=311MB
-Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN
+Per-Host Resource Estimates: Memory=300MB
+Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN 
 -- +shuffle
 tpch.orders ON l_orderkey = o_orderkey
 
 F03: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
 |
 05:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=11.35MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=11.20MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
-Per-Host Resources: mem-estimate=122.30MB mem-reservation=35.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=111.68MB mem-reservation=35.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=100.14MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=89.65MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--04:EXCHANGE [HASH(o_orderkey)]
-|  |  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
@@ -2500,12 +2500,12 @@ Per-Host Resources: mem-estimate=122.30MB mem-reservation=35.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=191B cardinality=1500000
+|     tuple-ids=1 row-size=171B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 03:EXCHANGE [HASH(l_orderkey)]
-|  mem-estimate=10.78MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -2518,34 +2518,34 @@ Per-Host Resources: mem-estimate=89.00MB mem-reservation=9.00MB thread-reservati
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.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=104.00MB Threads=7
-Per-Host Resource Estimates: Memory=492MB
-Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN
+Per-Host Resource Estimates: Memory=481MB
+Analyzed query: SELECT * FROM tpch.lineitem INNER JOIN 
 -- +shuffle
 tpch.orders ON l_orderkey = o_orderkey
 
 F03: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
 |
 05:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=12.71MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=12.40MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT)
 |
 F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
-Per-Host Resources: mem-estimate=125.26MB mem-reservation=70.00MB thread-reservation=2 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=114.40MB mem-reservation=70.00MB thread-reservation=2 runtime-filters-memory=1.00MB
 02:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=00
 |  hash predicates: l_orderkey = o_orderkey
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
-|  mem-estimate=50.07MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=454B cardinality=5757710
+|  mem-estimate=44.82MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=0,1 row-size=402B cardinality=5757710
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--F04:PLAN FRAGMENT [HASH(l_orderkey)] hosts=2 instances=4
@@ -2556,8 +2556,8 @@ Per-Host Resources: mem-estimate=125.26MB mem-reservation=70.00MB thread-reserva
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  |
 |  04:EXCHANGE [HASH(o_orderkey)]
-|  |  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
@@ -2569,12 +2569,12 @@ Per-Host Resources: mem-estimate=125.26MB mem-reservation=70.00MB thread-reserva
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1181132
 |     mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-|     tuple-ids=1 row-size=191B cardinality=1500000
+|     tuple-ids=1 row-size=171B cardinality=1500000
 |     in pipelines: 01(GETNEXT)
 |
 03:EXCHANGE [HASH(l_orderkey)]
-|  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  mem-estimate=11.38MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
@@ -2587,7 +2587,7 @@ Per-Host Resources: mem-estimate=178.00MB mem-reservation=18.00MB thread-reserva
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1068457
    mem-estimate=88.00MB mem-reservation=8.00MB thread-reservation=0
-   tuple-ids=0 row-size=263B cardinality=6001215
+   tuple-ids=0 row-size=231B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Nested loop join
@@ -2595,17 +2595,17 @@ select *
 from tpch.lineitem, tpch.orders
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=16.00MB Threads=3
-Per-Host Resource Estimates: Memory=449MB
+Per-Host Resource Estimates: Memory=420MB
 Analyzed query: SELECT * FROM tpch.lineitem, tpch.orders
 
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=449.10MB mem-reservation=16.00MB thread-reservation=3
+|  Per-Host Resources: mem-estimate=420.49MB mem-reservation=16.00MB thread-reservation=3
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 02:NESTED LOOP JOIN [CROSS JOIN]
-|  mem-estimate=273.10MB mem-reservation=0B thread-reservation=0


<TRUNCATED>

[5/6] impala git commit: IMPALA-7367: Pack StringValue and CollectionValue slots

Posted by ta...@apache.org.
http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
index a373b96..3ebd0aa 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering.test
@@ -19,7 +19,7 @@ PLAN-ROOT SINK
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=188.92KB
+   partitions=24/24 files=24 size=189.12KB
    predicates: int_col IS NULL, int_col > CAST(1 AS INT), int_col > CAST(tinyint_col AS INT), CAST(int_col AS DOUBLE) * rand() > CAST(50 AS DOUBLE)
    stored statistics:
      table: rows=unavailable size=unavailable
@@ -81,7 +81,7 @@ PLAN-ROOT SINK
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=22/24 files=22 size=172.93KB
+   partitions=22/24 files=22 size=173.06KB
    predicates: bool_col, bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), int_col % CAST(2 AS INT) = CAST(1 AS INT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = CAST(1 AS INT), date_string_col > '1993-10-01'
    stored statistics:
      table: rows=unavailable size=unavailable
@@ -91,7 +91,7 @@ PLAN-ROOT SINK
    parquet statistics predicates: bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), date_string_col > '1993-10-01'
    parquet dictionary predicates: bool_col, bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), int_col % CAST(2 AS INT) = CAST(1 AS INT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = CAST(1 AS INT), date_string_col > '1993-10-01'
    mem-estimate=128.00MB mem-reservation=88.00KB thread-reservation=1
-   tuple-ids=0 row-size=80B cardinality=unavailable
+   tuple-ids=0 row-size=72B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Test non-parquet files for a variety of predicates
@@ -123,7 +123,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=339
    mem-estimate=128.00MB mem-reservation=32.00KB thread-reservation=1
-   tuple-ids=0 row-size=89B cardinality=1
+   tuple-ids=0 row-size=81B cardinality=1
    in pipelines: 00(GETNEXT)
 ====
 # Test negative cases for IN predicate min/max filtering
@@ -148,7 +148,7 @@ PLAN-ROOT SINK
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional_parquet.alltypes]
-   partitions=24/24 files=24 size=188.92KB
+   partitions=24/24 files=24 size=189.12KB
    predicates: id IN (int_col), id NOT IN (CAST(0 AS INT), CAST(1 AS INT), CAST(2 AS INT)), int_col % CAST(50 AS INT) IN (CAST(0 AS INT), CAST(1 AS INT)), string_col IN ('aaaa', 'bbbb', 'cccc', NULL)
    stored statistics:
      table: rows=unavailable size=unavailable
@@ -157,7 +157,7 @@ PLAN-ROOT SINK
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    parquet dictionary predicates: id NOT IN (CAST(0 AS INT), CAST(1 AS INT), CAST(2 AS INT)), int_col % CAST(50 AS INT) IN (CAST(0 AS INT), CAST(1 AS INT)), string_col IN ('aaaa', 'bbbb', 'cccc', NULL)
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Test collection types where all collections on the path are required (inner
@@ -173,34 +173,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=44B cardinality=unavailable
+|  tuple-ids=2,1,0 row-size=36B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=44B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=36B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=20B cardinality=100
+|  |  tuple-ids=2,1 row-size=16B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=20B cardinality=10
+|  |  |  mem-estimate=12B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=16B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=16B cardinality=1
+|  |  |     tuple-ids=1 row-size=12B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [cn.item a]
@@ -227,7 +227,7 @@ PLAN-ROOT SINK
    parquet statistics predicates on a: a.item.e < CAST(-10 AS INT)
    parquet dictionary predicates on a: a.item.e < CAST(-10 AS INT)
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Test collection types where the lower collection in the path is optional
@@ -245,24 +245,24 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2N,1,0 row-size=44B cardinality=unavailable
+|  tuple-ids=2N,1,0 row-size=36B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 |--08:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2N,1,0 row-size=44B cardinality=10
+|  |  tuple-ids=2N,1,0 row-size=36B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--06:NESTED LOOP JOIN [RIGHT OUTER JOIN]
 |  |  |  predicates: a.item.e < CAST(-10 AS INT)
-|  |  |  mem-estimate=40B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2N,1,0 row-size=44B cardinality=1
+|  |  |  mem-estimate=32B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2N,1,0 row-size=36B cardinality=1
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--04:SINGULAR ROW SRC
 |  |  |     parent-subplan=08
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1,0 row-size=40B cardinality=1
+|  |  |     tuple-ids=1,0 row-size=32B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  05:UNNEST [cn.item a]
@@ -272,14 +272,14 @@ PLAN-ROOT SINK
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=40B cardinality=10
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=32B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.nested_struct.c.d cn]
@@ -297,7 +297,7 @@ PLAN-ROOT SINK
      columns missing stats: id
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Tests collection types where the outer is optional (outer join descent)
@@ -313,23 +313,23 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1N,0 row-size=44B cardinality=unavailable
+|  tuple-ids=2,1N,0 row-size=36B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 |--08:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1N,0 row-size=44B cardinality=10
+|  |  tuple-ids=2,1N,0 row-size=36B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--06:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=40B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1N,0 row-size=44B cardinality=10
+|  |  |  mem-estimate=32B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1N,0 row-size=36B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--04:SINGULAR ROW SRC
 |  |  |     parent-subplan=08
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1N,0 row-size=40B cardinality=1
+|  |  |     tuple-ids=1N,0 row-size=32B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  05:UNNEST [cn.item a]
@@ -339,14 +339,14 @@ PLAN-ROOT SINK
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  07:NESTED LOOP JOIN [RIGHT OUTER JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1N,0 row-size=40B cardinality=1
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1N,0 row-size=32B cardinality=1
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.nested_struct.c.d cn]
@@ -363,7 +363,7 @@ PLAN-ROOT SINK
      columns missing stats: id
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Test collections so that each level has a filter applied.
@@ -377,34 +377,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=56B cardinality=1500000
+|  tuple-ids=2,1,0 row-size=48B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=56B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=48B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=32B cardinality=100
+|  |  tuple-ids=2,1 row-size=28B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=32B cardinality=10
+|  |  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=28B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=24B cardinality=1
+|  |  |     tuple-ids=1 row-size=20B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems l]
@@ -420,14 +420,14 @@ PLAN-ROOT SINK
 |     in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.98MB
+   partitions=1/1 files=4 size=288.99MB
    predicates: c_custkey > CAST(0 AS BIGINT), !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o.o_orderkey > CAST(0 AS BIGINT)
    predicates on l: l.l_partkey > CAST(0 AS BIGINT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44229
+   extrapolated-rows=disabled max-scan-range-rows=44225
    parquet statistics predicates: c_custkey > CAST(0 AS BIGINT)
    parquet statistics predicates on o: o.o_orderkey > CAST(0 AS BIGINT)
    parquet statistics predicates on l: l.l_partkey > CAST(0 AS BIGINT)
@@ -435,7 +435,7 @@ PLAN-ROOT SINK
    parquet dictionary predicates on o: o.o_orderkey > CAST(0 AS BIGINT)
    parquet dictionary predicates on l: l.l_partkey > CAST(0 AS BIGINT)
    mem-estimate=264.00MB mem-reservation=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=15000
+   tuple-ids=0 row-size=20B cardinality=15000
    in pipelines: 00(GETNEXT)
 ====
 # Test collections in a way that would incorrectly apply a min-max
@@ -456,18 +456,18 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1N,0 row-size=20B cardinality=unavailable
+|  tuple-ids=1N,0 row-size=16B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 |--04:NESTED LOOP JOIN [RIGHT OUTER JOIN]
-|  |  mem-estimate=16B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1N,0 row-size=20B cardinality=1
+|  |  mem-estimate=12B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1N,0 row-size=16B cardinality=1
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=16B cardinality=1
+|  |     tuple-ids=0 row-size=12B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.int_array]
@@ -484,7 +484,7 @@ PLAN-ROOT SINK
      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)
 ====
 # Multiple nested collection values (at the same nesting level) where dictionary
@@ -502,34 +502,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=162B cardinality=15000000
+|  tuple-ids=2,1,0 row-size=126B cardinality=15000000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=50B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=162B cardinality=100
+|  |  mem-estimate=42B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=126B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=50B cardinality=1
+|  |     tuple-ids=0 row-size=42B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=112B cardinality=100
+|  |  tuple-ids=2,1 row-size=84B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=32B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=112B cardinality=10
+|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=84B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=32B cardinality=1
+|  |  |     tuple-ids=1 row-size=24B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems l]
@@ -545,18 +545,18 @@ PLAN-ROOT SINK
 |     in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.98MB
+   partitions=1/1 files=4 size=288.99MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems)
    predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R', l.l_comment IS NULL
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44229
+   extrapolated-rows=disabled max-scan-range-rows=44225
    parquet statistics predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R'
    parquet dictionary predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R'
    mem-estimate=616.00MB mem-reservation=32.00MB thread-reservation=1
-   tuple-ids=0 row-size=50B cardinality=150000
+   tuple-ids=0 row-size=42B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Test a variety of predicates on a mixed format table.
@@ -570,7 +570,7 @@ and timestamp_cmp(timestamp_col, '2016-11-20 00:00:00') = 1
 and year > 2000 and month < 12;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=42.00MB mem-reservation=88.00KB thread-reservation=2
+|  Per-Host Resources: mem-estimate=138.00MB mem-reservation=88.00KB thread-reservation=2
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -581,7 +581,7 @@ PLAN-ROOT SINK
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypesmixedformat]
-   partitions=4/4 files=4 size=66.61KB
+   partitions=4/4 files=4 size=66.09KB
    predicates: bool_col, bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), int_col % CAST(2 AS INT) = CAST(1 AS INT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = CAST(1 AS INT), date_string_col > '1993-10-01'
    stored statistics:
      table: rows=unavailable size=unavailable
@@ -591,7 +591,7 @@ PLAN-ROOT SINK
    parquet statistics predicates: bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), date_string_col > '1993-10-01'
    parquet dictionary predicates: bool_col, bigint_col < CAST(5000 AS BIGINT), double_col > CAST(100.00 AS DOUBLE), float_col > CAST(50.00 AS FLOAT), id = CAST(1 AS INT), tinyint_col < CAST(50 AS TINYINT), int_col % CAST(2 AS INT) = CAST(1 AS INT), string_col IN ('aaaa', 'bbbb', 'cccc'), smallint_col IN (CAST(1 AS SMALLINT), CAST(2 AS SMALLINT), CAST(3 AS SMALLINT), CAST(4 AS SMALLINT), CAST(5 AS SMALLINT)), timestamp_cmp(timestamp_col, TIMESTAMP '2016-11-20 00:00:00') = CAST(1 AS INT), date_string_col > '1993-10-01'
    mem-estimate=128.00MB mem-reservation=88.00KB thread-reservation=1
-   tuple-ids=0 row-size=80B cardinality=unavailable
+   tuple-ids=0 row-size=72B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Test a variety of predicates on a mixed format table.
@@ -624,6 +624,6 @@ PLAN-ROOT SINK
      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=0
    mem-estimate=0B mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=80B cardinality=0
+   tuple-ids=0 row-size=72B cardinality=0
    in pipelines: 00(GETNEXT)
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test b/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
index fa16718..768106c 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/partition-pruning.test
@@ -16,6 +16,6 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=1
    mem-estimate=32.00MB mem-reservation=8.00KB thread-reservation=1
-   tuple-ids=0 row-size=20B cardinality=1
+   tuple-ids=0 row-size=16B cardinality=1
    in pipelines: 00(GETNEXT)
 ====


[2/6] impala git commit: IMPALA-7367: Pack StringValue and CollectionValue slots

Posted by ta...@apache.org.
http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 10efec9..4bab956 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test
@@ -517,7 +517,7 @@ PLAN-ROOT SINK
    runtime filters: RF002 -> l_orderkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=41.38MB Threads=8
-Per-Host Resource Estimates: Memory=546MB
+Per-Host Resource Estimates: Memory=545MB
 PLAN-ROOT SINK
 |
 11:MERGING-EXCHANGE [UNPARTITIONED]
@@ -642,8 +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
+Max Per-Host Resource Reservation: Memory=25.50MB Threads=3
+Per-Host Resource Estimates: Memory=450MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -666,8 +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=497MB
+Max Per-Host Resource Reservation: Memory=38.69MB Threads=7
+Per-Host Resource Estimates: Memory=493MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -703,8 +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=450MB
+Max Per-Host Resource Reservation: Memory=73.62MB Threads=9
+Per-Host Resource Estimates: Memory=446MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -828,7 +828,7 @@ PLAN-ROOT SINK
    runtime filters: RF005 -> l_suppkey, RF010 -> l_orderkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=70.14MB Threads=14
-Per-Host Resource Estimates: Memory=668MB
+Per-Host Resource Estimates: Memory=667MB
 PLAN-ROOT SINK
 |
 20:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1148,8 +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=717MB
+Max Per-Host Resource Reservation: Memory=86.95MB Threads=15
+Per-Host Resource Estimates: Memory=699MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1224,8 +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=160.78MB Threads=17
-Per-Host Resource Estimates: Memory=670MB
+Max Per-Host Resource Reservation: Memory=144.78MB Threads=17
+Per-Host Resource Estimates: Memory=655MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1431,8 +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=759MB
+Max Per-Host Resource Reservation: Memory=71.46MB Threads=21
+Per-Host Resource Estimates: Memory=756MB
 PLAN-ROOT SINK
 |
 29:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1531,8 +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=726MB
+Max Per-Host Resource Reservation: Memory=141.05MB Threads=25
+Per-Host Resource Estimates: Memory=724MB
 PLAN-ROOT SINK
 |
 29:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1694,7 +1694,7 @@ order by
   o_year desc
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=114.76MB Threads=7
-Per-Host Resource Estimates: Memory=844MB
+Per-Host Resource Estimates: Memory=838MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -1746,8 +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=896MB
+Max Per-Host Resource Reservation: Memory=123.70MB Threads=15
+Per-Host Resource Estimates: Memory=879MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1820,8 +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=884MB
+Max Per-Host Resource Reservation: Memory=230.39MB Threads=17
+Per-Host Resource Estimates: Memory=867MB
 PLAN-ROOT SINK
 |
 21:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1990,7 +1990,7 @@ PLAN-ROOT SINK
    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
+Per-Host Resource Estimates: Memory=668MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2048,7 +2048,7 @@ PLAN-ROOT SINK
    runtime filters: RF004 -> l_orderkey
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=163.89MB Threads=13
-Per-Host Resource Estimates: Memory=608MB
+Per-Host Resource Estimates: Memory=607MB
 PLAN-ROOT SINK
 |
 15:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2424,7 +2424,7 @@ order by
   l_shipmode
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=51.00MB Threads=3
-Per-Host Resource Estimates: Memory=477MB
+Per-Host Resource Estimates: Memory=475MB
 PLAN-ROOT SINK
 |
 04:SORT
@@ -2483,7 +2483,7 @@ PLAN-ROOT SINK
    runtime filters: RF000 -> l_orderkey
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=101.88MB Threads=9
-Per-Host Resource Estimates: Memory=475MB
+Per-Host Resource Estimates: Memory=474MB
 PLAN-ROOT SINK
 |
 09:MERGING-EXCHANGE [UNPARTITIONED]
@@ -2672,8 +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
+Max Per-Host Resource Reservation: Memory=25.50MB Threads=3
+Per-Host Resource Estimates: Memory=338MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -2720,7 +2720,7 @@ PLAN-ROOT SINK
    runtime filters: RF000 -> l_partkey
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=41.75MB Threads=7
-Per-Host Resource Estimates: Memory=299MB
+Per-Host Resource Estimates: Memory=298MB
 PLAN-ROOT SINK
 |
 07:AGGREGATE [FINALIZE]
@@ -2821,8 +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
+Max Per-Host Resource Reservation: Memory=43.75MB Threads=10
+Per-Host Resource Estimates: Memory=638MB
 PLAN-ROOT SINK
 |
 17:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3017,7 +3017,7 @@ 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
+Max Per-Host Resource Reservation: Memory=46.81MB Threads=9
 Per-Host Resource Estimates: Memory=334MB
 PLAN-ROOT SINK
 |
@@ -3069,7 +3069,7 @@ PLAN-ROOT SINK
    runtime filters: RF000 -> ps_partkey
 ---- PARALLELPLANS
 Max Per-Host Resource Reservation: Memory=93.62MB Threads=11
-Per-Host Resource Estimates: Memory=393MB
+Per-Host Resource Estimates: Memory=392MB
 PLAN-ROOT SINK
 |
 14:MERGING-EXCHANGE [UNPARTITIONED]
@@ -3319,7 +3319,7 @@ order by
 limit 100
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=111.50MB Threads=5
-Per-Host Resource Estimates: Memory=898MB
+Per-Host Resource Estimates: Memory=891MB
 PLAN-ROOT SINK
 |
 09:TOP-N [LIMIT=100]
@@ -3538,8 +3538,8 @@ where
     )
   )
 ---- PLAN
-Max Per-Host Resource Reservation: Memory=19.88MB Threads=3
-Per-Host Resource Estimates: Memory=332MB
+Max Per-Host Resource Reservation: Memory=18.94MB Threads=3
+Per-Host Resource Estimates: Memory=331MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -3559,8 +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
+Max Per-Host Resource Reservation: Memory=18.94MB Threads=5
+Per-Host Resource Estimates: Memory=351MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -3587,8 +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
+Max Per-Host Resource Reservation: Memory=37.88MB Threads=5
+Per-Host Resource Estimates: Memory=276MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 373fa87..cc35a26 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test
@@ -390,7 +390,7 @@ order by
   l_year
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=76.69MB Threads=7
-Per-Host Resource Estimates: Memory=90MB
+Per-Host Resource Estimates: Memory=85MB
 PLAN-ROOT SINK
 |
 12:SORT
@@ -656,7 +656,7 @@ order by
 limit 20
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=44.44MB Threads=5
-Per-Host Resource Estimates: Memory=71MB
+Per-Host Resource Estimates: Memory=67MB
 PLAN-ROOT SINK
 |
 08:TOP-N [LIMIT=20]
@@ -1005,7 +1005,7 @@ order by
   p_type,
   p_size
 ---- PLAN
-Max Per-Host Resource Reservation: Memory=16.75MB Threads=4
+Max Per-Host Resource Reservation: Memory=14.88MB Threads=4
 Per-Host Resource Estimates: Memory=22MB
 PLAN-ROOT SINK
 |
@@ -1121,7 +1121,7 @@ order by
 limit 100
 ---- PLAN
 Max Per-Host Resource Reservation: Memory=81.25MB Threads=5
-Per-Host Resource Estimates: Memory=158MB
+Per-Host Resource Estimates: Memory=153MB
 PLAN-ROOT SINK
 |
 09:TOP-N [LIMIT=100]

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 12bb1c9..7bc9da5 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
@@ -34,7 +34,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate <= '1998-09-02'
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=112.00MB Threads=4
@@ -58,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate <= '1998-09-02'
 ====
 # TPCH-Q2
@@ -132,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |  |
 |  12:SUBPLAN
@@ -161,7 +161,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |
 23:HASH JOIN [INNER JOIN]
@@ -227,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |  |
 |  12:SUBPLAN
@@ -258,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'EUROPE', !empty(r.r_nations)
 |
 23:HASH JOIN [INNER JOIN, BROADCAST]
@@ -336,7 +336,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -379,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -436,13 +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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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=632MB
+Per-Host Resource Estimates: Memory=630MB
 PLAN-ROOT SINK
 |
 13:MERGING-EXCHANGE [UNPARTITIONED]
@@ -478,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -538,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'ASIA', !empty(r.r_nations)
 |
 01:SUBPLAN
@@ -558,13 +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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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.29GB
+Per-Host Resource Estimates: Memory=1.26GB
 PLAN-ROOT SINK
 |
 23:MERGING-EXCHANGE [UNPARTITIONED]
@@ -607,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'ASIA', !empty(r.r_nations)
 |
 01:SUBPLAN
@@ -627,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -652,7 +652,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -668,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_discount <= 0.07, l_discount >= 0.05, l_quantity < 24, l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
 ====
 # TPCH-Q7
@@ -727,14 +727,14 @@ 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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 12:HASH JOIN [INNER JOIN]
 |  hash predicates: l_suppkey = s_suppkey
@@ -760,7 +760,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -794,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 13:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: s_nationkey = n1.n_nationkey
@@ -803,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 12:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_suppkey = s_suppkey
@@ -831,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -890,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 19:HASH JOIN [INNER JOIN]
 |  hash predicates: c_nationkey = n1.n_nationkey
@@ -905,7 +905,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'AMERICA', !empty(r.r_nations)
 |
 18:HASH JOIN [INNER JOIN]
@@ -939,7 +939,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -971,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 19:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: c_nationkey = n1.n_nationkey
@@ -988,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: r_name = 'AMERICA', !empty(r.r_nations)
 |
 18:HASH JOIN [INNER JOIN, BROADCAST]
@@ -1026,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -1063,8 +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
+Max Per-Host Resource Reservation: Memory=68.56MB Threads=5
+Per-Host Resource Estimates: Memory=827MB
 PLAN-ROOT SINK
 |
 16:SORT
@@ -1079,7 +1079,7 @@ 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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 13:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
@@ -1113,11 +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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(o.o_lineitems)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=143.33MB Threads=10
-Per-Host Resource Estimates: Memory=1.12GB
+Max Per-Host Resource Reservation: Memory=139.58MB Threads=10
+Per-Host Resource Estimates: Memory=1.11GB
 PLAN-ROOT SINK
 |
 22:MERGING-EXCHANGE [UNPARTITIONED]
@@ -1143,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 13:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash predicates: l_partkey = p_partkey
@@ -1181,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(o.o_lineitems)
 ====
 # TPCH-Q10
@@ -1234,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 01:SUBPLAN
 |
@@ -1253,7 +1253,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -1287,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |
 01:SUBPLAN
 |
@@ -1306,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
@@ -1364,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: n_name = 'GERMANY'
 |  |
 |  09:SUBPLAN
@@ -1389,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: n_name = 'GERMANY'
 |
 01:SUBPLAN
@@ -1435,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: n_name = 'GERMANY'
 |  |
 |  09:SUBPLAN
@@ -1468,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: n_name = 'GERMANY'
 |
 01:SUBPLAN
@@ -1534,7 +1534,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -1567,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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'
 ====
@@ -1617,7 +1617,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates on c_orders: (NOT o_comment LIKE '%special%requests%')
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=94.94MB Threads=5
@@ -1659,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates on c_orders: (NOT o_comment LIKE '%special%requests%')
 ====
 # TPCH-Q14
@@ -1678,8 +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
+Max Per-Host Resource Reservation: Memory=27.50MB Threads=3
+Per-Host Resource Estimates: Memory=394MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -1693,12 +1693,12 @@ PLAN-ROOT SINK
 |     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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
+Max Per-Host Resource Reservation: Memory=27.50MB Threads=5
+Per-Host Resource Estimates: Memory=414MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -1719,7 +1719,7 @@ PLAN-ROOT SINK
 |     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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate < '1995-10-01', l_shipdate >= '1995-09-01'
    runtime filters: RF000 -> l_partkey
 ====
@@ -1756,7 +1756,7 @@ where
 order by
   s_suppkey
 ---- PLAN
-Max Per-Host Resource Reservation: Memory=104.88MB Threads=4
+Max Per-Host Resource Reservation: Memory=103.94MB Threads=4
 Per-Host Resource Estimates: Memory=1.16GB
 PLAN-ROOT SINK
 |
@@ -1774,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=288.99MB
+|     partitions=1/1 files=4 size=288.96MB
 |     predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
 |
 06:HASH JOIN [INNER JOIN]
@@ -1789,7 +1789,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
    runtime filters: RF000 -> l.l_suppkey
 ---- DISTRIBUTEDPLAN
@@ -1827,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=288.99MB
+|     partitions=1/1 files=4 size=288.96MB
 |     predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
 |
 06:HASH JOIN [INNER JOIN, PARTITIONED]
@@ -1850,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate < '1996-04-01', l_shipdate >= '1996-01-01'
    runtime filters: RF000 -> l.l_suppkey
 ====
@@ -2000,7 +2000,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=288.99MB
+|     partitions=1/1 files=4 size=288.96MB
 |
 04:HASH JOIN [INNER JOIN]
 |  hash predicates: l_partkey = p_partkey
@@ -2012,7 +2012,7 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    runtime filters: RF000 -> l.l_partkey, RF002 -> l_partkey
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=154.94MB Threads=8
@@ -2043,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=288.99MB
+|     partitions=1/1 files=4 size=288.96MB
 |
 10:EXCHANGE [HASH(p_partkey)]
 |
@@ -2059,7 +2059,7 @@ PLAN-ROOT SINK
 |     runtime filters: RF000 -> p_partkey
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    runtime filters: RF000 -> l.l_partkey, RF002 -> l_partkey
 ====
 # TPCH-Q18
@@ -2110,7 +2110,7 @@ PLAN-ROOT SINK
 |  03:UNNEST [c.c_orders o]
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(c.c_orders)
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=24.00MB Threads=3
@@ -2145,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(c.c_orders)
 ====
 # TPCH-Q19
@@ -2186,8 +2186,8 @@ where
     )
   )
 ---- PLAN
-Max Per-Host Resource Reservation: Memory=29.88MB Threads=3
-Per-Host Resource Estimates: Memory=596MB
+Max Per-Host Resource Reservation: Memory=28.94MB Threads=3
+Per-Host Resource Estimates: Memory=595MB
 PLAN-ROOT SINK
 |
 03:AGGREGATE [FINALIZE]
@@ -2203,12 +2203,12 @@ PLAN-ROOT SINK
 |     predicates: p_size >= 1
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
+Max Per-Host Resource Reservation: Memory=28.94MB Threads=5
+Per-Host Resource Estimates: Memory=615MB
 PLAN-ROOT SINK
 |
 06:AGGREGATE [FINALIZE]
@@ -2231,7 +2231,7 @@ PLAN-ROOT SINK
 |     predicates: p_size >= 1
 |
 00:SCAN HDFS [tpch_nested_parquet.customer.c_orders.o_lineitems l]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipmode IN ('AIR', 'AIR REG'), l_shipinstruct = 'DELIVER IN PERSON'
    runtime filters: RF000 -> l_partkey
 ====
@@ -2297,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: n_name = 'CANADA'
 |  |
 |  01:SUBPLAN
@@ -2318,7 +2318,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> l.l_partkey, RF001 -> l.l_suppkey
 ---- DISTRIBUTEDPLAN
@@ -2363,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.44KB
+|  |     partitions=1/1 files=1 size=3.41KB
 |  |     predicates: n_name = 'CANADA'
 |  |
 |  01:SUBPLAN
@@ -2390,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: l_shipdate < '1995-01-01', l_shipdate >= '1994-01-01'
    runtime filters: RF000 -> l.l_partkey, RF001 -> l.l_suppkey
 ====
@@ -2465,7 +2465,7 @@ 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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: n_name = 'SAUDI ARABIA'
 |
 11:HASH JOIN [INNER JOIN]
@@ -2492,7 +2492,7 @@ PLAN-ROOT SINK
 |  04:UNNEST [c.c_orders o]
 |
 01:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderstatus = 'F'
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
@@ -2540,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.44KB
+|     partitions=1/1 files=1 size=3.41KB
 |     predicates: n_name = 'SAUDI ARABIA'
 |
 11:HASH JOIN [INNER JOIN, BROADCAST]
@@ -2569,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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems), o_orderstatus = 'F'
    predicates on l1: l1.l_receiptdate > l1.l_commitdate
@@ -2640,7 +2640,7 @@ PLAN-ROOT SINK
 |     predicates: c_acctbal > 0, 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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    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
@@ -2689,6 +2689,6 @@ PLAN-ROOT SINK
 |     predicates: c_acctbal > 0, 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=288.99MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: substr(c_phone, 1, 2) IN ('13', '31', '23', '29', '30', '18', '17')
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test b/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
index 4bbb72b..7d65337 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/explain-level2.test
@@ -17,7 +17,7 @@ row_regex:.*|  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread
 '|'
 '04:EXCHANGE [UNPARTITIONED]'
 row_regex:.*|  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=0
-'|  tuple-ids=0,1 row-size=454B cardinality=5757710'
+'|  tuple-ids=0,1 row-size=402B cardinality=5757710'
 '|  in pipelines: 00(GETNEXT)'
 '|'
 'F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3'
@@ -27,12 +27,12 @@ row_regex:.*Per-Host Resources: mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9
 '|  fk/pk conjuncts: l_orderkey = o_orderkey'
 '|  runtime filters: RF000[bloom] <- o_orderkey'
 row_regex:.*|  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B spill-buffer=[0-9.]*MB thread-reservation=0.*
-'|  tuple-ids=0,1 row-size=454B cardinality=5757710'
+'|  tuple-ids=0,1 row-size=402B cardinality=5757710'
 '|  in pipelines: 00(GETNEXT), 01(OPEN)'
 '|'
 '|--03:EXCHANGE [BROADCAST]'
 row_regex:.*|  |  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=0
-'|  |  tuple-ids=1 row-size=191B cardinality=1500000'
+'|  |  tuple-ids=1 row-size=171B cardinality=1500000'
 '|  |  in pipelines: 01(GETNEXT)'
 '|  |'
 '|  F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2'
@@ -44,7 +44,7 @@ row_regex:.*table: rows=1500000 size=.*
 '|       columns: all'
 row_regex:.*|     extrapolated-rows=disabled max-scan-range-rows=[0-9]*.*
 row_regex:.*|     mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B 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.lineitem, RANDOM]'
@@ -55,7 +55,7 @@ row_regex:.*table: rows=6001215 size=.*
 '     columns: all'
 row_regex:.*   extrapolated-rows=disabled max-scan-range-rows=[0-9]*.*
 row_regex:.*   mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=1.*
-'   tuple-ids=0 row-size=263B cardinality=6001215'
+'   tuple-ids=0 row-size=231B cardinality=6001215'
 '   in pipelines: 00(GETNEXT)'
 ====
 ---- QUERY

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test b/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
index 730b896..23e97f0 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/explain-level3.test
@@ -17,7 +17,7 @@ row_regex:.*  |  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thre
 '  |'
 '  04:EXCHANGE [UNPARTITIONED]'
 row_regex:.*     mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=0
-'     tuple-ids=0,1 row-size=454B cardinality=5757710'
+'     tuple-ids=0,1 row-size=402B cardinality=5757710'
 '     in pipelines: 00(GETNEXT)'
 ''
 'F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3'
@@ -29,12 +29,12 @@ row_regex:.*  |  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thre
 '  |  fk/pk conjuncts: l_orderkey = o_orderkey'
 '  |  runtime filters: RF000[bloom] <- o_orderkey'
 row_regex:.*  |  mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B spill-buffer=[0-9.]*MB thread-reservation=.*
-'  |  tuple-ids=0,1 row-size=454B cardinality=5757710'
+'  |  tuple-ids=0,1 row-size=402B cardinality=5757710'
 '  |  in pipelines: 00(GETNEXT), 01(OPEN)'
 '  |'
 '  |--03:EXCHANGE [BROADCAST]'
 row_regex:.*  |     mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B 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.lineitem, RANDOM]'
@@ -45,7 +45,7 @@ row_regex:.*table: rows=6001215 size=.*
 '       columns: all'
 row_regex:.*|     extrapolated-rows=disabled max-scan-range-rows=[0-9]*.*
 row_regex:.*     mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=1.*
-'     tuple-ids=0 row-size=263B cardinality=6001215'
+'     tuple-ids=0 row-size=231B cardinality=6001215'
 '     in pipelines: 00(GETNEXT)'
 ''
 'F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2'
@@ -59,7 +59,7 @@ row_regex:.*table: rows=1500000 size=.*
 '       columns: all'
 row_regex:.*   extrapolated-rows=disabled max-scan-range-rows=[0-9]*.*
 row_regex:.*     mem-estimate=[0-9.]*[A-Z]*B mem-reservation=[0-9.]*[A-Z]*B thread-reservation=.*
-'     tuple-ids=1 row-size=191B cardinality=1500000'
+'     tuple-ids=1 row-size=171B cardinality=1500000'
 '     in pipelines: 01(GETNEXT)'
 ====
 ---- QUERY

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-query/queries/QueryTest/spilling-no-debug-action.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/spilling-no-debug-action.test b/testdata/workloads/functional-query/queries/QueryTest/spilling-no-debug-action.test
index c82ea17..195500c 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/spilling-no-debug-action.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/spilling-no-debug-action.test
@@ -67,7 +67,7 @@ row_regex: .*NumHashTableBuildsSkipped: .* \([1-9][0-9]*\)
 ---- QUERY
 # Aggregation query that will OOM and fail to spill because of IMPALA-3304 without
 # any help from DEBUG_ACTION.
-set mem_limit=100m;
+set mem_limit=80m;
 select l_orderkey, group_concat(l_comment) comments
 from lineitem
 group by l_orderkey


[6/6] impala git commit: IMPALA-7367: Pack StringValue and CollectionValue slots

Posted by ta...@apache.org.
IMPALA-7367: Pack StringValue and CollectionValue slots

This change packs StringValue and CollectionValue slots to ensure
they now occupy 12 bytes instead of 16 bytes. This reduces the
memory requirements and improves the performance. Since Kudu
tuples are populated using a memcopy, 4 bytes of padding was
added to StringSlots in Kudu tables.

Testing:
Ran core tests.
Added static asserts to ensure the value sizes are as expected.
Performance tests on TPCH-40  produced 3.96% improvement.

Change-Id: I32f3b06622c087e4aa288e8db1bf4581b10d386a
Reviewed-on: http://gerrit.cloudera.org:8080/11599
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Tim Armstrong <ta...@cloudera.com>


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

Branch: refs/heads/master
Commit: 2a4835cfba7597362cc1e72e21315868c5c75d0a
Parents: 53ce6bb
Author: poojanilangekar <po...@cloudera.com>
Authored: Fri Nov 9 14:07:15 2018 -0800
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Mon Nov 19 17:27:13 2018 +0000

----------------------------------------------------------------------
 be/src/exec/text-converter.inline.h             |    6 +-
 be/src/exprs/expr-test.cc                       |   25 +-
 be/src/exprs/scalar-expr.cc                     |   24 -
 be/src/runtime/collection-value.h               |    2 +-
 be/src/runtime/descriptors.cc                   |    3 +-
 be/src/runtime/string-value.h                   |    2 +-
 be/src/runtime/types.h                          |    4 +-
 be/src/util/static-asserts.cc                   |    4 +-
 .../apache/impala/analysis/SlotDescriptor.java  |   10 +
 .../apache/impala/analysis/TupleDescriptor.java |   22 +-
 .../apache/impala/catalog/PrimitiveType.java    |    5 +-
 .../java/org/apache/impala/catalog/Type.java    |    4 +-
 .../apache/impala/analysis/AnalyzerTest.java    |   50 +-
 .../queries/PlannerTest/constant-folding.test   |   30 +-
 .../PlannerTest/fk-pk-join-detection.test       |   34 +-
 .../queries/PlannerTest/join-order.test         |   26 +-
 .../queries/PlannerTest/max-row-size.test       |  148 +-
 .../queries/PlannerTest/mt-dop-validation.test  |  100 +-
 .../PlannerTest/parquet-filtering-disabled.test |   72 +-
 .../queries/PlannerTest/parquet-filtering.test  |  132 +-
 .../queries/PlannerTest/partition-pruning.test  |    2 +-
 .../PlannerTest/resource-requirements.test      | 1376 +++++++++---------
 .../PlannerTest/sort-expr-materialization.test  |   34 +-
 .../PlannerTest/spillable-buffer-sizing.test    |  406 +++---
 .../queries/PlannerTest/subquery-rewrite.test   |   16 +-
 .../queries/PlannerTest/tablesample.test        |   18 +-
 .../queries/PlannerTest/tpcds-all.test          |   98 +-
 .../queries/PlannerTest/tpch-all.test           |   78 +-
 .../queries/PlannerTest/tpch-kudu.test          |    8 +-
 .../queries/PlannerTest/tpch-nested.test        |  166 +--
 .../queries/QueryTest/explain-level2.test       |   10 +-
 .../queries/QueryTest/explain-level3.test       |   10 +-
 .../QueryTest/spilling-no-debug-action.test     |    2 +-
 33 files changed, 1459 insertions(+), 1468 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/exec/text-converter.inline.h
----------------------------------------------------------------------
diff --git a/be/src/exec/text-converter.inline.h b/be/src/exec/text-converter.inline.h
index c56bcce..4fe0e54 100644
--- a/be/src/exec/text-converter.inline.h
+++ b/be/src/exec/text-converter.inline.h
@@ -83,7 +83,11 @@ inline bool TextConverter::WriteSlot(const SlotDescriptor* slot_desc, Tuple* tup
             reinterpret_cast<char*>(slot);
         if (UNLIKELY(str.ptr == NULL)) return false;
         if (need_escape) {
-          UnescapeString(data, str.ptr, &str.len, buffer_len);
+          // Use a temporary variable on the stack to avoid accessing an unaligned
+          // pointer.
+          int str_len = str.len;
+          UnescapeString(data, str.ptr, &str_len, buffer_len);
+          str.len = str_len;
         } else {
           memcpy(str.ptr, data, str.len);
         }

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/exprs/expr-test.cc
----------------------------------------------------------------------
diff --git a/be/src/exprs/expr-test.cc b/be/src/exprs/expr-test.cc
index bab16ca..cbf9044 100644
--- a/be/src/exprs/expr-test.cc
+++ b/be/src/exprs/expr-test.cc
@@ -7596,7 +7596,7 @@ TEST_F(ExprTest, ResultsLayoutTest) {
       exprs.push_back(CreateLiteral(t, "2016-11-09"));
     }
     if (t.IsVarLenStringType()) {
-      ValidateLayout(exprs, 16, 0, expected_offsets);
+      ValidateLayout(exprs, 12, 0, expected_offsets);
     } else {
       ValidateLayout(exprs, t.GetByteSize(), -1, expected_offsets);
     }
@@ -7607,7 +7607,8 @@ TEST_F(ExprTest, ResultsLayoutTest) {
   expected_offsets.clear();
   exprs.clear();
 
-  // Test layout adding a bunch of exprs.  This is designed to trigger padding.
+  // Test layout adding a bunch of exprs.  Previously, this triggered padding.
+  // IMPALA-7367 removed the alignment requirement, hence the values are not padded.
   // The expected result is computed along the way
   exprs.push_back(CreateLiteral(TYPE_BOOLEAN, "0"));
   exprs.push_back(CreateLiteral(TYPE_TINYINT, "0"));
@@ -7615,7 +7616,7 @@ TEST_F(ExprTest, ResultsLayoutTest) {
   expected_offsets[1].insert(expected_byte_size);
   expected_offsets[1].insert(expected_byte_size + 1);
   expected_offsets[1].insert(expected_byte_size + 2);
-  expected_byte_size += 3 * 1 + 1;  // 1 byte of padding
+  expected_byte_size += 3 * 1;
 
   exprs.push_back(CreateLiteral(TYPE_SMALLINT, "0"));
   expected_offsets[2].insert(expected_byte_size);
@@ -7623,9 +7624,7 @@ TEST_F(ExprTest, ResultsLayoutTest) {
 
   exprs.push_back(CreateLiteral(ColumnType::CreateCharType(3), "0"));
   expected_offsets[3].insert(expected_byte_size);
-  expected_byte_size += 3 + 3; // 3 byte of padding
-  ASSERT_EQ(expected_byte_size % 4, 0);
-
+  expected_byte_size += 3;
   exprs.push_back(CreateLiteral(TYPE_INT, "0"));
   exprs.push_back(CreateLiteral(TYPE_FLOAT, "0"));
   exprs.push_back(CreateLiteral(TYPE_FLOAT, "0"));
@@ -7634,8 +7633,7 @@ TEST_F(ExprTest, ResultsLayoutTest) {
   expected_offsets[4].insert(expected_byte_size + 4);
   expected_offsets[4].insert(expected_byte_size + 8);
   expected_offsets[4].insert(expected_byte_size + 12);
-  expected_byte_size += 4 * 4 + 4;  // 4 bytes of padding
-  ASSERT_EQ(expected_byte_size % 8, 0);
+  expected_byte_size += 4 * 4;
 
   exprs.push_back(CreateLiteral(TYPE_BIGINT, "0"));
   exprs.push_back(CreateLiteral(TYPE_BIGINT, "0"));
@@ -7647,8 +7645,7 @@ TEST_F(ExprTest, ResultsLayoutTest) {
   expected_offsets[8].insert(expected_byte_size + 16);
   expected_offsets[8].insert(expected_byte_size + 24);
   expected_offsets[8].insert(expected_byte_size + 32);
-  expected_byte_size += 5 * 8;      // No more padding
-  ASSERT_EQ(expected_byte_size % 8, 0);
+  expected_byte_size += 5 * 8;
 
   exprs.push_back(CreateLiteral(TYPE_TIMESTAMP, "2016-11-09"));
   exprs.push_back(CreateLiteral(TYPE_TIMESTAMP, "2016-11-09"));
@@ -7657,17 +7654,15 @@ TEST_F(ExprTest, ResultsLayoutTest) {
   expected_offsets[16].insert(expected_byte_size + 16);
   expected_offsets[16].insert(expected_byte_size + 32);
   expected_byte_size += 3 * 16;
-  ASSERT_EQ(expected_byte_size % 8, 0);
 
   exprs.push_back(CreateLiteral(TYPE_STRING, "0"));
   exprs.push_back(CreateLiteral(TYPE_STRING, "0"));
   exprs.push_back(CreateLiteral(ColumnType::CreateVarcharType(1), "0"));
   expected_offsets[0].insert(expected_byte_size);
-  expected_offsets[0].insert(expected_byte_size + 16);
-  expected_offsets[0].insert(expected_byte_size + 32);
+  expected_offsets[0].insert(expected_byte_size + 12);
+  expected_offsets[0].insert(expected_byte_size + 24);
   expected_var_begin = expected_byte_size;
-  expected_byte_size += 3 * 16;
-  ASSERT_EQ(expected_byte_size % 8, 0);
+  expected_byte_size += 3 * 12;
 
   // Validate computed layout
   ValidateLayout(exprs, expected_byte_size, expected_var_begin, expected_offsets);

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/exprs/scalar-expr.cc
----------------------------------------------------------------------
diff --git a/be/src/exprs/scalar-expr.cc b/be/src/exprs/scalar-expr.cc
index 00e6709..e69146b 100644
--- a/be/src/exprs/scalar-expr.cc
+++ b/be/src/exprs/scalar-expr.cc
@@ -225,8 +225,6 @@ struct MemLayoutData {
   bool variable_length;
   int alignment;
 
-  // TODO: sort by type as well?  Any reason to do this?
-  // TODO: would sorting in reverse order of size be faster due to better packing?
   // TODO: why put var-len at end?
   bool operator<(const MemLayoutData& rhs) const {
     // variable_len go at end
@@ -243,10 +241,6 @@ int ScalarExpr::ComputeResultsLayout(const vector<ScalarExpr*>& exprs,
     return 0;
   }
 
-  // Don't align more than word (8-byte) size. There's no performance gain beyond 8-byte
-  // alignment, and there is a performance gain to keeping the results buffer small. This
-  // is consistent with what compilers do.
-  int MAX_ALIGNMENT = sizeof(int64_t);
 
   vector<MemLayoutData> data;
   data.resize(exprs.size());
@@ -259,33 +253,15 @@ int ScalarExpr::ComputeResultsLayout(const vector<ScalarExpr*>& exprs,
     DCHECK_GT(data[i].byte_size, 0);
     data[i].variable_length = exprs[i]->type().IsVarLenStringType();
 
-    bool fixed_len_char = exprs[i]->type().type == TYPE_CHAR && !data[i].variable_length;
-
-    // Compute the alignment of this value. Values should be self-aligned for optimal
-    // memory access speed, up to the max alignment (e.g., if this value is an int32_t,
-    // its offset in the buffer should be divisible by sizeof(int32_t)).
-    // TODO: is self-alignment really necessary for perf?
-    if (!fixed_len_char) {
-      data[i].alignment = min(data[i].byte_size, MAX_ALIGNMENT);
-    } else {
-      // Fixed-len chars are aligned to a one-byte boundary, as if they were char[],
-      // leaving no padding between them and the previous value.
-      data[i].alignment = 1;
-    }
   }
 
   sort(data.begin(), data.end());
 
-  // Walk the types and store in a packed aligned layout
   int byte_offset = 0;
-
   offsets->resize(exprs.size());
   *var_result_begin = -1;
 
   for (int i = 0; i < data.size(); ++i) {
-    // Increase byte_offset so data[i] is at the right alignment (i.e. add padding between
-    // this value and the previous).
-    byte_offset = BitUtil::RoundUp(byte_offset, data[i].alignment);
 
     (*offsets)[data[i].expr_idx] = byte_offset;
     if (data[i].variable_length && *var_result_begin == -1) {

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/runtime/collection-value.h
----------------------------------------------------------------------
diff --git a/be/src/runtime/collection-value.h b/be/src/runtime/collection-value.h
index 29ecb17..a71eff8 100644
--- a/be/src/runtime/collection-value.h
+++ b/be/src/runtime/collection-value.h
@@ -27,7 +27,7 @@ namespace impala {
 /// arrays and maps are effectively indistinguishable; a map can be thought of as an array
 /// of key/value structs (and neither of these fields are necessarily materialized in the
 /// item tuples).
-struct CollectionValue {
+struct __attribute__((__packed__)) CollectionValue {
   /// Pointer to buffer containing item tuples.
   uint8_t* ptr;
 

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/runtime/descriptors.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/descriptors.cc b/be/src/runtime/descriptors.cc
index 12de054..068274a 100644
--- a/be/src/runtime/descriptors.cc
+++ b/be/src/runtime/descriptors.cc
@@ -742,7 +742,8 @@ llvm::StructType* TupleDescriptor::GetLlvmStruct(LlvmCodeGen* codegen) const {
   for (SlotDescriptor* slot: slots()) {
     // Verify that the byte offset in the llvm struct matches the tuple offset
     // computed in the FE.
-    DCHECK_EQ(layout->getElementOffset(slot->llvm_field_idx()), slot->tuple_offset());
+    DCHECK_EQ(layout->getElementOffset(slot->llvm_field_idx()), slot->tuple_offset())
+        << id_;
   }
   return tuple_struct;
 }

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/runtime/string-value.h
----------------------------------------------------------------------
diff --git a/be/src/runtime/string-value.h b/be/src/runtime/string-value.h
index 5b7a7e4..e0e624b 100644
--- a/be/src/runtime/string-value.h
+++ b/be/src/runtime/string-value.h
@@ -33,7 +33,7 @@ namespace impala {
 /// The returned StringValue of all functions that return StringValue
 /// shares its buffer with the parent.
 /// TODO: rename this to be less confusing with impala_udf::StringVal.
-struct StringValue {
+struct __attribute__((__packed__)) StringValue {
   /// The current limitation for a string instance is 1GB character data.
   /// See IMPALA-1619 for more details.
   static const int MAX_LENGTH = (1 << 30);

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/runtime/types.h
----------------------------------------------------------------------
diff --git a/be/src/runtime/types.h b/be/src/runtime/types.h
index 1509c1f..af4f9a9 100644
--- a/be/src/runtime/types.h
+++ b/be/src/runtime/types.h
@@ -260,13 +260,13 @@ struct ColumnType {
     switch (type) {
       case TYPE_STRING:
       case TYPE_VARCHAR:
-        return 16;
+        return 12;
       case TYPE_CHAR:
       case TYPE_FIXED_UDA_INTERMEDIATE:
         return len;
       case TYPE_ARRAY:
       case TYPE_MAP:
-        return 16;
+        return 12;
       case TYPE_STRUCT:
         DCHECK(false) << "TYPE_STRUCT slot not possible";
       default:

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/be/src/util/static-asserts.cc
----------------------------------------------------------------------
diff --git a/be/src/util/static-asserts.cc b/be/src/util/static-asserts.cc
index 7662906..0680c73 100644
--- a/be/src/util/static-asserts.cc
+++ b/be/src/util/static-asserts.cc
@@ -18,6 +18,7 @@
 #include <boost/static_assert.hpp>
 
 #include "common/hdfs.h"
+#include "runtime/collection-value.h"
 #include "runtime/string-value.h"
 #include "runtime/timestamp-value.h"
 #include "udf/udf.h"
@@ -28,12 +29,13 @@ namespace impala {
 // at compile time.  If these asserts fail, the compile will fail.
 class UnusedClass {
  private:
-  BOOST_STATIC_ASSERT(sizeof(StringValue) == 16);
+  BOOST_STATIC_ASSERT(sizeof(StringValue) == 12);
   BOOST_STATIC_ASSERT(offsetof(StringValue, len) == 8);
   BOOST_STATIC_ASSERT(sizeof(TimestampValue) == 16);
   BOOST_STATIC_ASSERT(offsetof(TimestampValue, date_) == 8);
   BOOST_STATIC_ASSERT(sizeof(boost::posix_time::time_duration) == 8);
   BOOST_STATIC_ASSERT(sizeof(boost::gregorian::date) == 4);
+  BOOST_STATIC_ASSERT(sizeof(CollectionValue) == 12);
   BOOST_STATIC_ASSERT(sizeof(hdfsFS) == sizeof(void*));
   BOOST_STATIC_ASSERT(sizeof(hdfsFile) == sizeof(void*));
 

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java b/fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
index aae3863..aae3efa 100644
--- a/fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
+++ b/fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
@@ -22,6 +22,7 @@ import java.util.List;
 
 import org.apache.impala.catalog.Column;
 import org.apache.impala.catalog.ColumnStats;
+import org.apache.impala.catalog.FeKuduTable;
 import org.apache.impala.catalog.KuduColumn;
 import org.apache.impala.catalog.Type;
 import org.apache.impala.thrift.TSlotDescriptor;
@@ -182,6 +183,15 @@ public class SlotDescriptor {
   }
 
   /**
+   * Returns true if this slot is of STRING type in a kudu table.
+   */
+  public boolean isKuduStringSlot() {
+    if (getParent() == null) return false;
+    if (!(getParent().getTable() instanceof FeKuduTable)) return false;
+    return getType().isStringType();
+  }
+
+  /**
    * Assembles the absolute materialized path to this slot starting from the schema
    * root. The materialized path points to the first non-struct schema element along the
    * path starting from the parent's tuple path to this slot's path.

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/fe/src/main/java/org/apache/impala/analysis/TupleDescriptor.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/analysis/TupleDescriptor.java b/fe/src/main/java/org/apache/impala/analysis/TupleDescriptor.java
index bf2d310..98621ef 100644
--- a/fe/src/main/java/org/apache/impala/analysis/TupleDescriptor.java
+++ b/fe/src/main/java/org/apache/impala/analysis/TupleDescriptor.java
@@ -70,9 +70,12 @@ import com.google.common.collect.Lists;
  *
  * Example: select bool_col, int_col, string_col, smallint_col from functional.alltypes
  * Slots:   string_col|int_col|smallint_col|bool_col|null_byte
- * Offsets: 0          16      20           22       23
+ * Offsets: 0          12      16           18       19
  */
 public class TupleDescriptor {
+  // Padding size in bytes for Kudu string slots.
+  private static final int KUDU_STRING_PADDING = 4;
+
   private final TupleId id_;
   private final String debugName_;  // debug-only
   private final ArrayList<SlotDescriptor> slots_ = Lists.newArrayList();
@@ -261,17 +264,24 @@ public class TupleDescriptor {
     for (SlotDescriptor d: slots_) {
       if (!d.isMaterialized()) continue;
       ColumnStats stats = d.getStats();
+      int slotSize = d.getType().getSlotSize();
+
       if (stats.hasAvgSerializedSize()) {
         avgSerializedSize_ += d.getStats().getAvgSerializedSize();
       } else {
         // TODO: for computed slots, try to come up with stats estimates
-        avgSerializedSize_ += d.getType().getSlotSize();
+        avgSerializedSize_ += slotSize;
+      }
+      // Add padding for a KUDU string slot.
+      if (d.isKuduStringSlot()) {
+        slotSize += KUDU_STRING_PADDING;
+        avgSerializedSize_ += KUDU_STRING_PADDING;
       }
-      if (!slotsBySize.containsKey(d.getType().getSlotSize())) {
-        slotsBySize.put(d.getType().getSlotSize(), new ArrayList<SlotDescriptor>());
+      if (!slotsBySize.containsKey(slotSize)) {
+        slotsBySize.put(slotSize, new ArrayList<SlotDescriptor>());
       }
-      totalSlotSize += d.getType().getSlotSize();
-      slotsBySize.get(d.getType().getSlotSize()).add(d);
+      totalSlotSize += slotSize;
+      slotsBySize.get(slotSize).add(d);
       if (d.getIsNullable() || alwaysAddNullBit) ++numNullBits;
     }
     // we shouldn't have anything of size <= 0

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java b/fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
index e09fd7b..45cfe12 100644
--- a/fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
+++ b/fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
@@ -39,9 +39,8 @@ public enum PrimitiveType {
   // The timestamp structure is 12 bytes, Aligning to 8 bytes makes it 16.
   TIMESTAMP("TIMESTAMP", 16, TPrimitiveType.TIMESTAMP),
   // 8-byte pointer and 4-byte length indicator (12 bytes total).
-  // Aligning to 8 bytes so 16 total.
-  STRING("STRING", 16, TPrimitiveType.STRING),
-  VARCHAR("VARCHAR", 16, TPrimitiveType.VARCHAR),
+  STRING("STRING", 12, TPrimitiveType.STRING),
+  VARCHAR("VARCHAR", 12, TPrimitiveType.VARCHAR),
 
   // Unsupported scalar type.
   BINARY("BINARY", -1, TPrimitiveType.BINARY),

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/fe/src/main/java/org/apache/impala/catalog/Type.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/catalog/Type.java b/fe/src/main/java/org/apache/impala/catalog/Type.java
index 664fca1..d20090a 100644
--- a/fe/src/main/java/org/apache/impala/catalog/Type.java
+++ b/fe/src/main/java/org/apache/impala/catalog/Type.java
@@ -224,9 +224,7 @@ public abstract class Type {
    */
   public int getSlotSize() {
     // 8-byte pointer and 4-byte length indicator (12 bytes total).
-    // Per struct alignment rules, there is an extra 4 bytes of padding to align to 8
-    // bytes so 16 bytes total.
-    if (isCollectionType()) return 16;
+    if (isCollectionType()) return 12;
     throw new IllegalStateException("getSlotSize() not implemented for type " + toSql());
   }
 

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
----------------------------------------------------------------------
diff --git a/fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java b/fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
index 643f85e..e83202e 100644
--- a/fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
+++ b/fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
@@ -116,20 +116,20 @@ public class AnalyzerTest extends FrontendTestBase {
     tupleDesc.materializeSlots();
     descTbl.computeMemLayout();
 
-    Assert.assertEquals(97.0f, tupleDesc.getAvgSerializedSize(), 0.0);
-    checkLayoutParams("functional.alltypes.date_string_col", 16, 0, 88, 0, analyzer);
-    checkLayoutParams("functional.alltypes.string_col", 16, 16, 88, 1, analyzer);
-    checkLayoutParams("functional.alltypes.timestamp_col", 16, 32, 88, 2, analyzer);
-    checkLayoutParams("functional.alltypes.bigint_col", 8, 48, 88, 3, analyzer);
-    checkLayoutParams("functional.alltypes.double_col", 8, 56, 88, 4, analyzer);
-    checkLayoutParams("functional.alltypes.id", 4, 64, 88, 5, analyzer);
-    checkLayoutParams("functional.alltypes.int_col", 4, 68, 88, 6, analyzer);
-    checkLayoutParams("functional.alltypes.float_col", 4, 72, 88, 7, analyzer);
-    checkLayoutParams("functional.alltypes.year", 4, 76, 89, 0, analyzer);
-    checkLayoutParams("functional.alltypes.month", 4, 80, 89, 1, analyzer);
-    checkLayoutParams("functional.alltypes.smallint_col", 2, 84, 89, 2, analyzer);
-    checkLayoutParams("functional.alltypes.bool_col", 1, 86, 89, 3, analyzer);
-    checkLayoutParams("functional.alltypes.tinyint_col", 1, 87, 89, 4, analyzer);
+    Assert.assertEquals(89.0f, tupleDesc.getAvgSerializedSize(), 0.0);
+    checkLayoutParams("functional.alltypes.timestamp_col", 16, 0, 80, 0, analyzer);
+    checkLayoutParams("functional.alltypes.date_string_col", 12, 16, 80, 1, analyzer);
+    checkLayoutParams("functional.alltypes.string_col", 12, 28, 80, 2, analyzer);
+    checkLayoutParams("functional.alltypes.bigint_col", 8, 40, 80, 3, analyzer);
+    checkLayoutParams("functional.alltypes.double_col", 8, 48, 80, 4, analyzer);
+    checkLayoutParams("functional.alltypes.id", 4, 56, 80, 5, analyzer);
+    checkLayoutParams("functional.alltypes.int_col", 4, 60, 80, 6, analyzer);
+    checkLayoutParams("functional.alltypes.float_col", 4, 64, 80, 7, analyzer);
+    checkLayoutParams("functional.alltypes.year", 4, 68, 81, 0, analyzer);
+    checkLayoutParams("functional.alltypes.month", 4, 72, 81, 1, analyzer);
+    checkLayoutParams("functional.alltypes.smallint_col", 2, 76, 81, 2, analyzer);
+    checkLayoutParams("functional.alltypes.bool_col", 1, 78, 81, 3, analyzer);
+    checkLayoutParams("functional.alltypes.tinyint_col", 1, 79, 81, 4, analyzer);
   }
 
   private void testNonNullable() throws AnalysisException {
@@ -183,22 +183,22 @@ public class AnalyzerTest extends FrontendTestBase {
     slots.get(9).setIsMaterialized(false);
     descTbl.computeMemLayout();
 
-    Assert.assertEquals(68.0f, tupleDesc.getAvgSerializedSize(), 0.0);
+    Assert.assertEquals(64.0f, tupleDesc.getAvgSerializedSize(), 0.0);
     // Check non-materialized slots.
     checkLayoutParams("functional.alltypes.id", 0, -1, 0, 0, analyzer);
     checkLayoutParams("functional.alltypes.double_col", 0, -1, 0, 0, analyzer);
     checkLayoutParams("functional.alltypes.string_col", 0, -1, 0, 0, analyzer);
     // Check materialized slots.
-    checkLayoutParams("functional.alltypes.date_string_col", 16, 0, 60, 0, analyzer);
-    checkLayoutParams("functional.alltypes.timestamp_col", 16, 16, 60, 1, analyzer);
-    checkLayoutParams("functional.alltypes.bigint_col", 8, 32, 60, 2, analyzer);
-    checkLayoutParams("functional.alltypes.int_col", 4, 40, 60, 3, analyzer);
-    checkLayoutParams("functional.alltypes.float_col", 4, 44, 60, 4, analyzer);
-    checkLayoutParams("functional.alltypes.year", 4, 48, 60, 5, analyzer);
-    checkLayoutParams("functional.alltypes.month", 4, 52, 60, 6, analyzer);
-    checkLayoutParams("functional.alltypes.smallint_col", 2, 56, 60, 7, analyzer);
-    checkLayoutParams("functional.alltypes.bool_col", 1, 58, 61, 0, analyzer);
-    checkLayoutParams("functional.alltypes.tinyint_col", 1, 59, 61, 1, analyzer);
+    checkLayoutParams("functional.alltypes.timestamp_col", 16, 0, 56, 0, analyzer);
+    checkLayoutParams("functional.alltypes.date_string_col", 12, 16, 56, 1, analyzer);
+    checkLayoutParams("functional.alltypes.bigint_col", 8, 28, 56, 2, analyzer);
+    checkLayoutParams("functional.alltypes.int_col", 4, 36, 56, 3, analyzer);
+    checkLayoutParams("functional.alltypes.float_col", 4, 40, 56, 4, analyzer);
+    checkLayoutParams("functional.alltypes.year", 4, 44, 56, 5, analyzer);
+    checkLayoutParams("functional.alltypes.month", 4, 48, 56, 6, analyzer);
+    checkLayoutParams("functional.alltypes.smallint_col", 2, 52, 56, 7, analyzer);
+    checkLayoutParams("functional.alltypes.bool_col", 1, 54, 57, 0, analyzer);
+    checkLayoutParams("functional.alltypes.tinyint_col", 1, 55, 57, 1, analyzer);
   }
 
   private void checkLayoutParams(SlotDescriptor d, int byteSize, int byteOffset,

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test b/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
index 88d23d4..5b1cbe4 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/constant-folding.test
@@ -15,34 +15,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=52B cardinality=1500000
+|  tuple-ids=2,1,0 row-size=44B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=52B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=44B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=28B cardinality=100
+|  |  tuple-ids=2,1 row-size=24B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=28B cardinality=10
+|  |  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=24B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=24B cardinality=1
+|  |  |     tuple-ids=1 row-size=20B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems]
@@ -63,7 +63,7 @@ PLAN-ROOT SINK
    predicates on o: !empty(o.o_lineitems), o_orderkey = CAST(4 AS BIGINT)
    predicates on o_lineitems: CAST(20 AS BIGINT) + CAST(l_linenumber AS BIGINT) < CAST(0 AS BIGINT)
    stored statistics:
-     table: rows=150000 size=289.00MB
+     table: rows=150000 size=288.96MB
      columns missing stats: c_orders
    extrapolated-rows=disabled max-scan-range-rows=44227
    parquet statistics predicates: c_custkey > CAST(10 AS BIGINT)
@@ -72,7 +72,7 @@ PLAN-ROOT SINK
    parquet dictionary predicates on o: o_orderkey = CAST(4 AS BIGINT)
    parquet dictionary predicates on o_lineitems: CAST(20 AS BIGINT) + CAST(l_linenumber AS BIGINT) < CAST(0 AS BIGINT)
    mem-estimate=264.00MB mem-reservation=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=15000
+   tuple-ids=0 row-size=20B cardinality=15000
    in pipelines: 00(GETNEXT)
 ====
 # Test HBase scan node.
@@ -96,7 +96,7 @@ PLAN-ROOT SINK
      table: rows=10000
      columns: all
    mem-estimate=4.00KB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=119B cardinality=1
+   tuple-ids=0 row-size=107B cardinality=1
    in pipelines: 00(GETNEXT)
 ====
 # Test datasource scan node.
@@ -115,7 +115,7 @@ PLAN-ROOT SINK
 data source predicates: CAST(tinyint_col AS DOUBLE) < CAST(256 AS DOUBLE), int_col < CAST(2 AS INT)
 predicates: float_col != CAST(0 AS FLOAT)
    mem-estimate=1.00GB mem-reservation=0B thread-reservation=0
-   tuple-ids=0 row-size=116B cardinality=500
+   tuple-ids=0 row-size=112B cardinality=500
    in pipelines: 00(GETNEXT)
 ====
 # Test aggregation.
@@ -354,14 +354,14 @@ PLAN-ROOT SINK
 |  order by: greatest(20, bigint_col) 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=61B cardinality=7300
+|  tuple-ids=3,2 row-size=53B cardinality=7300
 |  in pipelines: 01(GETNEXT)
 |
 01:SORT
 |  order by: concat('ab', string_col) ASC NULLS FIRST, greatest(20, bigint_col) ASC
 |  materialized: concat('ab', string_col), greatest(20, bigint_col)
 |  mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=3 row-size=53B cardinality=7300
+|  tuple-ids=3 row-size=45B cardinality=7300
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 00:SCAN HDFS [functional.alltypes]
@@ -372,7 +372,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)
 ====
 # Test sort node.

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test b/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
index 881f2da..8b71f11 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/fk-pk-join-detection.test
@@ -5,7 +5,7 @@ on ss_customer_sk = c_customer_sk
 where c_salutation = 'Mrs.'
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=185.50MB mem-reservation=25.50MB thread-reservation=3 runtime-filters-memory=1.00MB
+|  Per-Host Resources: mem-estimate=181.75MB mem-reservation=21.75MB thread-reservation=3 runtime-filters-memory=1.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -13,8 +13,8 @@ PLAN-ROOT SINK
 |  hash predicates: ss_customer_sk = c_customer_sk
 |  fk/pk conjuncts: ss_customer_sk = c_customer_sk
 |  runtime filters: RF000[bloom] <- c_customer_sk
-|  mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=529700
+|  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0
+|  tuple-ids=0,1 row-size=319B cardinality=529700
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpcds.customer]
@@ -25,7 +25,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=255B cardinality=16667
+|     tuple-ids=1 row-size=219B cardinality=16667
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpcds.store_sales]
@@ -48,7 +48,7 @@ on ss_customer_sk = c_customer_sk
 where c_salutation = 'Mrs.'
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=184.50MB mem-reservation=24.50MB thread-reservation=3
+|  Per-Host Resources: mem-estimate=180.75MB mem-reservation=20.75MB thread-reservation=3
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -56,8 +56,8 @@ PLAN-ROOT SINK
 |  hash predicates: ss_customer_sk = c_customer_sk
 |  fk/pk conjuncts: ss_customer_sk = c_customer_sk
 |  other predicates: c_salutation = 'Mrs.'
-|  mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB thread-reservation=0
-|  tuple-ids=0,1N row-size=355B cardinality=2880404
+|  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0
+|  tuple-ids=0,1N row-size=319B cardinality=2880404
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpcds.customer]
@@ -68,7 +68,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=255B cardinality=16667
+|     tuple-ids=1 row-size=219B cardinality=16667
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpcds.store_sales]
@@ -90,7 +90,7 @@ on ss_customer_sk = c_customer_sk
 where c_salutation = 'Mrs.'
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=185.50MB mem-reservation=25.50MB thread-reservation=3 runtime-filters-memory=1.00MB
+|  Per-Host Resources: mem-estimate=181.75MB mem-reservation=21.75MB thread-reservation=3 runtime-filters-memory=1.00MB
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -98,8 +98,8 @@ PLAN-ROOT SINK
 |  hash predicates: ss_customer_sk = c_customer_sk
 |  fk/pk conjuncts: ss_customer_sk = c_customer_sk
 |  runtime filters: RF000[bloom] <- c_customer_sk
-|  mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB thread-reservation=0
-|  tuple-ids=0N,1 row-size=355B cardinality=529700
+|  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0
+|  tuple-ids=0N,1 row-size=319B cardinality=529700
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpcds.customer]
@@ -110,7 +110,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=255B cardinality=16667
+|     tuple-ids=1 row-size=219B cardinality=16667
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpcds.store_sales]
@@ -223,7 +223,7 @@ PLAN-ROOT SINK
 |  fk/pk conjuncts: b.d_date_sk = a.d_date_sk
 |  runtime filters: RF000[bloom] <- a.d_date_sk
 |  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB thread-reservation=0
-|  tuple-ids=1,0 row-size=606B cardinality=36525
+|  tuple-ids=1,0 row-size=510B cardinality=36525
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 |--00:SCAN HDFS [tpcds.date_dim a]
@@ -234,7 +234,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=73049
 |     mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=0 row-size=303B cardinality=36525
+|     tuple-ids=0 row-size=255B cardinality=36525
 |     in pipelines: 00(GETNEXT)
 |
 01:SCAN HDFS [tpcds.date_dim b]
@@ -245,7 +245,7 @@ PLAN-ROOT SINK
      columns: all
    extrapolated-rows=disabled max-scan-range-rows=73049
    mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-   tuple-ids=1 row-size=303B cardinality=73049
+   tuple-ids=1 row-size=255B cardinality=73049
    in pipelines: 01(GETNEXT)
 ====
 # Single query with various join types combined.
@@ -364,7 +364,7 @@ PLAN-ROOT SINK
 |  fk/pk conjuncts: assumed fk/pk
 |  runtime filters: RF000[bloom] <- c_customer_sk / 100
 |  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1 row-size=355B cardinality=2880404
+|  tuple-ids=0,1 row-size=319B cardinality=2880404
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--01:SCAN HDFS [tpcds.customer]
@@ -374,7 +374,7 @@ PLAN-ROOT SINK
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=100000
 |     mem-estimate=48.00MB mem-reservation=8.00MB thread-reservation=1
-|     tuple-ids=1 row-size=255B cardinality=100000
+|     tuple-ids=1 row-size=219B cardinality=100000
 |     in pipelines: 01(GETNEXT)
 |
 00:SCAN HDFS [tpcds.store_sales]

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test b/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
index 3330b2e..fc6abeb 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
@@ -543,7 +543,6 @@ PLAN-ROOT SINK
    predicates: l_commitdate < l_receiptdate
    runtime filters: RF000 -> l_orderkey
 ====
-# the largest input is prevented from becoming the leftmost input by the full outer join
 select o_orderpriority, count(*) as order_count
 from tpch.orders
   full outer join tpch.lineitem
@@ -561,13 +560,13 @@ PLAN-ROOT SINK
 |  group by: o_orderpriority
 |
 02:HASH JOIN [FULL OUTER JOIN]
-|  hash predicates: o_orderkey = l_orderkey
+|  hash predicates: l_orderkey = o_orderkey
 |
-|--01:SCAN HDFS [tpch.lineitem]
-|     partitions=1/1 files=1 size=718.94MB
+|--00:SCAN HDFS [tpch.orders]
+|     partitions=1/1 files=1 size=162.56MB
 |
-00:SCAN HDFS [tpch.orders]
-   partitions=1/1 files=1 size=162.56MB
+01:SCAN HDFS [tpch.lineitem]
+   partitions=1/1 files=1 size=718.94MB
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |
@@ -601,7 +600,6 @@ PLAN-ROOT SINK
 01:SCAN HDFS [tpch.lineitem]
    partitions=1/1 files=1 size=718.94MB
 ====
-# the largest input is prevented from becoming the leftmost input by the right outer join
 select o_orderpriority, count(*) as order_count
 from tpch.orders
   right outer join tpch.lineitem
@@ -618,16 +616,14 @@ PLAN-ROOT SINK
 |  output: count(*)
 |  group by: o_orderpriority
 |
-02:HASH JOIN [RIGHT OUTER JOIN]
-|  hash predicates: o_orderkey = l_orderkey
-|  runtime filters: RF000 <- l_orderkey
+02:HASH JOIN [LEFT OUTER JOIN]
+|  hash predicates: l_orderkey = o_orderkey
 |
-|--01:SCAN HDFS [tpch.lineitem]
-|     partitions=1/1 files=1 size=718.94MB
+|--00:SCAN HDFS [tpch.orders]
+|     partitions=1/1 files=1 size=162.56MB
 |
-00:SCAN HDFS [tpch.orders]
-   partitions=1/1 files=1 size=162.56MB
-   runtime filters: RF000 -> o_orderkey
+01:SCAN HDFS [tpch.lineitem]
+   partitions=1/1 files=1 size=718.94MB
 ---- DISTRIBUTEDPLAN
 PLAN-ROOT SINK
 |

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/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 3ef04a7..87fcfb4 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/max-row-size.test
@@ -6,19 +6,19 @@ from tpch_parquet.customer
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=33.97MB Threads=5
 Per-Host Resource Estimates: Memory=68MB
-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
@@ -28,12 +28,12 @@ Per-Host Resources: mem-estimate=41.95MB mem-reservation=33.94MB thread-reservat
 |  fk/pk conjuncts: c_nationkey = n_nationkey
 |  runtime filters: RF000[bloom] <- n_nationkey
 |  mem-estimate=16.94MB mem-reservation=16.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
@@ -45,7 +45,7 @@ Per-Host Resources: mem-estimate=41.95MB mem-reservation=33.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]
@@ -56,7 +56,7 @@ Per-Host Resources: mem-estimate=41.95MB mem-reservation=33.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)
 ====
 # Join with large build side.
@@ -66,34 +66,34 @@ 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=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=86.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=359.29MB mem-reservation=86.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=46.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=0,1N row-size=454B cardinality=6001215
+|  mem-estimate=268.94MB mem-reservation=46.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
@@ -105,7 +105,7 @@ Per-Host Resources: mem-estimate=390.80MB mem-reservation=86.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]
@@ -113,9 +113,9 @@ Per-Host Resources: mem-estimate=390.80MB mem-reservation=86.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)
 ====
 # Null-aware anti-join with medium build side.
@@ -130,13 +130,13 @@ Analyzed query: SELECT * FROM tpch_parquet.lineitem NULL AWARE LEFT ANTI JOIN
 `$a$1`.`$c$1`
 
 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=0 row-size=263B cardinality=6001215
+|  mem-estimate=10.69MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
@@ -144,7 +144,7 @@ Per-Host Resources: mem-estimate=124.02MB mem-reservation=74.00MB thread-reserva
 02:HASH JOIN [NULL AWARE LEFT ANTI JOIN, BROADCAST]
 |  hash predicates: l_orderkey = o_orderkey
 |  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=1.00MB thread-reservation=0
-|  tuple-ids=0 row-size=263B cardinality=6001215
+|  tuple-ids=0 row-size=231B cardinality=6001215
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
 |--03:EXCHANGE [BROADCAST]
@@ -169,9 +169,9 @@ Per-Host Resources: mem-estimate=124.02MB 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)
 ====
 # Mid NDV aggregation.
@@ -182,46 +182,46 @@ from tpch_parquet.lineitem
 group by 1, 2
 having count(*) = 1
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=125.00MB Threads=7
-Per-Host Resource Estimates: Memory=293MB
-Analyzed query: SELECT
+Max Per-Host Resource Reservation: Memory=110.00MB Threads=7
+Per-Host Resource Estimates: Memory=272MB
+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=56.11MB mem-reservation=46.00MB thread-reservation=1
+Per-Host Resources: mem-estimate=41.10MB mem-reservation=31.00MB thread-reservation=1
 07:AGGREGATE [FINALIZE]
 |  output: count:merge(*)
 |  group by: l_orderkey, o_orderstatus
 |  having: count(*) = CAST(1 AS BIGINT)
-|  mem-estimate=46.00MB mem-reservation=46.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=2 row-size=33B cardinality=4690314
+|  mem-estimate=31.00MB mem-reservation=31.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=106.22MB mem-reservation=66.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+Per-Host Resources: mem-estimate=99.65MB mem-reservation=66.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]
@@ -229,12 +229,12 @@ Per-Host Resources: mem-estimate=106.22MB mem-reservation=66.00MB thread-reserva
 |  fk/pk conjuncts: l_orderkey = o_orderkey
 |  runtime filters: RF000[bloom] <- o_orderkey
 |  mem-estimate=31.00MB mem-reservation=31.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
@@ -246,7 +246,7 @@ Per-Host Resources: mem-estimate=106.22MB mem-reservation=66.00MB thread-reserva
 |       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)]
@@ -262,7 +262,7 @@ 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)
@@ -273,38 +273,38 @@ select distinct *
 from tpch_parquet.lineitem
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=120.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=46.00MB thread-reservation=1
+Per-Host Resources: mem-estimate=737.12MB mem-reservation=46.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=46.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=263B cardinality=6001215
+|  mem-estimate=726.43MB mem-reservation=46.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]
@@ -312,9 +312,9 @@ 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)
 ====
 # High NDV aggregation with string aggregation function.
@@ -324,42 +324,42 @@ from tpch_parquet.lineitem
 group by 1, 2
 ---- DISTRIBUTEDPLAN
 Max Per-Host Resource Reservation: Memory=98.00MB Threads=4
-Per-Host Resource Estimates: Memory=302MB
+Per-Host Resource Estimates: Memory=276MB
 Analyzed query: SELECT l_orderkey, l_partkey, group_concat(l_linestatus, ',')
 FROM tpch_parquet.lineitem GROUP BY CAST(1 AS INVALID_TYPE), CAST(2 AS
 INVALID_TYPE)
 
 F02: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.09MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=10.11MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=32B cardinality=6001215
+|  mem-estimate=10.09MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=28B cardinality=6001215
 |  in pipelines: 03(GETNEXT)
 |
 F01:PLAN FRAGMENT [HASH(l_orderkey,l_partkey)] hosts=3 instances=3
-Per-Host Resources: mem-estimate=110.83MB mem-reservation=48.00MB thread-reservation=1
+Per-Host Resources: mem-estimate=98.23MB mem-reservation=48.00MB thread-reservation=1
 03:AGGREGATE [FINALIZE]
 |  output: group_concat:merge(l_linestatus, ',')
 |  group by: l_orderkey, l_partkey
-|  mem-estimate=100.73MB mem-reservation=48.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=32B cardinality=6001215
+|  mem-estimate=88.14MB mem-reservation=48.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=1 row-size=28B cardinality=6001215
 |  in pipelines: 03(GETNEXT), 00(OPEN)
 |
 02:EXCHANGE [HASH(l_orderkey,l_partkey)]
-|  mem-estimate=10.11MB mem-reservation=0B thread-reservation=0
-|  tuple-ids=1 row-size=32B cardinality=6001215
+|  mem-estimate=10.09MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1 row-size=28B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
-Per-Host Resources: mem-estimate=180.73MB mem-reservation=50.00MB thread-reservation=2
+Per-Host Resources: mem-estimate=168.14MB mem-reservation=50.00MB thread-reservation=2
 01:AGGREGATE [STREAMING]
 |  output: group_concat(l_linestatus, ',')
 |  group by: l_orderkey, l_partkey
-|  mem-estimate=100.73MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
-|  tuple-ids=1 row-size=32B cardinality=6001215
+|  mem-estimate=88.14MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  tuple-ids=1 row-size=28B cardinality=6001215
 |  in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
@@ -367,9 +367,9 @@ Per-Host Resources: mem-estimate=180.73MB mem-reservation=50.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=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=33B cardinality=6001215
+   tuple-ids=0 row-size=29B cardinality=6001215
    in pipelines: 00(GETNEXT)
 ====
 # Sort + Analytic.

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test b/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
index c01e8a0..a1571b5 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/mt-dop-validation.test
@@ -72,19 +72,19 @@ PLAN-ROOT SINK
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=16.00KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 05:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: count(int_col) ASC, bigint_col ASC
 |  limit: 10
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
+|  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=2 row-size=16B cardinality=10
 |  in pipelines: 02(GETNEXT)
 |
 F01:PLAN FRAGMENT [HASH(bigint_col)] hosts=3 instances=9
-Per-Host Resources: mem-estimate=384.00MB mem-reservation=102.00MB thread-reservation=3
+Per-Host Resources: mem-estimate=384.53MB mem-reservation=102.00MB thread-reservation=3
 02:TOP-N [LIMIT=10]
 |  order by: count(int_col) ASC, bigint_col ASC
 |  mem-estimate=160B mem-reservation=0B thread-reservation=0
@@ -99,7 +99,7 @@ Per-Host Resources: mem-estimate=384.00MB mem-reservation=102.00MB thread-reserv
 |  in pipelines: 04(GETNEXT), 00(OPEN)
 |
 03:EXCHANGE [HASH(bigint_col)]
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
+|  mem-estimate=180.00KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1 row-size=16B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
@@ -166,17 +166,17 @@ PLAN-ROOT SINK
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=216.00KB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 04:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
+|  mem-estimate=216.00KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=4,3 row-size=16B cardinality=unavailable
 |  in pipelines: 01(GETNEXT)
 |
 F01:PLAN FRAGMENT [HASH(int_col)] hosts=3 instances=9
-Per-Host Resources: mem-estimate=30.00MB mem-reservation=30.00MB thread-reservation=3
+Per-Host Resources: mem-estimate=30.32MB mem-reservation=30.00MB thread-reservation=3
 02:ANALYTIC
 |  functions: row_number()
 |  partition by: int_col
@@ -193,7 +193,7 @@ Per-Host Resources: mem-estimate=30.00MB mem-reservation=30.00MB thread-reservat
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
 03:EXCHANGE [HASH(int_col)]
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
+|  mem-estimate=108.00KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=0 row-size=8B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
@@ -225,34 +225,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=562B cardinality=1500000
+|  tuple-ids=2,1,0 row-size=482B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=254B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=562B cardinality=100
+|  |  mem-estimate=230B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=482B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=254B cardinality=1
+|  |     tuple-ids=0 row-size=230B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=308B cardinality=100
+|  |  tuple-ids=2,1 row-size=252B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=124B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=308B cardinality=10
+|  |  |  mem-estimate=100B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=252B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=124B cardinality=1
+|  |  |     tuple-ids=1 row-size=100B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems]
@@ -273,7 +273,7 @@ PLAN-ROOT SINK
    predicates on o: !empty(o.o_lineitems), o_orderkey < CAST(5 AS BIGINT)
    predicates on o_lineitems: l_linenumber < CAST(3 AS INT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders
    extrapolated-rows=disabled max-scan-range-rows=44227
    parquet statistics predicates: c_custkey < CAST(10 AS BIGINT)
@@ -283,51 +283,51 @@ PLAN-ROOT SINK
    parquet dictionary predicates on o: o_orderkey < CAST(5 AS BIGINT)
    parquet dictionary predicates on o_lineitems: l_linenumber < CAST(3 AS INT)
    mem-estimate=88.00MB mem-reservation=88.00MB thread-reservation=0
-   tuple-ids=0 row-size=254B cardinality=15000
+   tuple-ids=0 row-size=230B cardinality=15000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=14.34MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 09:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=562B cardinality=1500000
+|  mem-estimate=14.34MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=2,1,0 row-size=482B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=9
 Per-Host Resources: mem-estimate=264.00MB mem-reservation=264.00MB thread-reservation=3
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=562B cardinality=1500000
+|  tuple-ids=2,1,0 row-size=482B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=254B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=562B cardinality=100
+|  |  mem-estimate=230B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=482B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=254B cardinality=1
+|  |     tuple-ids=0 row-size=230B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=308B cardinality=100
+|  |  tuple-ids=2,1 row-size=252B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=124B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=308B cardinality=10
+|  |  |  mem-estimate=100B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=252B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=124B cardinality=1
+|  |  |     tuple-ids=1 row-size=100B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems]
@@ -348,7 +348,7 @@ Per-Host Resources: mem-estimate=264.00MB mem-reservation=264.00MB thread-reserv
    predicates on o: !empty(o.o_lineitems), o_orderkey < CAST(5 AS BIGINT)
    predicates on o_lineitems: l_linenumber < CAST(3 AS INT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders
    extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates: c_custkey < CAST(10 AS BIGINT)
@@ -358,7 +358,7 @@ Per-Host Resources: mem-estimate=264.00MB mem-reservation=264.00MB thread-reserv
    parquet dictionary predicates on o: o_orderkey < CAST(5 AS BIGINT)
    parquet dictionary predicates on o_lineitems: l_linenumber < CAST(3 AS INT)
    mem-estimate=88.00MB mem-reservation=88.00MB thread-reservation=0
-   tuple-ids=0 row-size=254B cardinality=15000
+   tuple-ids=0 row-size=230B cardinality=15000
    in pipelines: 00(GETNEXT)
 ====
 # Hash-join in a subplan should work.
@@ -373,14 +373,14 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0,2 row-size=286B cardinality=1500000
+|  tuple-ids=1,0,2 row-size=258B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--06:HASH JOIN [INNER JOIN]
 |  |  hash predicates: o1.o_orderkey = o2.o_orderkey + 2
 |  |  fk/pk conjuncts: assumed fk/pk
 |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
-|  |  tuple-ids=1,0,2 row-size=286B cardinality=10
+|  |  tuple-ids=1,0,2 row-size=258B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--04:UNNEST [c.c_orders o2]
@@ -390,14 +390,14 @@ PLAN-ROOT SINK
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  05:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=270B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=278B cardinality=10
+|  |  mem-estimate=242B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=250B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=270B cardinality=1
+|  |     tuple-ids=0 row-size=242B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders o1]
@@ -407,41 +407,41 @@ PLAN-ROOT SINK
 |     in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.98MB
+   partitions=1/1 files=4 size=288.99MB
    predicates: !empty(c.c_orders), !empty(c.c_orders)
    predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders, c_orders
    extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    parquet dictionary predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    mem-estimate=88.00MB mem-reservation=16.00MB thread-reservation=0
-   tuple-ids=0 row-size=270B cardinality=150000
+   tuple-ids=0 row-size=242B cardinality=150000
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
 F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=0B mem-reservation=0B thread-reservation=1
+|  Per-Host Resources: mem-estimate=12.37MB mem-reservation=0B thread-reservation=1
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
 07:EXCHANGE [UNPARTITIONED]
-|  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0,2 row-size=286B cardinality=1500000
+|  mem-estimate=12.37MB mem-reservation=0B thread-reservation=0
+|  tuple-ids=1,0,2 row-size=258B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=9
 Per-Host Resources: mem-estimate=269.81MB mem-reservation=53.81MB thread-reservation=3
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=1,0,2 row-size=286B cardinality=1500000
+|  tuple-ids=1,0,2 row-size=258B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--06:HASH JOIN [INNER JOIN]
 |  |  hash predicates: o1.o_orderkey = o2.o_orderkey + 2
 |  |  fk/pk conjuncts: assumed fk/pk
 |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
-|  |  tuple-ids=1,0,2 row-size=286B cardinality=10
+|  |  tuple-ids=1,0,2 row-size=258B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--04:UNNEST [c.c_orders o2]
@@ -451,14 +451,14 @@ Per-Host Resources: mem-estimate=269.81MB mem-reservation=53.81MB thread-reserva
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  05:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=270B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=1,0 row-size=278B cardinality=10
+|  |  mem-estimate=242B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=1,0 row-size=250B cardinality=10
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=270B cardinality=1
+|  |     tuple-ids=0 row-size=242B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  03:UNNEST [c.c_orders o1]
@@ -468,16 +468,16 @@ Per-Host Resources: mem-estimate=269.81MB mem-reservation=53.81MB thread-reserva
 |     in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
-   partitions=1/1 files=4 size=288.98MB
+   partitions=1/1 files=4 size=288.99MB
    predicates: !empty(c.c_orders), !empty(c.c_orders)
    predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.99MB
      columns missing stats: c_orders, c_orders
    extrapolated-rows=disabled max-scan-range-rows=44229
    parquet statistics predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    parquet dictionary predicates on o1: o1.o_orderkey < CAST(5 AS BIGINT)
    mem-estimate=88.00MB mem-reservation=16.00MB thread-reservation=0
-   tuple-ids=0 row-size=270B cardinality=150000
+   tuple-ids=0 row-size=242B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====

http://git-wip-us.apache.org/repos/asf/impala/blob/2a4835cf/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering-disabled.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering-disabled.test b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering-disabled.test
index b744547..166ba26 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering-disabled.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/parquet-filtering-disabled.test
@@ -65,7 +65,7 @@ PLAN-ROOT SINK
      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=128.00MB mem-reservation=88.00KB thread-reservation=1
-   tuple-ids=0 row-size=80B cardinality=unavailable
+   tuple-ids=0 row-size=72B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Parquet predicates to be skipped:
@@ -95,7 +95,7 @@ PLAN-ROOT SINK
      columns: unavailable
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Nested parquet predicates to be skipped:
@@ -111,34 +111,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=44B cardinality=unavailable
+|  tuple-ids=2,1,0 row-size=36B cardinality=unavailable
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=44B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=36B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=20B cardinality=100
+|  |  tuple-ids=2,1 row-size=16B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=20B cardinality=10
+|  |  |  mem-estimate=12B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=16B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=16B cardinality=1
+|  |  |     tuple-ids=1 row-size=12B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [cn.item a]
@@ -163,7 +163,7 @@ PLAN-ROOT SINK
      columns missing stats: id
    extrapolated-rows=disabled max-scan-range-rows=unavailable
    mem-estimate=48.00MB mem-reservation=24.00KB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=unavailable
+   tuple-ids=0 row-size=20B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====
 # Parquet predicates to be skipped at each level:
@@ -179,34 +179,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=56B cardinality=1500000
+|  tuple-ids=2,1,0 row-size=48B cardinality=1500000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=56B cardinality=100
+|  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=48B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=24B cardinality=1
+|  |     tuple-ids=0 row-size=20B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=32B cardinality=100
+|  |  tuple-ids=2,1 row-size=28B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=32B cardinality=10
+|  |  |  mem-estimate=20B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=28B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=24B cardinality=1
+|  |  |     tuple-ids=1 row-size=20B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems l]
@@ -227,11 +227,11 @@ PLAN-ROOT SINK
    predicates on o: !empty(o.o_lineitems), o.o_orderkey > CAST(0 AS BIGINT)
    predicates on l: l.l_partkey > CAST(0 AS BIGINT)
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.96MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44229
+   extrapolated-rows=disabled max-scan-range-rows=44226
    mem-estimate=264.00MB mem-reservation=16.00MB thread-reservation=1
-   tuple-ids=0 row-size=24B cardinality=15000
+   tuple-ids=0 row-size=20B cardinality=15000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet filtering to be skipped on multiple collections at the same nested level:
@@ -252,34 +252,34 @@ PLAN-ROOT SINK
 |
 01:SUBPLAN
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  tuple-ids=2,1,0 row-size=162B cardinality=15000000
+|  tuple-ids=2,1,0 row-size=126B cardinality=15000000
 |  in pipelines: 00(GETNEXT)
 |
 |--08:NESTED LOOP JOIN [CROSS JOIN]
-|  |  mem-estimate=50B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1,0 row-size=162B cardinality=100
+|  |  mem-estimate=42B mem-reservation=0B thread-reservation=0
+|  |  tuple-ids=2,1,0 row-size=126B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--02:SINGULAR ROW SRC
 |  |     parent-subplan=01
 |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |     tuple-ids=0 row-size=50B cardinality=1
+|  |     tuple-ids=0 row-size=42B cardinality=1
 |  |     in pipelines: 00(GETNEXT)
 |  |
 |  04:SUBPLAN
 |  |  mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  tuple-ids=2,1 row-size=112B cardinality=100
+|  |  tuple-ids=2,1 row-size=84B cardinality=100
 |  |  in pipelines: 00(GETNEXT)
 |  |
 |  |--07:NESTED LOOP JOIN [CROSS JOIN]
-|  |  |  mem-estimate=32B mem-reservation=0B thread-reservation=0
-|  |  |  tuple-ids=2,1 row-size=112B cardinality=10
+|  |  |  mem-estimate=24B mem-reservation=0B thread-reservation=0
+|  |  |  tuple-ids=2,1 row-size=84B cardinality=10
 |  |  |  in pipelines: 00(GETNEXT)
 |  |  |
 |  |  |--05:SINGULAR ROW SRC
 |  |  |     parent-subplan=04
 |  |  |     mem-estimate=0B mem-reservation=0B thread-reservation=0
-|  |  |     tuple-ids=1 row-size=32B cardinality=1
+|  |  |     tuple-ids=1 row-size=24B cardinality=1
 |  |  |     in pipelines: 00(GETNEXT)
 |  |  |
 |  |  06:UNNEST [o.o_lineitems l]
@@ -295,16 +295,16 @@ PLAN-ROOT SINK
 |     in pipelines: 00(GETNEXT)
 |
 00:SCAN HDFS [tpch_nested_parquet.customer c]
-   partitions=1/1 files=4 size=288.98MB
+   partitions=1/1 files=4 size=288.96MB
    predicates: !empty(c.c_orders)
    predicates on o: !empty(o.o_lineitems)
    predicates on l: l.l_shipdate = '1994-08-19', l.l_receiptdate = '1994-08-24', l.l_shipmode = 'RAIL', l.l_returnflag = 'R', l.l_comment IS NULL
    stored statistics:
-     table: rows=150000 size=288.98MB
+     table: rows=150000 size=288.96MB
      columns missing stats: c_orders
-   extrapolated-rows=disabled max-scan-range-rows=44229
+   extrapolated-rows=disabled max-scan-range-rows=44226
    mem-estimate=616.00MB mem-reservation=32.00MB thread-reservation=1
-   tuple-ids=0 row-size=50B cardinality=150000
+   tuple-ids=0 row-size=42B cardinality=150000
    in pipelines: 00(GETNEXT)
 ====
 # Parquet filtering to be skipped on a mixed file format table:
@@ -322,7 +322,7 @@ and timestamp_cmp(timestamp_col, '2016-11-20 00:00:00') = 1
 and year > 2000 and month < 12;
 ---- PLAN
 F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Host Resources: mem-estimate=42.00MB mem-reservation=88.00KB thread-reservation=2
+|  Per-Host Resources: mem-estimate=138.00MB mem-reservation=88.00KB thread-reservation=2
 PLAN-ROOT SINK
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |
@@ -341,6 +341,6 @@ PLAN-ROOT SINK
      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=128.00MB mem-reservation=88.00KB thread-reservation=1
-   tuple-ids=0 row-size=80B cardinality=unavailable
+   tuple-ids=0 row-size=72B cardinality=unavailable
    in pipelines: 00(GETNEXT)
 ====