HIVE-20985: If select operator inputs are temporary columns vectorization may 
reuse some of them as output (Zoltan Haindrich reviewed by Teddy Choi)

Signed-off-by: Zoltan Haindrich <k...@rxd.hu>


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

Branch: refs/heads/master
Commit: 8b968c7e46929c3af86da46e316faeb8d17f03df
Parents: fa512bb
Author: Zoltan Haindrich <k...@rxd.hu>
Authored: Thu Dec 6 10:51:05 2018 +0100
Committer: Zoltan Haindrich <k...@rxd.hu>
Committed: Thu Dec 6 10:51:05 2018 +0100

----------------------------------------------------------------------
 .../ql/exec/vector/VectorizationContext.java    |  45 +++++---
 .../hive/ql/optimizer/physical/Vectorizer.java  |  19 ++--
 .../exec/vector/TestVectorizationContext.java   |  15 ++-
 .../clientpositive/llap/acid_no_buckets.q.out   |  20 ++--
 .../llap/orc_struct_type_vectorization.q.out    |  10 +-
 .../parquet_complex_types_vectorization.q.out   |  30 +++---
 .../llap/parquet_map_type_vectorization.q.out   |  10 +-
 .../parquet_struct_type_vectorization.q.out     |  10 +-
 .../llap/vector_case_when_1.q.out               |  18 ++--
 .../llap/vector_case_when_2.q.out               |  24 ++---
 .../llap/vector_cast_constant.q.out             |   4 +-
 .../clientpositive/llap/vector_coalesce.q.out   |   4 +-
 .../clientpositive/llap/vector_coalesce_2.q.out |  20 ++--
 .../llap/vector_complex_join.q.out              |   8 +-
 .../llap/vector_decimal_aggregate.q.out         |  24 ++---
 .../llap/vector_decimal_expressions.q.out       |   8 +-
 .../llap/vector_decimal_math_funcs.q.out        |  12 +--
 .../llap/vector_decimal_udf.q.out               | 104 +++++++++---------
 .../clientpositive/llap/vector_elt.q.out        |   4 +-
 .../vector_groupby_grouping_sets_grouping.q.out |  14 +--
 .../llap/vector_groupby_reduce.q.out            |   8 +-
 .../clientpositive/llap/vector_interval_1.q.out |  16 +--
 .../clientpositive/llap/vector_interval_2.q.out |  28 ++---
 .../llap/vector_orc_nested_column_pruning.q.out |  40 +++----
 .../llap/vector_reuse_scratchcols.q.out         |  14 +--
 .../llap/vector_string_concat.q.out             |  12 +--
 .../clientpositive/llap/vector_udf1.q.out       |   6 +-
 .../llap/vector_udf_adaptor_1.q.out             |  36 +++----
 .../llap/vector_windowing_gby.q.out             |   4 +-
 .../llap/vector_windowing_gby2.q.out            |  12 +--
 .../llap/vector_windowing_order_null.q.out      |   6 +-
 .../llap/vector_windowing_windowspec.q.out      |   6 +-
 .../clientpositive/llap/vectorization_0.q.out   |  12 +--
 .../clientpositive/llap/vectorization_1.q.out   |  12 +--
 .../clientpositive/llap/vectorization_10.q.out  |   6 +-
 .../clientpositive/llap/vectorization_11.q.out  |   6 +-
 .../clientpositive/llap/vectorization_12.q.out  |  14 +--
 .../clientpositive/llap/vectorization_13.q.out  |  28 ++---
 .../clientpositive/llap/vectorization_14.q.out  |  16 +--
 .../clientpositive/llap/vectorization_15.q.out  |   8 +-
 .../clientpositive/llap/vectorization_16.q.out  |   4 +-
 .../clientpositive/llap/vectorization_17.q.out  |   8 +-
 .../clientpositive/llap/vectorization_2.q.out   |  14 +--
 .../clientpositive/llap/vectorization_3.q.out   |  14 +--
 .../clientpositive/llap/vectorization_4.q.out   |   4 +-
 .../clientpositive/llap/vectorization_5.q.out   |   4 +-
 .../clientpositive/llap/vectorization_7.q.out   |  16 +--
 .../clientpositive/llap/vectorization_8.q.out   |  16 +--
 .../clientpositive/llap/vectorization_9.q.out   |   4 +-
 .../llap/vectorization_div0.q.out               |  16 +--
 .../llap/vectorization_short_regress.q.out      | 108 +++++++++----------
 .../clientpositive/llap/vectorized_case.q.out   |  22 ++--
 .../clientpositive/llap/vectorized_casts.q.out  |   6 +-
 .../llap/vectorized_date_funcs.q.out            |   8 +-
 .../llap/vectorized_distinct_gby.q.out          |   4 +-
 ...vectorized_dynamic_semijoin_reduction2.q.out |   4 +-
 .../llap/vectorized_math_funcs.q.out            |   4 +-
 .../llap/vectorized_parquet_types.q.out         |   4 +-
 .../llap/vectorized_timestamp.q.out             |   4 +-
 .../llap/vectorized_timestamp_funcs.q.out       |  16 +--
 .../llap/vectorized_timestamp_ints_casts.q.out  |   8 +-
 .../orc_struct_type_vectorization.q.out         |   8 +-
 .../parquet_complex_types_vectorization.q.out   |  24 ++---
 .../parquet_map_type_vectorization.q.out        |   8 +-
 .../parquet_struct_type_vectorization.q.out     |   8 +-
 .../parquet_vectorization_0.q.out               |   6 +-
 .../parquet_vectorization_1.q.out               |   6 +-
 .../parquet_vectorization_10.q.out              |   4 +-
 .../parquet_vectorization_11.q.out              |   4 +-
 .../parquet_vectorization_12.q.out              |   6 +-
 .../parquet_vectorization_13.q.out              |  16 +--
 .../parquet_vectorization_14.q.out              |   8 +-
 .../parquet_vectorization_15.q.out              |   6 +-
 .../parquet_vectorization_17.q.out              |   4 +-
 .../parquet_vectorization_2.q.out               |   8 +-
 .../parquet_vectorization_3.q.out               |   8 +-
 .../parquet_vectorization_7.q.out               |  12 +--
 .../parquet_vectorization_8.q.out               |  12 +--
 .../parquet_vectorization_div0.q.out            |   8 +-
 .../spark/parquet_vectorization_0.q.out         |  10 +-
 .../spark/parquet_vectorization_1.q.out         |  10 +-
 .../spark/parquet_vectorization_10.q.out        |   4 +-
 .../spark/parquet_vectorization_11.q.out        |   4 +-
 .../spark/parquet_vectorization_12.q.out        |  10 +-
 .../spark/parquet_vectorization_13.q.out        |  24 ++---
 .../spark/parquet_vectorization_14.q.out        |  12 +--
 .../spark/parquet_vectorization_15.q.out        |   6 +-
 .../spark/parquet_vectorization_16.q.out        |   4 +-
 .../spark/parquet_vectorization_17.q.out        |   4 +-
 .../spark/parquet_vectorization_2.q.out         |  12 +--
 .../spark/parquet_vectorization_3.q.out         |  12 +--
 .../spark/parquet_vectorization_4.q.out         |   4 +-
 .../spark/parquet_vectorization_5.q.out         |   4 +-
 .../spark/parquet_vectorization_7.q.out         |  12 +--
 .../spark/parquet_vectorization_8.q.out         |  12 +--
 .../spark/parquet_vectorization_9.q.out         |   4 +-
 .../spark/parquet_vectorization_div0.q.out      |   8 +-
 ...k_vectorized_dynamic_partition_pruning.q.out |  80 +++++++-------
 .../spark/vector_cast_constant.q.out            |   4 +-
 .../spark/vector_decimal_aggregate.q.out        |  24 ++---
 .../clientpositive/spark/vector_elt.q.out       |   4 +-
 .../spark/vector_string_concat.q.out            |  10 +-
 .../clientpositive/spark/vectorization_0.q.out  |  12 +--
 .../clientpositive/spark/vectorization_1.q.out  |  12 +--
 .../clientpositive/spark/vectorization_10.q.out |   6 +-
 .../clientpositive/spark/vectorization_11.q.out |   6 +-
 .../clientpositive/spark/vectorization_12.q.out |  14 +--
 .../clientpositive/spark/vectorization_13.q.out |  28 ++---
 .../clientpositive/spark/vectorization_14.q.out |  16 +--
 .../clientpositive/spark/vectorization_15.q.out |   8 +-
 .../clientpositive/spark/vectorization_16.q.out |   4 +-
 .../clientpositive/spark/vectorization_17.q.out |   8 +-
 .../clientpositive/spark/vectorization_2.q.out  |  14 +--
 .../clientpositive/spark/vectorization_3.q.out  |  14 +--
 .../clientpositive/spark/vectorization_4.q.out  |   4 +-
 .../clientpositive/spark/vectorization_5.q.out  |   4 +-
 .../clientpositive/spark/vectorization_9.q.out  |   4 +-
 .../spark/vectorization_div0.q.out              |  16 +--
 .../spark/vectorization_short_regress.q.out     | 108 +++++++++----------
 .../clientpositive/spark/vectorized_case.q.out  |  22 ++--
 .../spark/vectorized_math_funcs.q.out           |   4 +-
 .../spark/vectorized_timestamp_funcs.q.out      |  16 +--
 .../clientpositive/vector_case_when_1.q.out     |  18 ++--
 .../clientpositive/vector_case_when_2.q.out     |  18 ++--
 .../clientpositive/vector_coalesce.q.out        |   4 +-
 .../clientpositive/vector_coalesce_2.q.out      |  12 +--
 .../vector_decimal_aggregate.q.out              |  16 +--
 .../vector_decimal_expressions.q.out            |   6 +-
 .../vector_decimal_math_funcs.q.out             |  12 +--
 .../results/clientpositive/vector_elt.q.out     |   4 +-
 .../clientpositive/vector_interval_1.q.out      |  16 +--
 .../clientpositive/vector_string_concat.q.out   |  10 +-
 .../clientpositive/vectorization_1.q.out        |   8 +-
 .../clientpositive/vectorization_10.q.out       |   6 +-
 .../clientpositive/vectorization_11.q.out       |   6 +-
 .../clientpositive/vectorization_12.q.out       |   8 +-
 .../clientpositive/vectorization_13.q.out       |  18 ++--
 .../clientpositive/vectorization_14.q.out       |  10 +-
 .../clientpositive/vectorization_15.q.out       |   8 +-
 .../clientpositive/vectorization_17.q.out       |   6 +-
 .../clientpositive/vectorization_2.q.out        |  10 +-
 .../clientpositive/vectorization_3.q.out        |  10 +-
 .../clientpositive/vectorization_7.q.out        |  14 +--
 .../clientpositive/vectorization_8.q.out        |  14 +--
 .../vectorization_numeric_overflows.q.out       |  28 ++---
 .../clientpositive/vectorized_case.q.out        |  22 ++--
 .../clientpositive/vectorized_casts.q.out       |   6 +-
 .../clientpositive/vectorized_date_funcs.q.out  |   8 +-
 .../clientpositive/vectorized_math_funcs.q.out  |   4 +-
 .../vectorized_timestamp_funcs.q.out            |  12 +--
 .../vectorized_timestamp_ints_casts.q.out       |   8 +-
 151 files changed, 1040 insertions(+), 1017 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
index 8109213..9e2531b 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
@@ -659,7 +659,6 @@ import com.google.common.annotations.VisibleForTesting;
     private final int initialOutputCol;
     private int outputColCount = 0;
     private boolean reuseScratchColumns = true;
-    private boolean dontReuseTrackedScratchColumns = false;
 
     protected OutputColumnManager(int initialOutputCol) {
       this.initialOutputCol = initialOutputCol;
@@ -675,6 +674,7 @@ import com.google.common.annotations.VisibleForTesting;
     private boolean[] scratchColumnTrackWasUsed = new boolean[100];
 
     private final Set<Integer> usedOutputColumns = new HashSet<>();
+    private boolean[] markedScratchColumns;
 
     int allocateOutputColumn(TypeInfo typeInfo) throws HiveException {
       return allocateOutputColumn(typeInfo, DataTypePhysicalVariation.NONE);
@@ -704,7 +704,7 @@ import com.google.common.annotations.VisibleForTesting;
               scratchDataTypePhysicalVariations[i] == 
dataTypePhysicalVariation)) {
           continue;
         }
-        if (dontReuseTrackedScratchColumns && scratchColumnTrackWasUsed[i]) {
+        if (scratchColumnTrackWasUsed[i]) {
           continue;
         }
         //Use i
@@ -769,13 +769,25 @@ import com.google.common.annotations.VisibleForTesting;
       this.reuseScratchColumns = reuseColumns;
     }
 
-    public void clearScratchColumnWasUsedTracking() {
-      Arrays.fill(scratchColumnTrackWasUsed, false);
+    public void freeMarkedScratchColumns() {
+      if (markedScratchColumns == null) {
+        throw new RuntimeException("Illegal call");
+      }
+      for (int i = 0; i < markedScratchColumns.length; i++) {
+        if (markedScratchColumns[i]) {
+          scratchColumnTrackWasUsed[i] = false;
+        }
+      }
+      markedScratchColumns = null;
     }
 
-    public void setDontReuseTrackedScratchColumns(boolean 
dontReuseTrackedScratchColumns) {
-      this.dontReuseTrackedScratchColumns = dontReuseTrackedScratchColumns;
+    public void markScratchColumns() {
+      if (markedScratchColumns != null) {
+        throw new RuntimeException("Illegal call");
+      }
+      markedScratchColumns = Arrays.copyOf(scratchColumnTrackWasUsed, 
scratchColumnTrackWasUsed.length);
     }
+
   }
 
   public int allocateScratchColumn(TypeInfo typeInfo) throws HiveException {
@@ -786,12 +798,20 @@ import com.google.common.annotations.VisibleForTesting;
     return ocm.currentScratchColumns();
   }
 
-  public void clearScratchColumnWasUsedTracking() {
-    ocm.clearScratchColumnWasUsedTracking();
+  /**
+   * Marks all actual scratch columns.
+   *
+   * They can be decomissioned with {@link #freeMarkedScratchColumns()}.
+   */
+  public void markActualScratchColumns() {
+    ocm.markScratchColumns();
   }
 
-  public void setDontReuseTrackedScratchColumns(boolean 
dontReuseTrackedScratchColumns) {
-    ocm.setDontReuseTrackedScratchColumns(dontReuseTrackedScratchColumns);
+  /**
+   * Frees up actually marked scract columns.
+   */
+  public void freeMarkedScratchColumns() {
+    ocm.freeMarkedScratchColumns();
   }
 
   private VectorExpression 
getFilterOnBooleanColumnExpression(ExprNodeColumnDesc exprDesc,
@@ -1392,8 +1412,9 @@ import com.google.common.annotations.VisibleForTesting;
                    || arg0Type(expr).equals("double")
                    || arg0Type(expr).equals("float"))) {
       return true;
-    } else
-        return gudf instanceof GenericUDFBetween && (mode == 
VectorExpressionDescriptor.Mode.PROJECTION);
+    } else {
+      return gudf instanceof GenericUDFBetween && (mode == 
VectorExpressionDescriptor.Mode.PROJECTION);
+    }
   }
 
   public static boolean isCastToIntFamily(Class<? extends UDF> udfClass) {

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
index 7f48dc5..d3492f3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
@@ -232,7 +232,6 @@ import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
 import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable;
 import org.apache.hadoop.mapred.InputFormat;
@@ -714,7 +713,7 @@ public class Vectorizer implements PhysicalPlanResolver {
 
     public DummyVectorOperator(VectorizationContext vContext) {
       super();
-      this.conf = (DummyRootVectorDesc) new DummyRootVectorDesc();
+      this.conf = new DummyRootVectorDesc();
       this.vContext = vContext;
     }
 
@@ -2133,7 +2132,7 @@ public class Vectorizer implements PhysicalPlanResolver {
     private void vectorizeTableScanOperatorInPlace(TableScanOperator 
tableScanOperator,
         VectorTaskColumnInfo vectorTaskColumnInfo) {
 
-      TableScanDesc tableScanDesc = (TableScanDesc) 
tableScanOperator.getConf();
+      TableScanDesc tableScanDesc = tableScanOperator.getConf();
       VectorTableScanDesc vectorTableScanDesc = new VectorTableScanDesc();
       tableScanDesc.setVectorDesc(vectorTableScanDesc);
 
@@ -2815,7 +2814,7 @@ public class Vectorizer implements PhysicalPlanResolver {
           HiveConf.ConfVars.HIVE_VECTORIZATION_PTF_ENABLED.varname + " IS 
false)");
       return false;
     }
-    PTFDesc ptfDesc = (PTFDesc) op.getConf();
+    PTFDesc ptfDesc = op.getConf();
     boolean isMapSide = ptfDesc.isMapSide();
     if (isMapSide) {
       setOperatorIssue("PTF Mapper not supported");
@@ -4674,12 +4673,8 @@ public class Vectorizer implements PhysicalPlanResolver {
     int index = 0;
     final int size = colList.size();
 
-    // Since the call to fixDecimalDataTypePhysicalVariations will be done 
post-vector-expression
-    // creation, it cannot freely use deallocated scratch columns.  Scratch 
column reuse assumes
-    // sequential execution so it can reuse freed scratch columns from earlier
-    // evaluations.
-    //
-    vContext.clearScratchColumnWasUsedTracking();
+    // this will mark all actual computed columns
+    vContext.markActualScratchColumns();
 
     VectorExpression[] vectorSelectExprs = new VectorExpression[size];
     int[] projectedOutputColumns = new int[size];
@@ -4701,13 +4696,13 @@ public class Vectorizer implements PhysicalPlanResolver 
{
     // at least one of its children is DECIMAL_64. Some expressions like x % y 
for example only accepts DECIMAL
     // for x and y (at this time there is only DecimalColModuloDecimalColumn 
so both x and y has to be DECIMAL).
     // The following method introduces a cast if x or y is DECIMAL_64 and 
parent expression (x % y) is DECIMAL.
-    vContext.setDontReuseTrackedScratchColumns(true);
     try {
       fixDecimalDataTypePhysicalVariations(vContext, vectorSelectExprs);
     } finally {
-      vContext.setDontReuseTrackedScratchColumns(false);
+      vContext.freeMarkedScratchColumns();
     }
 
+
     vectorSelectDesc.setSelectExpressions(vectorSelectExprs);
     vectorSelectDesc.setProjectedOutputColumns(projectedOutputColumns);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
----------------------------------------------------------------------
diff --git 
a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
 
b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
index 86ac21b..438107f 100644
--- 
a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
+++ 
b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
@@ -278,7 +278,9 @@ public class TestVectorizationContext {
     VectorExpression childExpr1 = ve.getChildExpressions()[0];
     VectorExpression childExpr2 = ve.getChildExpressions()[1];
     System.out.println(ve.toString());
-    assertEquals(6, ve.getOutputColumnNum());
+    // TODO: HIVE-20985 disabled output column reuse
+    //assertEquals(6, ve.getOutputColumnNum());
+    assertEquals(10, ve.getOutputColumnNum());
 
     assertTrue(childExpr1 instanceof LongColSubtractLongColumn);
     assertEquals(1, childExpr1.getChildExpressions().length);
@@ -289,8 +291,11 @@ public class TestVectorizationContext {
     assertTrue(childExpr2 instanceof LongColMultiplyLongColumn);
     assertEquals(1, childExpr2.getChildExpressions().length);
     assertTrue(childExpr2.getChildExpressions()[0] instanceof 
LongColModuloLongColumn);
-    assertEquals(8, childExpr2.getOutputColumnNum());
-    assertEquals(6, childExpr2.getChildExpressions()[0].getOutputColumnNum());
+    // TODO: HIVE-20985 disabled output column reuse
+    //assertEquals(8, childExpr2.getOutputColumnNum());
+    //assertEquals(6, 
childExpr2.getChildExpressions()[0].getOutputColumnNum());
+    assertEquals(9, childExpr2.getOutputColumnNum());
+    assertEquals(8, childExpr2.getChildExpressions()[0].getOutputColumnNum());
   }
 
   @Test
@@ -730,7 +735,9 @@ public class TestVectorizationContext {
 
     ve = vc.getVectorExpression(isNullExpr, 
VectorExpressionDescriptor.Mode.PROJECTION);
     assertEquals(ve.getClass(), IsNull.class);
-    assertEquals(3, ve.getOutputColumnNum());
+    // TODO: HIVE-20985 disabled output column reuse
+    //assertEquals(3, ve.getOutputColumnNum());
+    assertEquals(4, ve.getOutputColumnNum());
     assertEquals(ve.getChildExpressions()[0].getClass(), 
LongColGreaterLongScalar.class);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out 
b/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
index 571cf1c..fcd90f7 100644
--- a/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
+++ b/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
@@ -1343,19 +1343,19 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: FilterExprOrExpr(children: 
FilterLongColEqualLongScalar(col 5:int, val 413)(children: CastStringToLong(col 
0:string) -> 5:int), FilterLongColEqualLongScalar(col 5:int, val 43)(children: 
CastStringToLong(col 0:string) -> 5:int))
+                        predicateExpression: FilterExprOrExpr(children: 
FilterLongColEqualLongScalar(col 5:int, val 413)(children: CastStringToLong(col 
0:string) -> 5:int), FilterLongColEqualLongScalar(col 6:int, val 43)(children: 
CastStringToLong(col 0:string) -> 6:int))
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [4, 0, 6, 2]
-                          selectExpressions: 
StringGroupColConcatStringScalar(col 1:string, val updated) -> 6:string
+                          projectedOutputColumnNums: [4, 0, 7, 2]
+                          selectExpressions: 
StringGroupColConcatStringScalar(col 1:string, val updated) -> 7:string
                         Reduce Sink Vectorization:
                             className: VectorReduceSinkObjectHashOperator
                             keyColumns: 
4:struct<writeid:bigint,bucketid:int,rowid:bigint>
                             native: true
                             nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                             partitionColumns: 5:int
-                            valueColumns: 0:string, 6:string, 2:string
+                            valueColumns: 0:string, 7:string, 2:string
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
             Map Vectorization:
@@ -1374,7 +1374,7 @@ STAGE PLANS:
                     neededVirtualColumns: [ROWID]
                     partitionColumnCount: 2
                     partitionColumns: ds:string, hr:string
-                    scratchColumnTypeNames: [bigint, string]
+                    scratchColumnTypeNames: [bigint, bigint, string]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -2193,19 +2193,19 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: FilterExprOrExpr(children: 
FilterLongColEqualLongScalar(col 5:int, val 413)(children: CastStringToLong(col 
0:string) -> 5:int), FilterLongColEqualLongScalar(col 5:int, val 43)(children: 
CastStringToLong(col 0:string) -> 5:int))
+                        predicateExpression: FilterExprOrExpr(children: 
FilterLongColEqualLongScalar(col 5:int, val 413)(children: CastStringToLong(col 
0:string) -> 5:int), FilterLongColEqualLongScalar(col 6:int, val 43)(children: 
CastStringToLong(col 0:string) -> 6:int))
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [4, 0, 6, 2]
-                          selectExpressions: 
StringGroupColConcatStringScalar(col 1:string, val updated) -> 6:string
+                          projectedOutputColumnNums: [4, 0, 7, 2]
+                          selectExpressions: 
StringGroupColConcatStringScalar(col 1:string, val updated) -> 7:string
                         Reduce Sink Vectorization:
                             className: VectorReduceSinkObjectHashOperator
                             keyColumns: 
4:struct<writeid:bigint,bucketid:int,rowid:bigint>
                             native: true
                             nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                             partitionColumns: 5:int
-                            valueColumns: 0:string, 6:string, 2:string
+                            valueColumns: 0:string, 7:string, 2:string
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
             Map Vectorization:
@@ -2224,7 +2224,7 @@ STAGE PLANS:
                     neededVirtualColumns: [ROWID]
                     partitionColumnCount: 2
                     partitionColumns: ds:string, hr:string
-                    scratchColumnTypeNames: [bigint, string]
+                    scratchColumnTypeNames: [bigint, bigint, string]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/orc_struct_type_vectorization.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/orc_struct_type_vectorization.q.out 
b/ql/src/test/results/clientpositive/llap/orc_struct_type_vectorization.q.out
index b1d2b33..82ac07e 100644
--- 
a/ql/src/test/results/clientpositive/llap/orc_struct_type_vectorization.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/orc_struct_type_vectorization.q.out
@@ -243,8 +243,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [4]
-                          selectExpressions: VectorUDFStructField(col 
1:struct<f1:int,f2:string>, col 0:int) -> 4:int
+                          projectedOutputColumnNums: [5]
+                          selectExpressions: VectorUDFStructField(col 
1:struct<f1:int,f2:string>, col 0:int) -> 5:int
                       Statistics: Num rows: 341 Data size: 76542 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -253,15 +253,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 4:int
+                            keyExpressions: col 5:int
                             native: true
                         Group By Operator
                           aggregations: sum(_col0)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 4:int) -> 
bigint
+                              aggregators: VectorUDAFSumLong(col 5:int) -> 
bigint
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 4:int
+                              keyExpressions: col 5:int
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0]

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/parquet_complex_types_vectorization.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/parquet_complex_types_vectorization.q.out
 
b/ql/src/test/results/clientpositive/llap/parquet_complex_types_vectorization.q.out
index 131a57a..4c9e2cc 100644
--- 
a/ql/src/test/results/clientpositive/llap/parquet_complex_types_vectorization.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/parquet_complex_types_vectorization.q.out
@@ -219,8 +219,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [6, 7]
-                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 6:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 7:int
+                          projectedOutputColumnNums: [7, 8]
+                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 7:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 8:int
                       Statistics: Num rows: 341 Data size: 38920 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -229,15 +229,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 6:int
+                            keyExpressions: col 7:int
                             native: true
                         Group By Operator
                           aggregations: sum(_col1)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 7:int) -> 
bigint
+                              aggregators: VectorUDAFSumLong(col 8:int) -> 
bigint
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 6:int
+                              keyExpressions: col 7:int
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0]
@@ -525,8 +525,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [6, 7]
-                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 6:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 7:int
+                          projectedOutputColumnNums: [7, 8]
+                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 7:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 8:int
                       Statistics: Num rows: 341 Data size: 38921 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -535,15 +535,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 6:int
+                            keyExpressions: col 7:int
                             native: true
                         Group By Operator
                           aggregations: sum(_col1)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 7:int) -> 
bigint
+                              aggregators: VectorUDAFSumLong(col 8:int) -> 
bigint
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 6:int
+                              keyExpressions: col 7:int
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0]
@@ -831,8 +831,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [6, 7]
-                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 6:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 7:int
+                          projectedOutputColumnNums: [7, 8]
+                          selectExpressions: ListIndexColScalar(col 
2:array<int>, col 1:int) -> 7:int, ListIndexColScalar(col 2:array<int>, col 
0:int) -> 8:int
                       Statistics: Num rows: 341 Data size: 38923 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -841,15 +841,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 6:int
+                            keyExpressions: col 7:int
                             native: true
                         Group By Operator
                           aggregations: sum(_col1)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 7:int) -> 
bigint
+                              aggregators: VectorUDAFSumLong(col 8:int) -> 
bigint
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 6:int
+                              keyExpressions: col 7:int
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0]

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/parquet_map_type_vectorization.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/parquet_map_type_vectorization.q.out 
b/ql/src/test/results/clientpositive/llap/parquet_map_type_vectorization.q.out
index e3f4cc4..c3c78aa 100644
--- 
a/ql/src/test/results/clientpositive/llap/parquet_map_type_vectorization.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/parquet_map_type_vectorization.q.out
@@ -235,8 +235,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [8, 9, 10]
-                          selectExpressions: VectorUDFMapIndexStringScalar(col 
1:map<string,string>, key: k1) -> 8:string, VectorUDFMapIndexLongScalar(col 
2:map<int,int>, key: 123) -> 9:int, VectorUDFMapIndexDecimalScalar(col 
3:map<double,double>, key: 123.123) -> 10:double
+                          projectedOutputColumnNums: [9, 10, 11]
+                          selectExpressions: VectorUDFMapIndexStringScalar(col 
1:map<string,string>, key: k1) -> 9:string, VectorUDFMapIndexLongScalar(col 
2:map<int,int>, key: 123) -> 10:int, VectorUDFMapIndexDecimalScalar(col 
3:map<double,double>, key: 123.123) -> 11:double
                       Statistics: Num rows: 511 Data size: 995378 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -245,15 +245,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 8:string
+                            keyExpressions: col 9:string
                             native: true
                         Group By Operator
                           aggregations: sum(_col1), sum(_col2)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 9:int) -> 
bigint, VectorUDAFSumDouble(col 10:double) -> double
+                              aggregators: VectorUDAFSumLong(col 10:int) -> 
bigint, VectorUDAFSumDouble(col 11:double) -> double
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 8:string
+                              keyExpressions: col 9:string
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0, 1]

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/parquet_struct_type_vectorization.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/parquet_struct_type_vectorization.q.out
 
b/ql/src/test/results/clientpositive/llap/parquet_struct_type_vectorization.q.out
index a02edbe..a0d30ca 100644
--- 
a/ql/src/test/results/clientpositive/llap/parquet_struct_type_vectorization.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/parquet_struct_type_vectorization.q.out
@@ -243,8 +243,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [4]
-                          selectExpressions: VectorUDFStructField(col 
1:struct<f1:int,f2:string>, col 0:int) -> 4:int
+                          projectedOutputColumnNums: [5]
+                          selectExpressions: VectorUDFStructField(col 
1:struct<f1:int,f2:string>, col 0:int) -> 5:int
                       Statistics: Num rows: 341 Data size: 76542 Basic stats: 
COMPLETE Column stats: NONE
                       Top N Key Operator
                         sort order: +
@@ -253,15 +253,15 @@ STAGE PLANS:
                         top n: 10
                         Top N Key Vectorization:
                             className: VectorTopNKeyOperator
-                            keyExpressions: col 4:int
+                            keyExpressions: col 5:int
                             native: true
                         Group By Operator
                           aggregations: sum(_col0)
                           Group By Vectorization:
-                              aggregators: VectorUDAFSumLong(col 4:int) -> 
bigint
+                              aggregators: VectorUDAFSumLong(col 5:int) -> 
bigint
                               className: VectorGroupByOperator
                               groupByMode: HASH
-                              keyExpressions: col 4:int
+                              keyExpressions: col 5:int
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0]

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out 
b/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out
index c5a35ba..5f94d60 100644
--- a/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out
@@ -214,8 +214,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [4, 21, 22, 23, 20, 24, 25, 
27, 28, 29, 30, 31, 32, 35, 37, 38, 19]
-                        selectExpressions: VectorUDFAdaptor(CASE WHEN 
((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN 
((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE 
('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, 
VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity 
= 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 
100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 
18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 22:string, 
VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Sing
 le') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN 
('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END)(children: 
LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 23:string, 
IfExprLongColumnLongColumn(col 17:boolean, col 18:date, col 19:date)(children: 
StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 17:boolean, 
VectorUDFDateAddColScalar(col 10:date, val 10) -> 18:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 19:date) -> 20:date, 
VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * 
(1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 24:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 24:double) -> 25
 :double) -> 24:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN 
((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 25:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 25:double) -> 
26:double) -> 25:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 
'DELIVER IN PERSON'), null, l_tax))(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 17:boolean) -> 27:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE 
BACK RETURN)(children: col 13:varchar(20)) -> 17:boolean) -> 28:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string,
  val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 17:boolean) -> 
29:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE 
BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 
13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 17:boolean) 
-> 30:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 17:boolean, 
decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 17:boolean) -> 31:decimal(10,2)/DECIMAL_64, 
IfExprDecimal64ColumnDecimal64Scalar(col 18:boolean, col 
7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 18:boolean) -> 32:decimal(10,2)/DECIMAL_64, 
IfExprTimestampColumnColumn(col 19:boolean, col 33:timestampcol 
34:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) 
 -> 19:boolean, CastDateToTimestamp(col 12:date) -> 33:timestamp, 
CastDateToTimestamp(col 11:date) -> 34:timestamp) -> 35:timestamp, 
VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), 
null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 19:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 36:int) -> 37:int, 
VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, 
l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 
19:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 36:int) -> 
38:int, IfExprLongScalarLongScalar(col 36:boolean, val 14245, val 
14609)(children: LongColGreaterLongScalar(col 19:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 19:int) -> 36:boolean) -> 19:date
+                        projectedOutputColumnNums: [4, 21, 26, 31, 35, 39, 43, 
45, 47, 49, 51, 53, 55, 59, 62, 65, 68]
+                        selectExpressions: VectorUDFAdaptor(CASE WHEN 
((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN 
((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE 
('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, 
VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity 
= 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 
100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 
23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, 
VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Sing
 le') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN 
('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END)(children: 
LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, 
LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, 
LongColLessLongScalar(col 4:int, val 10) -> 29:boolean, 
LongColLessLongScalar(col 4:int, val 100) -> 30:boolean) -> 31:string, 
IfExprLongColumnLongColumn(col 32:boolean, col 33:date, col 34:date)(children: 
StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 32:boolean, 
VectorUDFDateAddColScalar(col 10:date, val 10) -> 33:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 34:date) -> 35:date, 
VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * 
(1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 36:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 37:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 37:double) -> 38
 :double) -> 39:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN 
((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 40:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 41:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 41:double) -> 
42:double) -> 43:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 
'DELIVER IN PERSON'), null, l_tax))(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 44:boolean) -> 45:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE 
BACK RETURN)(children: col 13:varchar(20)) -> 46:boolean) -> 47:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string,
  val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 48:boolean) -> 
49:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE 
BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 
13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 50:boolean) 
-> 51:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 52:boolean, 
decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 52:boolean) -> 53:decimal(10,2)/DECIMAL_64, 
IfExprDecimal64ColumnDecimal64Scalar(col 54:boolean, col 
7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 54:boolean) -> 55:decimal(10,2)/DECIMAL_64, 
IfExprTimestampColumnColumn(col 56:boolean, col 57:timestampcol 
58:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) 
 -> 56:boolean, CastDateToTimestamp(col 12:date) -> 57:timestamp, 
CastDateToTimestamp(col 11:date) -> 58:timestamp) -> 59:timestamp, 
VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), 
null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 60:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 61:int) -> 62:int, 
VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, 
l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 
63:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 64:int) -> 
65:int, IfExprLongScalarLongScalar(col 67:boolean, val 14245, val 
14609)(children: LongColGreaterLongScalar(col 66:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 66:int) -> 67:boolean) -> 68:date
                     Statistics: Num rows: 101 Data size: 57327 Basic stats: 
COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false
@@ -243,7 +243,7 @@ STAGE PLANS:
                     includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14]
                     dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, 
l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, 
l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), 
l_shipdate:date, l_commitdate:date, l_receiptdate:date, 
l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, double, double, double, decimal(10,2), decimal(10,2), 
decimal(12,2), decimal(12,2), decimal(10,2)/DECIMAL_64, 
decimal(10,2)/DECIMAL_64, timestamp, timestamp, timestamp, bigint, bigint, 
bigint]
+                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, 
string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, 
double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, 
decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, 
decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, 
bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint]
 
   Stage: Stage-0
     Fetch Operator
@@ -551,8 +551,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [4, 22, 24, 25, 26, 29, 27, 
30, 31, 32, 33, 34, 36, 40, 42, 45, 46]
-                        selectExpressions: 
IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 
21:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 
21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 
21:string) -> 22:string) -> 21:string) -> 22:string, 
IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 
23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
24:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean
 , val Somecol 23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
19:boolean, IfExprColumnNull(col 20:boolean, col 21:string, null)(children: 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, 
ConstantVectorExpression(val Many) -> 21:string) -> 23:string) -> 24:string) -> 
23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 17:boolean, 
val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 
23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
IfExprNullNull(null, null) -> 23:string) -> 25:string) -> 23:string) -> 
25:string, IfExprLongColumnLongColumn(col 17:boolean, col 18:date, col 
19:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
17:boolean, VectorUDFDateAddColSca
 lar(col 10:date, val 10) -> 18:date, VectorUDFDateAddColScalar(col 10:date, 
val 5) -> 19:date) -> 26:date, IfExprDoubleColumnDoubleColumn(col 17:boolean, 
col 28:doublecol 27:double)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 27:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 27:double) -> 28:double, ConstantVectorExpression(val 0.0) -> 
27:double) -> 29:double, IfExprDoubleColumnDoubleScalar(col 17:boolean, col 
28:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val 
N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
27:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 
27:double) -> 28:double) -> 27:double, IfExprNullColumn(col 17:boolean, null, 
col 48)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 17:boolean, 
ConvertDecimal64ToDecimal(col 7:deci
 mal(10,2)/DECIMAL_64) -> 48:decimal(10,2)) -> 30:decimal(10,2), 
IfExprColumnNull(col 18:boolean, col 49:decimal(10,2), null)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 18:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 49:decimal(10,2)) -> 31:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 19:boolean) -> 32:decimal(12,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE 
BACK RETURN)(children: col 13:varchar(20)) -> 19:boolean) -> 33:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 19:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVE
 R IN PERSON)(children: col 13:varchar(20)) -> 19:boolean) -> 
34:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 
35:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 
0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 35:boolean) -> 
36:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 37:boolean, col 
38:timestampcol 39:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 
30) -> 37:boolean, CastDateToTimestamp(col 12:date) -> 38:timestamp, 
CastDateToTimestamp(col 11:date) -> 39:timestamp) -> 40:timestamp, 
IfExprColumnNull(col 37:boolean, col 41:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 37:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 41:int) -> 42:int, 
IfExprNullColumn(col 43:boolean, null, col 44)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 43:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 44:in
 t) -> 45:int, IfExprLongScalarLongScalar(col 47:boolean, val 14245, val 
14609)(children: LongColGreaterLongScalar(col 46:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 46:int) -> 47:boolean) -> 46:date
+                        projectedOutputColumnNums: [4, 24, 33, 40, 44, 49, 53, 
55, 57, 59, 61, 63, 65, 69, 72, 75, 78]
+                        selectExpressions: 
IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 
23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 
21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 
21:string) -> 22:string) -> 23:string) -> 24:string, 
IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 
32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, 
IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 
31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, 
IfExprStringScalarStringGroupColumn(col 27:boolean
 , val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: 
LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, 
ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 
32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, 
val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 
38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, 
IfExprStringScalarStringGroupColumn(col 36:boolean, val Somecol 
37:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, 
IfExprNullNull(null, null) -> 37:string) -> 38:string) -> 39:string) -> 
40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 
43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
41:boolean, VectorUDFDateAddColSca
 lar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, 
val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, 
col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 
48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 
52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val 
N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 
51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, 
col 79)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 54:boolean, 
ConvertDecimal64ToDecimal(col 7:deci
 mal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), 
IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 56:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 58:boolean) -> 59:decimal(12,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE 
BACK RETURN)(children: col 13:varchar(20)) -> 60:boolean) -> 61:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVE
 R IN PERSON)(children: col 13:varchar(20)) -> 62:boolean) -> 
63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 
64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 
0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 64:boolean) -> 
65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 
67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 
30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, 
CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, 
IfExprColumnNull(col 70:boolean, col 71:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, 
IfExprNullColumn(col 73:boolean, null, col 74)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:in
 t) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 
14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date
                     Statistics: Num rows: 101 Data size: 57327 Basic stats: 
COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false
@@ -580,7 +580,7 @@ STAGE PLANS:
                     includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14]
                     dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, 
l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, 
l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), 
l_shipdate:date, l_commitdate:date, l_receiptdate:date, 
l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, string, string, bigint, double, double, double, 
decimal(10,2), decimal(10,2), decimal(12,2), decimal(12,2), 
decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, 
timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, 
decimal(10,2), decimal(10,2)]
+                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, string, bigint, bigint, bigint, bigint, string, string, 
string, string, string, bigint, bigint, bigint, string, string, string, string, 
bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, 
double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, 
decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, 
decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, 
bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), 
decimal(10,2)]
 
   Stage: Stage-0
     Fetch Operator
@@ -888,8 +888,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [4, 27, 38, 48, 52, 56, 60, 
62, 64, 69, 73, 74, 76, 80, 83, 86, 87]
-                        selectExpressions: IfExprColumnCondExpr(col 
17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, 
IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, 
ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 
21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 
4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, 
IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 
24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 
23:boolean, col 28:stringcol 37:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 23:boolean, ConstantVectorExpression(val Single) -> 28:string, 
IfExprColumnCondExpr(col 29:boolea
 n, col 30:stringcol 36:string)(children: LongColEqualLongScalar(col 4:int, val 
2) -> 29:boolean, ConstantVectorExpression(val Two) -> 30:string, 
IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 35:string)(children: 
LongColLessLongScalar(col 4:int, val 10) -> 31:boolean, 
ConstantVectorExpression(val Some) -> 32:string, IfExprColumnNull(col 
33:boolean, col 34:string, null)(children: LongColLessLongScalar(col 4:int, val 
100) -> 33:boolean, ConstantVectorExpression(val Many) -> 34:string) -> 
35:string) -> 36:string) -> 37:string) -> 38:string, IfExprColumnCondExpr(col 
39:boolean, col 40:stringcol 47:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 39:boolean, ConstantVectorExpression(val Single) -> 40:string, 
IfExprColumnCondExpr(col 41:boolean, col 42:stringcol 46:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 41:boolean, 
ConstantVectorExpression(val Two) -> 42:string, IfExprColumnCondExpr(col 
43:boolean, col 44:stringcol 45:string)(children: LongColLes
 sLongScalar(col 4:int, val 10) -> 43:boolean, ConstantVectorExpression(val 
Some) -> 44:string, IfExprNullNull(null, null) -> 45:string) -> 46:string) -> 
47:string) -> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 
51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, 
IfExprCondExprCondExpr(col 53:boolean, col 55:doublecol 54:double)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 
55:double, ConstantVectorExpression(val 0.0) -> 54:double) -> 56:double, 
IfExprCondExprColumn(col 57:boolean, col 59:double, col 58:double)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 57:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double
 , col 58:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 58:double) -> 59:double, ConstantVectorExpression(val 0.0) -> 
58:double) -> 60:double, IfExprNullColumn(col 61:boolean, null, col 
89)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 61:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 89:decimal(10,2)) 
-> 62:decimal(10,2), IfExprColumnNull(col 63:boolean, col 90:decimal(10,2), 
null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 63:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 90:decimal(10,2)) 
-> 64:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 
'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 
13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 68:boolean) 
-> 69:decimal(12,2), VectorUDFAdaptor(if((CAST( l_ship
 instruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 72:boolean) -> 73:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 72:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 72:boolean) -> 74:decimal(10,2)/DECIMAL_64, 
IfExprDecimal64ColumnDecimal64Scalar(col 75:boolean, col 
7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 75:boolean) -> 76:decimal(10,2)/DECIMAL_64, 
IfExprCondExprCondExpr(col 77:boolean, col 78:timestampcol 
79:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 
77:boolean, CastDateToTimestamp(col 12:date) -> 78:timestamp, 
CastDateToTimestamp(col 11:date) -> 79:timestamp) -> 80:timesta
 mp, IfExprCondExprNull(col 81:boolean, col 82:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 81:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 82:int) -> 83:int, 
IfExprNullCondExpr(col 84:boolean, null, col 85:int)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 84:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 85:int) -> 86:int, 
IfExprLongScalarLongScalar(col 88:boolean, val 14245, val 14609)(children: 
LongColGreaterLongScalar(col 87:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 87:int) -> 88:boolean) -> 87:date
+                        projectedOutputColumnNums: [4, 27, 39, 49, 53, 58, 63, 
65, 67, 72, 77, 79, 81, 85, 88, 91, 94]
+                        selectExpressions: IfExprColumnCondExpr(col 
17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, 
IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, 
ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 
21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 
4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, 
IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 
24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 
28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, 
IfExprColumnCondExpr(col 30:boolea
 n, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 
2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, 
IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: 
LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, 
ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 
34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 
100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 
36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 
40:boolean, col 41:stringcol 48:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, 
IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 47:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, 
ConstantVectorExpression(val Two) -> 43:string, IfExprColumnCondExpr(col 
44:boolean, col 45:stringcol 46:string)(children: LongColLes
 sLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val 
Some) -> 45:string, IfExprNullNull(null, null) -> 46:string) -> 47:string) -> 
48:string) -> 49:string, IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 
52:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
50:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 51:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 52:date) -> 53:date, 
IfExprCondExprCondExpr(col 54:boolean, col 56:doublecol 57:double)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 54:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 55:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 55:double) -> 
56:double, ConstantVectorExpression(val 0.0) -> 57:double) -> 58:double, 
IfExprCondExprColumn(col 59:boolean, col 61:double, col 62:double)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 59:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double
 , col 60:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 60:double) -> 61:double, ConstantVectorExpression(val 0.0) -> 
62:double) -> 63:double, IfExprNullColumn(col 64:boolean, null, col 
95)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 64:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) 
-> 65:decimal(10,2), IfExprColumnNull(col 66:boolean, col 96:decimal(10,2), 
null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 66:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 96:decimal(10,2)) 
-> 67:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 
'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 
13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 71:boolean) 
-> 72:decimal(12,2), VectorUDFAdaptor(if((CAST( l_ship
 instruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 76:boolean) -> 77:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 78:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(10,2)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 78:boolean) -> 79:decimal(10,2)/DECIMAL_64, 
IfExprDecimal64ColumnDecimal64Scalar(col 80:boolean, col 
7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 80:boolean) -> 81:decimal(10,2)/DECIMAL_64, 
IfExprCondExprCondExpr(col 82:boolean, col 83:timestampcol 
84:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 
82:boolean, CastDateToTimestamp(col 12:date) -> 83:timestamp, 
CastDateToTimestamp(col 11:date) -> 84:timestamp) -> 85:timesta
 mp, IfExprCondExprNull(col 86:boolean, col 87:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 86:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 87:int) -> 88:int, 
IfExprNullCondExpr(col 89:boolean, null, col 90:int)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 89:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 90:int) -> 91:int, 
IfExprLongScalarLongScalar(col 93:boolean, val 14245, val 14609)(children: 
LongColGreaterLongScalar(col 92:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 92:int) -> 93:boolean) -> 94:date
                     Statistics: Num rows: 101 Data size: 57327 Basic stats: 
COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false
@@ -917,7 +917,7 @@ STAGE PLANS:
                     includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14]
                     dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, 
l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, 
l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), 
l_shipdate:date, l_commitdate:date, l_receiptdate:date, 
l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, bigint, 
bigint, bigint, bigint, double, double, double, bigint, double, double, double, 
bigint, decimal(10,2), bigint, decimal(10,2), bigint, bigint, decimal(12,2), 
bigint, decimal(12,2), decimal(12,2), bigint, bigint, decimal(12,2), 
decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, 
timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, 
bigint, decimal(10,2), decimal(10,2)]
+                    scratchColumnTypeNames: [bigint, string, bigint, string, 
bigint, string, bigint, string, string, string, string, bigint, string, bigint, 
string, bigint, string, bigint, string, string, string, string, string, bigint, 
string, bigint, string, bigint, string, string, string, string, string, bigint, 
bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, 
double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, 
bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, 
bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, 
decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, 
bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), 
decimal(10,2)]
 
   Stage: Stage-0
     Fetch Operator

Reply via email to