diff --git itests/src/test/resources/testconfiguration.properties itests/src/test/resources/testconfiguration.properties index fdd8ecc..d444c99 100644 --- itests/src/test/resources/testconfiguration.properties +++ itests/src/test/resources/testconfiguration.properties @@ -763,6 +763,7 @@ minillaplocal.query.files=\ vector_acid4.q,\ vector_annotate_stats_select.q,\ vector_auto_smb_mapjoin_14.q,\ + vector_case_when_conversion.q,\ vector_char_varchar_1.q,\ vector_complex_all.q,\ vector_complex_join.q,\ diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java index 6ca1248..66adc5b 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java @@ -546,6 +546,7 @@ protected int getInputColumnIndex(ExprNodeColumnDesc colExpr) throws HiveExcepti private final int initialOutputCol; private int outputColCount = 0; private boolean reuseScratchColumns = true; + private boolean dontReuseTrackedScratchColumns = false; protected OutputColumnManager(int initialOutputCol) { this.initialOutputCol = initialOutputCol; @@ -558,6 +559,7 @@ protected OutputColumnManager(int initialOutputCol) { private String[] scratchVectorTypeNames = new String[100]; private DataTypePhysicalVariation[] scratchDataTypePhysicalVariations = new DataTypePhysicalVariation[100]; + private boolean[] scratchColumnTrackWasUsed = new boolean[100]; private final Set usedOutputColumns = new HashSet(); @@ -589,6 +591,9 @@ private int allocateOutputColumnInternal(String columnType, DataTypePhysicalVari scratchDataTypePhysicalVariations[i] == dataTypePhysicalVariation)) { continue; } + if (dontReuseTrackedScratchColumns && scratchColumnTrackWasUsed[i]) { + continue; + } //Use i usedOutputColumns.add(i); return i; @@ -597,16 +602,19 @@ private int allocateOutputColumnInternal(String columnType, DataTypePhysicalVari if (outputColCount < scratchVectorTypeNames.length) { int newIndex = outputColCount; scratchVectorTypeNames[outputColCount] = columnType; - scratchDataTypePhysicalVariations[outputColCount++] = dataTypePhysicalVariation; + scratchDataTypePhysicalVariations[outputColCount] = dataTypePhysicalVariation; + scratchColumnTrackWasUsed[outputColCount++] = true; usedOutputColumns.add(newIndex); return newIndex; } else { //Expand the array scratchVectorTypeNames = Arrays.copyOf(scratchVectorTypeNames, 2*outputColCount); scratchDataTypePhysicalVariations = Arrays.copyOf(scratchDataTypePhysicalVariations, 2*outputColCount); + scratchColumnTrackWasUsed = Arrays.copyOf(scratchColumnTrackWasUsed, 2*outputColCount); int newIndex = outputColCount; scratchVectorTypeNames[outputColCount] = columnType; - scratchDataTypePhysicalVariations[outputColCount++] = dataTypePhysicalVariation; + scratchDataTypePhysicalVariations[outputColCount] = dataTypePhysicalVariation; + scratchColumnTrackWasUsed[outputColCount++] = true; usedOutputColumns.add(newIndex); return newIndex; } @@ -647,6 +655,14 @@ public DataTypePhysicalVariation getDataTypePhysicalVariation(int columnNum) { public void setReuseColumns(boolean reuseColumns) { this.reuseScratchColumns = reuseColumns; } + + public void clearScratchColumnWasUsedTracking() { + Arrays.fill(scratchColumnTrackWasUsed, false); + } + + public void setDontReuseTrackedScratchColumns(boolean dontReuseTrackedScratchColumns) { + this.dontReuseTrackedScratchColumns = dontReuseTrackedScratchColumns; + } } public int allocateScratchColumn(TypeInfo typeInfo) throws HiveException { @@ -657,6 +673,14 @@ public int allocateScratchColumn(TypeInfo typeInfo) throws HiveException { return ocm.currentScratchColumns(); } + public void clearScratchColumnWasUsedTracking() { + ocm.clearScratchColumnWasUsedTracking(); + } + + public void setDontReuseTrackedScratchColumns(boolean dontReuseTrackedScratchColumns) { + ocm.setDontReuseTrackedScratchColumns(dontReuseTrackedScratchColumns); + } + private VectorExpression getFilterOnBooleanColumnExpression(ExprNodeColumnDesc exprDesc, int columnNum) throws HiveException { VectorExpression expr = null; @@ -1002,6 +1026,24 @@ private TypeInfo getCommonTypeForChildExpressions(GenericUDF genericUdf, childrenWithCasts.add(child); } } + } else if (genericUDF instanceof GenericUDFIf) { + int i = 0; + for (ExprNodeDesc child : children) { + TypeInfo castType = commonType; + if (i++ == 0) { + + // Skip boolean predicate. + childrenWithCasts.add(child); + continue; + } + ExprNodeDesc castExpression = getImplicitCastExpression(genericUDF, child, castType); + if (castExpression != null) { + atleastOneCastNeeded = true; + childrenWithCasts.add(castExpression); + } else { + childrenWithCasts.add(child); + } + } } else { for (ExprNodeDesc child : children) { ExprNodeDesc castExpression = getImplicitCastExpression(genericUDF, child, commonType); @@ -1099,7 +1141,7 @@ private ExprNodeDesc getImplicitCastExpression(GenericUDF udf, ExprNodeDesc chil // Casts to exact types including long to double etc. are needed in some special cases. if (udf instanceof GenericUDFCoalesce || udf instanceof GenericUDFNvl - || udf instanceof GenericUDFElt) { + || udf instanceof GenericUDFElt || udf instanceof GenericUDFIf) { GenericUDF genericUdf = getGenericUDFForCast(castType); List children = new ArrayList(); children.add(child); diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java index 51b186c..e93d666 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java @@ -4659,6 +4659,14 @@ private boolean usesVectorUDFAdaptor(VectorExpression[] vecExprs) { List colList = selectDesc.getColList(); 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(); + VectorExpression[] vectorSelectExprs = new VectorExpression[size]; int[] projectedOutputColumns = new int[size]; for (int i = 0; i < size; i++) { @@ -4679,7 +4687,12 @@ private boolean usesVectorUDFAdaptor(VectorExpression[] vecExprs) { // 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. - fixDecimalDataTypePhysicalVariations(vContext, vectorSelectExprs); + vContext.setDontReuseTrackedScratchColumns(true); + try { + fixDecimalDataTypePhysicalVariations(vContext, vectorSelectExprs); + } finally { + vContext.setDontReuseTrackedScratchColumns(false); + } vectorSelectDesc.setSelectExpressions(vectorSelectExprs); vectorSelectDesc.setProjectedOutputColumns(projectedOutputColumns); diff --git ql/src/test/queries/clientpositive/vector_case_when_conversion.q ql/src/test/queries/clientpositive/vector_case_when_conversion.q new file mode 100644 index 0000000..04545fd --- /dev/null +++ ql/src/test/queries/clientpositive/vector_case_when_conversion.q @@ -0,0 +1,136 @@ +--! qt:dataset:alltypesorc +set hive.stats.fetch.column.stats=true; +set hive.explain.user=false; +SET hive.vectorized.execution.enabled=true; +set hive.fetch.task.conversion=none; + +-- SORT_QUERY_RESULTS + +-- +-- Test "else string" +-- +EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +-- Force usage of VectorUDFAdaptor +set hive.test.vectorized.adaptor.override=true; + +EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +set hive.test.vectorized.adaptor.override=false; + + + +-- Test "else null" +EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +-- Force usage of VectorUDFAdaptor +set hive.test.vectorized.adaptor.override=true; + +EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20; + +set hive.test.vectorized.adaptor.override=false; + diff --git ql/src/test/results/clientpositive/llap/vector_adaptor_usage_mode.q.out ql/src/test/results/clientpositive/llap/vector_adaptor_usage_mode.q.out index 52b17cf..6f16b5a 100644 --- ql/src/test/results/clientpositive/llap/vector_adaptor_usage_mode.q.out +++ ql/src/test/results/clientpositive/llap/vector_adaptor_usage_mode.q.out @@ -1037,13 +1037,13 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7] - selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 6:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnNull(col 4:boolean, col 5:int, null)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int) -> 6:int) -> 7:int + projectedOutputColumnNums: [0, 8] + selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 7:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnCondExpr(col 4:boolean, col 5:intcol 6:bigint)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int, ConstantVectorExpression(val null) -> 6:bigint) -> 7:int) -> 8:int Statistics: Num rows: 6 Data size: 544 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count(_col1) Group By Vectorization: - aggregators: VectorUDAFCount(col 7:int) -> bigint + aggregators: VectorUDAFCount(col 8:int) -> bigint className: VectorGroupByOperator groupByMode: HASH keyExpressions: col 0:string @@ -1168,13 +1168,13 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7] - selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 6:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnNull(col 4:boolean, col 5:int, null)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int) -> 6:int) -> 7:int + projectedOutputColumnNums: [0, 8] + selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 7:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnCondExpr(col 4:boolean, col 5:intcol 6:bigint)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int, ConstantVectorExpression(val null) -> 6:bigint) -> 7:int) -> 8:int Statistics: Num rows: 6 Data size: 544 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count(_col1) Group By Vectorization: - aggregators: VectorUDAFCount(col 7:int) -> bigint + aggregators: VectorUDAFCount(col 8:int) -> bigint className: VectorGroupByOperator groupByMode: HASH keyExpressions: col 0:string diff --git ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out index 4b8544a..8acc418 100644 --- ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out +++ ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out @@ -531,8 +531,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 22, 24, 25, 26, 27, 28, 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, VectorUDFDateAddColScalar(col 10:date, val 10) -> 18:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 19:date) -> 26:date, IfExprDoubleColumnLongScalar(col 17:boolean, col 28:double, val 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, IfExprDoubleColumnDoubleScalar(col 17:boolean, col 29:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 28:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 28:double) -> 29:double) -> 28: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:decimal(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(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER 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:int) -> 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, 22, 21, 23, 20, 28, 26, 29, 30, 31, 32, 33, 35, 39, 41, 44, 45] + 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 21: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, IfExprStringScalarStringGroupColumn(col 20:boolean, val Manycol 21:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, ConstantVectorExpression(val null) -> 21:string) -> 23:string) -> 21:string) -> 23:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 24:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 23:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 25:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringGroupColumnStringGroupColumn(col 20:boolean, col 23:string, col 23:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, ConstantVectorExpression(val null) -> 23:string, ConstantVectorExpression(val null) -> 24:string) -> 25:string) -> 23:string) -> 24:string) -> 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, IfExprDoubleColumnDoubleColumn(col 17:boolean, col 27:doublecol 26:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 26:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 26:double) -> 27:double, ConstantVectorExpression(val 0.0) -> 26:double) -> 28:double, IfExprDoubleColumnDoubleScalar(col 17:boolean, col 27:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 26:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 26:double) -> 27:double) -> 26:double, IfExprNullColumn(col 17:boolean, null, col 47)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 17:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 47:decimal(10,2)) -> 29:decimal(10,2), IfExprColumnNull(col 18:boolean, col 48: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) -> 48:decimal(10,2)) -> 30: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) -> 31: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) -> 32:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 19: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)) -> 19:boolean) -> 33:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 34: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)) -> 34:boolean) -> 35:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 36:boolean, col 37:timestampcol 38:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 36:boolean, CastDateToTimestamp(col 12:date) -> 37:timestamp, CastDateToTimestamp(col 11:date) -> 38:timestamp) -> 39:timestamp, IfExprColumnNull(col 36:boolean, col 40:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 36:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 40:int) -> 41:int, IfExprNullColumn(col 42:boolean, null, col 43)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 42:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 43:int) -> 44:int, IfExprLongScalarLongScalar(col 46:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 45:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 45:int) -> 46:boolean) -> 45:date Statistics: Num rows: 101 Data size: 57327 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -560,7 +560,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, string, 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)] Stage: Stage-0 Fetch Operator @@ -868,8 +868,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 27, 38, 48, 52, 54, 60, 62, 64, 66, 67, 68, 70, 74, 77, 80, 81] - 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:boolean, 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: LongColLessLongScalar(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, IfExprDoubleColumnLongScalar(col 57:boolean, col 58:double, val 0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 57:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 58:double) -> 54: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 83)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 61:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 83:decimal(10,2)) -> 62:decimal(10,2), IfExprColumnNull(col 63:boolean, col 84: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) -> 84: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)) -> 65:boolean) -> 66: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)) -> 65:boolean) -> 67:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 65:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 65:boolean) -> 68:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 69: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)) -> 69:boolean) -> 70:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 71:boolean, col 72:timestampcol 73:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 71:boolean, CastDateToTimestamp(col 12:date) -> 72:timestamp, CastDateToTimestamp(col 11:date) -> 73:timestamp) -> 74:timestamp, IfExprCondExprNull(col 75:boolean, col 76:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 75:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 76:int) -> 77:int, IfExprNullCondExpr(col 78:boolean, null, col 79:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 78:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 79:int) -> 80:int, IfExprLongScalarLongScalar(col 82:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 81:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 81:int) -> 82:boolean) -> 81:date + projectedOutputColumnNums: [4, 27, 39, 52, 56, 60, 64, 66, 68, 73, 77, 78, 80, 84, 87, 90, 91] + 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 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 23:boolean, ConstantVectorExpression(val Single) -> 28:string, IfExprColumnCondExpr(col 29:boolean, col 30:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 29:boolean, ConstantVectorExpression(val Two) -> 30:string, IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 31:boolean, ConstantVectorExpression(val Some) -> 32:string, IfExprColumnCondExpr(col 33:boolean, col 34:stringcol 35:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 33:boolean, ConstantVectorExpression(val Many) -> 34:string, ConstantVectorExpression(val null) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 51:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 50:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnCondExpr(col 44:boolean, col 45:stringcol 49:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string, IfExprCondExprCondExpr(col 46:boolean, col 47:stringcol 48:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 46:boolean, ConstantVectorExpression(val null) -> 47:string, ConstantVectorExpression(val null) -> 48:string) -> 49:string) -> 50:string) -> 51:string) -> 52:string, IfExprCondExprCondExpr(col 53:boolean, col 54:datecol 55:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 53:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 54:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 55:date) -> 56:date, IfExprCondExprCondExpr(col 57:boolean, col 59:doublecol 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, IfExprCondExprColumn(col 61:boolean, col 63:double, col 62:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 61:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 62:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 62:double) -> 63:double, ConstantVectorExpression(val 0.0) -> 62:double) -> 64:double, IfExprNullColumn(col 65:boolean, null, col 93)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 93:decimal(10,2)) -> 66:decimal(10,2), IfExprColumnNull(col 67:boolean, col 94:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 67:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 68: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)) -> 72:boolean) -> 73: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)) -> 76:boolean) -> 77:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 76: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)) -> 76:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79: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)) -> 79:boolean) -> 80:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 81:boolean, col 82:timestampcol 83:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 81:boolean, CastDateToTimestamp(col 12:date) -> 82:timestamp, CastDateToTimestamp(col 11:date) -> 83:timestamp) -> 84:timestamp, IfExprCondExprNull(col 85:boolean, col 86:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 85:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 86:int) -> 87:int, IfExprNullCondExpr(col 88:boolean, null, col 89:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 88:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 89:int) -> 90:int, IfExprLongScalarLongScalar(col 92:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 91:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 91:int) -> 92:boolean) -> 91:date Statistics: Num rows: 101 Data size: 57327 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -897,7 +897,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, bigint, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, 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, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, 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)] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out index c64adbf..ee4d4fb 100644 --- ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out +++ ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out @@ -140,23 +140,46 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12597 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [1, 3, 9, 10, 11, 8, 12, 7, 6, 17, 2] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 10:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 11:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 7:int) -> 8:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 12:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 5:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 5:boolean, col 6:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 6:boolean) -> 13:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 5:int) -> 6:int, IfExprLongColumnLongColumn(col 5:boolean, col 13:date, col 16:date)(children: DoubleColGreaterDoubleScalar(col 15:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 14:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 14:double) -> 15:double) -> 5:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 13:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 16:date) -> 17:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + keyColumns: 1:timestamp, 2:string, 3:timestamp + 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 + valueColumns: 9:string, 10:string, 11:string, 8:int, 12:string, 7:int, 6:int, 17:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) - Execution mode: llap + Execution mode: vectorized, llap LLAP IO: all inputs Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - notVectorizedReason: SELECT operator: Unexpected hive type name void - vectorized: false + allNative: true + usesVectorUDFAdaptor: true + vectorized: true + rowBatchContext: + dataColumnCount: 4 + includeColumns: [0, 1, 2, 3] + dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, bigint, double, double, bigint, bigint] Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: @@ -406,46 +429,23 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12597 Basic stats: COMPLETE Column stats: COMPLETE - TableScan Vectorization: - native: true - vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 - Select Vectorization: - className: VectorSelectOperator - native: true - projectedOutputColumnNums: [1, 3, 10, 12, 13, 14, 11, 7, 16, 23, 2] - selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 9:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 9:string) -> 10:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 12:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprColumnNull(col 8:boolean, col 9:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean, ConstantVectorExpression(val Early 2010s) -> 9:string) -> 11:string) -> 12:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprNullNull(null, null) -> 11:string) -> 13:string) -> 11:string) -> 13:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 7:int) -> 14:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 11:string, IfExprNullColumn(col 5:boolean, null, col 6)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 5:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, IfExprColumnNull(col 17:boolean, col 15:int, null)(children: ColAndCol(col 15:boolean, col 16:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 16:boolean) -> 17:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 15:int) -> 16:int, IfExprLongColumnLongColumn(col 20:boolean, col 21:date, col 22:date)(children: DoubleColGreaterDoubleScalar(col 19:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 18:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 18:double) -> 19:double) -> 20:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 21:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 22:date) -> 23:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ - Reduce Sink Vectorization: - className: VectorReduceSinkObjectHashOperator - keyColumns: 1:timestamp, 2:string, 3:timestamp - 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 - valueColumns: 10:string, 12:string, 13:string, 14:int, 11:string, 7:int, 16:int, 23:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) - Execution mode: vectorized, llap + Execution mode: llap LLAP IO: all inputs Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true - inputFormatFeatureSupport: [DECIMAL_64] - featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - allNative: true - usesVectorUDFAdaptor: true - vectorized: true - rowBatchContext: - dataColumnCount: 4 - includeColumns: [0, 1, 2, 3] - dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp - partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + notVectorizedReason: SELECT operator: Unsupported type timestamp for cast to String + vectorized: false Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: @@ -695,46 +695,23 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12597 Basic stats: COMPLETE Column stats: COMPLETE - TableScan Vectorization: - native: true - vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 - Select Vectorization: - className: VectorSelectOperator - native: true - projectedOutputColumnNums: [1, 3, 15, 26, 36, 40, 42, 44, 46, 53, 2] - selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 11:boolean, col 16:stringcol 25:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 11:boolean, ConstantVectorExpression(val Old) -> 16:string, IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 24:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 17:boolean, ConstantVectorExpression(val Early 2000s) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 23:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 19:boolean, ConstantVectorExpression(val Late 2000s) -> 20:string, IfExprColumnNull(col 21:boolean, col 22:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 21:boolean, ConstantVectorExpression(val Early 2010s) -> 22:string) -> 23:string) -> 24:string) -> 25:string) -> 26:string, IfExprColumnCondExpr(col 27:boolean, col 28:stringcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 27:boolean, ConstantVectorExpression(val Old) -> 28:string, IfExprColumnCondExpr(col 29:boolean, col 30:stringcol 34:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 29:boolean, ConstantVectorExpression(val Early 2000s) -> 30:string, IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 33:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 31:boolean, ConstantVectorExpression(val Late 2000s) -> 32:string, IfExprNullNull(null, null) -> 33:string) -> 34:string) -> 35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 39:int) -> 40:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 42:string, IfExprNullCondExpr(col 41:boolean, null, col 43:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 41:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 43:int) -> 44:int, IfExprCondExprNull(col 47:boolean, col 45:int, null)(children: ColAndCol(col 45:boolean, col 46:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 45:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 46:boolean) -> 47:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: DoubleColGreaterDoubleScalar(col 49:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 48:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 48:double) -> 49:double) -> 50:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 51:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 52:date) -> 53:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ - Reduce Sink Vectorization: - className: VectorReduceSinkObjectHashOperator - keyColumns: 1:timestamp, 2:string, 3:timestamp - 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 - valueColumns: 15:string, 26:string, 36:string, 40:int, 42:string, 44:int, 46:int, 53:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) - Execution mode: vectorized, llap + Execution mode: llap LLAP IO: all inputs Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true - inputFormatFeatureSupport: [DECIMAL_64] - featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - allNative: true - usesVectorUDFAdaptor: true - vectorized: true - rowBatchContext: - dataColumnCount: 4 - includeColumns: [0, 1, 2, 3] - dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp - 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, string, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + notVectorizedReason: SELECT operator: Unsupported type timestamp for cast to String + vectorized: false Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: diff --git ql/src/test/results/clientpositive/llap/vector_case_when_conversion.q.out ql/src/test/results/clientpositive/llap/vector_case_when_conversion.q.out new file mode 100644 index 0000000..bae9754 --- /dev/null +++ ql/src/test/results/clientpositive/llap/vector_case_when_conversion.q.out @@ -0,0 +1,600 @@ +PREHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) + Vertices: + Map 1 + Map Operator Tree: + TableScan Vectorization: + native: true + Filter Vectorization: + className: VectorFilterOperator + native: true + predicateExpression: SelectColumnIsNull(col 5:double) + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [6, 2, 4, 1, 24] + selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 6:stringcol 23:string)(children: IsNotNull(col 6:string) -> 13:boolean, col 6:string, IfExprCondExprCondExpr(col 14:boolean, col 15:stringcol 22:string)(children: IsNotNull(col 2:int) -> 14:boolean, CastLongToString(col 2:int) -> 15:string, IfExprCondExprCondExpr(col 16:boolean, col 17:stringcol 21:string)(children: IsNotNull(col 4:float) -> 16:boolean, CastFloatToString(col 4:float) -> 17:string, IfExprCondExprColumn(col 18:boolean, col 19:string, col 20:string)(children: IsNotNull(col 1:smallint) -> 18:boolean, CastLongToString(col 1:smallint) -> 19:string, ConstantVectorExpression(val none) -> 20:string) -> 21:string) -> 22:string) -> 23:string) -> 24:string + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: true + usesVectorUDFAdaptor: false + vectorized: true + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + Reduce Operator Tree: + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 3, 4] + Limit Vectorization: + className: VectorLimitOperator + native: true + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5, 0, 1, 2, 3, 4] + selectExpressions: ConstantVectorExpression(val null) -> 5:double + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + + Stage: Stage-0 + Fetch Operator + +PREHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +NULL 00MmJs1fiJp37y60mj4Ej8 -698191930 -51.0 NULL 00MmJs1fiJp37y60mj4Ej8 +NULL 00PafC7v 349566607 -51.0 NULL 00PafC7v +NULL 00iT08 284688862 -51.0 NULL 00iT08 +NULL 00k3yt70n476d6UQA -391432229 8.0 NULL 00k3yt70n476d6UQA +NULL 014ILGhXxNY7g02hl0Xw 633097881 11.0 NULL 014ILGhXxNY7g02hl0Xw +NULL 02VRbSC5I 551634127 8.0 NULL 02VRbSC5I +NULL 02k5poW73QsWM 891702124 11.0 NULL 02k5poW73QsWM +NULL 02v8WnLuYDos3Cq -648704945 8.0 NULL 02v8WnLuYDos3Cq +NULL 02vDyIVT752 388584379 11.0 NULL 02vDyIVT752 +NULL 0333uXvwB3ADRa4aP1h 336245146 8.0 NULL 0333uXvwB3ADRa4aP1h +NULL 033ffm5082ng0V -941753533 11.0 NULL 033ffm5082ng0V +NULL 035i4wu42Rs3Uu1ft5K0AOe -947302120 8.0 NULL 035i4wu42Rs3Uu1ft5K0AOe +NULL 03SnoFNyeHxQ2X -693113839 8.0 NULL 03SnoFNyeHxQ2X +NULL 03n0QGH 1018006843 11.0 NULL 03n0QGH +NULL 04Y1mA17 -114647521 -51.0 NULL 04Y1mA17 +NULL 04Yu8RntCU7amJtj -640911032 -51.0 NULL 04Yu8RntCU7amJtj +NULL 04fq7M416mV7CwI1q 168027481 -51.0 NULL 04fq7M416mV7CwI1q +NULL 04q7g1Qm8cvCmny4S7r 118167064 -51.0 NULL 04q7g1Qm8cvCmny4S7r +NULL 04vwGN4a82bd6y 295643033 NULL NULL 04vwGN4a82bd6y +NULL 04w7DF25lHW4 -981967139 8.0 NULL 04w7DF25lHW4 +PREHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) + Vertices: + Map 1 + Map Operator Tree: + TableScan Vectorization: + native: true + Filter Vectorization: + className: VectorFilterOperator + native: true + predicateExpression: SelectColumnIsTrue(col 13:boolean)(children: VectorUDFAdaptor(cdouble is null) -> 13:boolean) + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [6, 2, 4, 1, 18] + selectExpressions: VectorUDFAdaptor(CASE WHEN (cstring1 is not null) THEN (cstring1) WHEN (cint is not null) THEN (cint) WHEN (cfloat is not null) THEN (cfloat) WHEN (csmallint is not null) THEN (csmallint) ELSE ('none') END)(children: VectorUDFAdaptor(cstring1 is not null) -> 14:boolean, VectorUDFAdaptor(cint is not null) -> 15:boolean, VectorUDFAdaptor(cfloat is not null) -> 16:boolean, VectorUDFAdaptor(csmallint is not null) -> 17:boolean) -> 18:string + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: true + usesVectorUDFAdaptor: true + vectorized: true + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + Reduce Operator Tree: + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 3, 4] + Limit Vectorization: + className: VectorLimitOperator + native: true + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5, 0, 1, 2, 3, 4] + selectExpressions: ConstantVectorExpression(val null) -> 5:double + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + + Stage: Stage-0 + Fetch Operator + +PREHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else "none" + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +NULL 00MmJs1fiJp37y60mj4Ej8 -698191930 -51.0 NULL 00MmJs1fiJp37y60mj4Ej8 +NULL 00PafC7v 349566607 -51.0 NULL 00PafC7v +NULL 00iT08 284688862 -51.0 NULL 00iT08 +NULL 00k3yt70n476d6UQA -391432229 8.0 NULL 00k3yt70n476d6UQA +NULL 014ILGhXxNY7g02hl0Xw 633097881 11.0 NULL 014ILGhXxNY7g02hl0Xw +NULL 02VRbSC5I 551634127 8.0 NULL 02VRbSC5I +NULL 02k5poW73QsWM 891702124 11.0 NULL 02k5poW73QsWM +NULL 02v8WnLuYDos3Cq -648704945 8.0 NULL 02v8WnLuYDos3Cq +NULL 02vDyIVT752 388584379 11.0 NULL 02vDyIVT752 +NULL 0333uXvwB3ADRa4aP1h 336245146 8.0 NULL 0333uXvwB3ADRa4aP1h +NULL 033ffm5082ng0V -941753533 11.0 NULL 033ffm5082ng0V +NULL 035i4wu42Rs3Uu1ft5K0AOe -947302120 8.0 NULL 035i4wu42Rs3Uu1ft5K0AOe +NULL 03SnoFNyeHxQ2X -693113839 8.0 NULL 03SnoFNyeHxQ2X +NULL 03n0QGH 1018006843 11.0 NULL 03n0QGH +NULL 04Y1mA17 -114647521 -51.0 NULL 04Y1mA17 +NULL 04Yu8RntCU7amJtj -640911032 -51.0 NULL 04Yu8RntCU7amJtj +NULL 04fq7M416mV7CwI1q 168027481 -51.0 NULL 04fq7M416mV7CwI1q +NULL 04q7g1Qm8cvCmny4S7r 118167064 -51.0 NULL 04q7g1Qm8cvCmny4S7r +NULL 04vwGN4a82bd6y 295643033 NULL NULL 04vwGN4a82bd6y +NULL 04w7DF25lHW4 -981967139 8.0 NULL 04w7DF25lHW4 +PREHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) + Vertices: + Map 1 + Map Operator Tree: + TableScan Vectorization: + native: true + Filter Vectorization: + className: VectorFilterOperator + native: true + predicateExpression: SelectColumnIsNull(col 5:double) + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [6, 2, 4, 1, 24] + selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 6:stringcol 23:string)(children: IsNotNull(col 6:string) -> 13:boolean, col 6:string, IfExprCondExprCondExpr(col 14:boolean, col 15:stringcol 22:string)(children: IsNotNull(col 2:int) -> 14:boolean, CastLongToString(col 2:int) -> 15:string, IfExprCondExprCondExpr(col 16:boolean, col 17:stringcol 21:string)(children: IsNotNull(col 4:float) -> 16:boolean, CastFloatToString(col 4:float) -> 17:string, IfExprCondExprCondExpr(col 18:boolean, col 19:stringcol 20:string)(children: IsNotNull(col 1:smallint) -> 18:boolean, CastLongToString(col 1:smallint) -> 19:string, ConstantVectorExpression(val null) -> 20:string) -> 21:string) -> 22:string) -> 23:string) -> 24:string + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: true + usesVectorUDFAdaptor: false + vectorized: true + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + Reduce Operator Tree: + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 3, 4] + Limit Vectorization: + className: VectorLimitOperator + native: true + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5, 0, 1, 2, 3, 4] + selectExpressions: ConstantVectorExpression(val null) -> 5:double + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + + Stage: Stage-0 + Fetch Operator + +PREHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +NULL 00MmJs1fiJp37y60mj4Ej8 -698191930 -51.0 NULL 00MmJs1fiJp37y60mj4Ej8 +NULL 00PafC7v 349566607 -51.0 NULL 00PafC7v +NULL 00iT08 284688862 -51.0 NULL 00iT08 +NULL 00k3yt70n476d6UQA -391432229 8.0 NULL 00k3yt70n476d6UQA +NULL 014ILGhXxNY7g02hl0Xw 633097881 11.0 NULL 014ILGhXxNY7g02hl0Xw +NULL 02VRbSC5I 551634127 8.0 NULL 02VRbSC5I +NULL 02k5poW73QsWM 891702124 11.0 NULL 02k5poW73QsWM +NULL 02v8WnLuYDos3Cq -648704945 8.0 NULL 02v8WnLuYDos3Cq +NULL 02vDyIVT752 388584379 11.0 NULL 02vDyIVT752 +NULL 0333uXvwB3ADRa4aP1h 336245146 8.0 NULL 0333uXvwB3ADRa4aP1h +NULL 033ffm5082ng0V -941753533 11.0 NULL 033ffm5082ng0V +NULL 035i4wu42Rs3Uu1ft5K0AOe -947302120 8.0 NULL 035i4wu42Rs3Uu1ft5K0AOe +NULL 03SnoFNyeHxQ2X -693113839 8.0 NULL 03SnoFNyeHxQ2X +NULL 03n0QGH 1018006843 11.0 NULL 03n0QGH +NULL 04Y1mA17 -114647521 -51.0 NULL 04Y1mA17 +NULL 04Yu8RntCU7amJtj -640911032 -51.0 NULL 04Yu8RntCU7amJtj +NULL 04fq7M416mV7CwI1q 168027481 -51.0 NULL 04fq7M416mV7CwI1q +NULL 04q7g1Qm8cvCmny4S7r 118167064 -51.0 NULL 04q7g1Qm8cvCmny4S7r +NULL 04vwGN4a82bd6y 295643033 NULL NULL 04vwGN4a82bd6y +NULL 04w7DF25lHW4 -981967139 8.0 NULL 04w7DF25lHW4 +PREHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN VECTORIZATION ONLY EXPRESSION SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) + Vertices: + Map 1 + Map Operator Tree: + TableScan Vectorization: + native: true + Filter Vectorization: + className: VectorFilterOperator + native: true + predicateExpression: SelectColumnIsTrue(col 13:boolean)(children: VectorUDFAdaptor(cdouble is null) -> 13:boolean) + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [6, 2, 4, 1, 18] + selectExpressions: VectorUDFAdaptor(CASE WHEN (cstring1 is not null) THEN (cstring1) WHEN (cint is not null) THEN (cint) WHEN (cfloat is not null) THEN (cfloat) WHEN (csmallint is not null) THEN (csmallint) ELSE (null) END)(children: VectorUDFAdaptor(cstring1 is not null) -> 14:boolean, VectorUDFAdaptor(cint is not null) -> 15:boolean, VectorUDFAdaptor(cfloat is not null) -> 16:boolean, VectorUDFAdaptor(csmallint is not null) -> 17:boolean) -> 18:string + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: true + usesVectorUDFAdaptor: true + vectorized: true + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + Reduce Operator Tree: + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 3, 4] + Limit Vectorization: + className: VectorLimitOperator + native: true + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5, 0, 1, 2, 3, 4] + selectExpressions: ConstantVectorExpression(val null) -> 5:double + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + + Stage: Stage-0 + Fetch Operator + +PREHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: SELECT cdouble, cstring1, cint, cfloat, csmallint, + case + when (cdouble is not null) then cdouble + when (cstring1 is not null) then cstring1 + when (cint is not null) then cint + when (cfloat is not null) then cfloat + when (csmallint is not null) then csmallint + else null + end as c +FROM alltypesorc +WHERE (cdouble IS NULL) +ORDER BY cdouble, cstring1, cint, cfloat, csmallint, c +LIMIT 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +NULL 00MmJs1fiJp37y60mj4Ej8 -698191930 -51.0 NULL 00MmJs1fiJp37y60mj4Ej8 +NULL 00PafC7v 349566607 -51.0 NULL 00PafC7v +NULL 00iT08 284688862 -51.0 NULL 00iT08 +NULL 00k3yt70n476d6UQA -391432229 8.0 NULL 00k3yt70n476d6UQA +NULL 014ILGhXxNY7g02hl0Xw 633097881 11.0 NULL 014ILGhXxNY7g02hl0Xw +NULL 02VRbSC5I 551634127 8.0 NULL 02VRbSC5I +NULL 02k5poW73QsWM 891702124 11.0 NULL 02k5poW73QsWM +NULL 02v8WnLuYDos3Cq -648704945 8.0 NULL 02v8WnLuYDos3Cq +NULL 02vDyIVT752 388584379 11.0 NULL 02vDyIVT752 +NULL 0333uXvwB3ADRa4aP1h 336245146 8.0 NULL 0333uXvwB3ADRa4aP1h +NULL 033ffm5082ng0V -941753533 11.0 NULL 033ffm5082ng0V +NULL 035i4wu42Rs3Uu1ft5K0AOe -947302120 8.0 NULL 035i4wu42Rs3Uu1ft5K0AOe +NULL 03SnoFNyeHxQ2X -693113839 8.0 NULL 03SnoFNyeHxQ2X +NULL 03n0QGH 1018006843 11.0 NULL 03n0QGH +NULL 04Y1mA17 -114647521 -51.0 NULL 04Y1mA17 +NULL 04Yu8RntCU7amJtj -640911032 -51.0 NULL 04Yu8RntCU7amJtj +NULL 04fq7M416mV7CwI1q 168027481 -51.0 NULL 04fq7M416mV7CwI1q +NULL 04q7g1Qm8cvCmny4S7r 118167064 -51.0 NULL 04q7g1Qm8cvCmny4S7r +NULL 04vwGN4a82bd6y 295643033 NULL NULL 04vwGN4a82bd6y +NULL 04w7DF25lHW4 -981967139 8.0 NULL 04w7DF25lHW4 diff --git ql/src/test/results/clientpositive/llap/vector_udf_adaptor_1.q.out ql/src/test/results/clientpositive/llap/vector_udf_adaptor_1.q.out index e4c1d71..deab4d2 100644 --- ql/src/test/results/clientpositive/llap/vector_udf_adaptor_1.q.out +++ ql/src/test/results/clientpositive/llap/vector_udf_adaptor_1.q.out @@ -134,26 +134,46 @@ STAGE PLANS: TableScan alias: student_10_lines Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:name:string, 1:age:int, 2:gpa:double, 3:ROW__ID:struct] Select Operator expressions: name (type: string), age (type: int), gpa (type: double), if((age < 40), age, null) (type: int), if((age > 40), TIMESTAMP'2011-01-01 01:01:01', null) (type: timestamp), if((length(name) > 8), name, null) (type: string), if((length(name) < 8), CAST( name AS BINARY), null) (type: binary), if((age > 40), length(name), null) (type: int), if((length(name) > 10), (2.0D * gpa), null) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 5, 6, 8, 9, 10, 12] + selectExpressions: VectorUDFAdaptor(if((age < 40), age, null))(children: LongColLessLongScalar(col 1:int, val 40) -> 4:boolean) -> 5:int, VectorUDFAdaptor(if((age > 40), TIMESTAMP'2011-01-01 01:01:01', null))(children: LongColGreaterLongScalar(col 1:int, val 40) -> 4:boolean) -> 6:timestamp, VectorUDFAdaptor(if((length(name) > 8), name, null))(children: LongColGreaterLongScalar(col 4:int, val 8)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean) -> 8:string, VectorUDFAdaptor(if((length(name) < 8), CAST( name AS BINARY), null))(children: LongColLessLongScalar(col 4:int, val 8)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean, col 0:string) -> 9:binary, VectorUDFAdaptor(if((age > 40), length(name), null))(children: LongColGreaterLongScalar(col 1:int, val 40) -> 4:boolean, StringLength(col 0:string) -> 7:int) -> 10:int, VectorUDFAdaptor(if((length(name) > 10), (2.0D * gpa), null))(children: LongColGreaterLongScalar(col 4:int, val 10)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean, DoubleScalarMultiplyDoubleColumn(val 2.0, col 2:double) -> 11:double) -> 12:double Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.insert_a_adaptor - Execution mode: llap + Execution mode: vectorized, llap LLAP IO: all inputs Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - notVectorizedReason: SELECT operator: Unexpected hive type name void - vectorized: false + allNative: false + usesVectorUDFAdaptor: true + vectorized: true + rowBatchContext: + dataColumnCount: 3 + includeColumns: [0, 1, 2] + dataColumns: name:string, age:int, gpa:double + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, timestamp, bigint, string, string, bigint, double, double] Stage: Stage-2 Dependency Collection @@ -654,26 +674,46 @@ STAGE PLANS: TableScan alias: student_10_lines Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:name:string, 1:age:int, 2:gpa:double, 3:ROW__ID:struct] Select Operator expressions: name (type: string), age (type: int), gpa (type: double), if((age < 40), null, age) (type: int), if((age > 40), null, TIMESTAMP'2011-01-01 01:01:01') (type: timestamp), if((length(name) > 8), null, name) (type: string), if((length(name) < 8), null, CAST( name AS BINARY)) (type: binary), if((age > 40), null, length(name)) (type: int), if((length(name) > 10), null, (2.0D * gpa)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1, 2, 5, 6, 8, 9, 10, 12] + selectExpressions: VectorUDFAdaptor(if((age < 40), null, age))(children: LongColLessLongScalar(col 1:int, val 40) -> 4:boolean) -> 5:int, VectorUDFAdaptor(if((age > 40), null, TIMESTAMP'2011-01-01 01:01:01'))(children: LongColGreaterLongScalar(col 1:int, val 40) -> 4:boolean) -> 6:timestamp, VectorUDFAdaptor(if((length(name) > 8), null, name))(children: LongColGreaterLongScalar(col 4:int, val 8)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean) -> 8:string, VectorUDFAdaptor(if((length(name) < 8), null, CAST( name AS BINARY)))(children: LongColLessLongScalar(col 4:int, val 8)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean, col 0:string) -> 9:binary, VectorUDFAdaptor(if((age > 40), null, length(name)))(children: LongColGreaterLongScalar(col 1:int, val 40) -> 4:boolean, StringLength(col 0:string) -> 7:int) -> 10:int, VectorUDFAdaptor(if((length(name) > 10), null, (2.0D * gpa)))(children: LongColGreaterLongScalar(col 4:int, val 10)(children: StringLength(col 0:string) -> 4:int) -> 7:boolean, DoubleScalarMultiplyDoubleColumn(val 2.0, col 2:double) -> 11:double) -> 12:double Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false Statistics: Num rows: 12 Data size: 2352 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.insert_b_adaptor - Execution mode: llap + Execution mode: vectorized, llap LLAP IO: all inputs Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - notVectorizedReason: SELECT operator: Unexpected hive type name void - vectorized: false + allNative: false + usesVectorUDFAdaptor: true + vectorized: true + rowBatchContext: + dataColumnCount: 3 + includeColumns: [0, 1, 2] + dataColumns: name:string, age:int, gpa:double + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, timestamp, bigint, string, string, bigint, double, double] Stage: Stage-2 Dependency Collection diff --git ql/src/test/results/clientpositive/llap/vector_when_case_null.q.out ql/src/test/results/clientpositive/llap/vector_when_case_null.q.out index 6932744..9190bc8 100644 --- ql/src/test/results/clientpositive/llap/vector_when_case_null.q.out +++ ql/src/test/results/clientpositive/llap/vector_when_case_null.q.out @@ -55,13 +55,13 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7] - selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 6:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnNull(col 4:boolean, col 5:int, null)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int) -> 6:int) -> 7:int + projectedOutputColumnNums: [0, 8] + selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 7:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnCondExpr(col 4:boolean, col 5:intcol 6:bigint)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int, ConstantVectorExpression(val null) -> 6:bigint) -> 7:int) -> 8:int Statistics: Num rows: 5 Data size: 456 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count(_col1) Group By Vectorization: - aggregators: VectorUDAFCount(col 7:int) -> bigint + aggregators: VectorUDAFCount(col 8:int) -> bigint className: VectorGroupByOperator groupByMode: HASH keyExpressions: col 0:string diff --git ql/src/test/results/clientpositive/llap/vectorization_3.q.out ql/src/test/results/clientpositive/llap/vectorization_3.q.out index b998692..59a3a48 100644 --- ql/src/test/results/clientpositive/llap/vectorization_3.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_3.q.out @@ -166,8 +166,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [14, 19, 15, 23, 26, 29, 22, 32, 40, 9, 43, 35, 53, 54, 46, 59] - selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprNullCondExpr(col 25:boolean, null, col 27:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 27:bigint) -> 28:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 31:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 29:double) -> 22:double, IfExprNullCondExpr(col 28:boolean, null, col 30:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 28:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 30:bigint) -> 31:bigint) -> 29:double) -> 22:double) -> 29:double, DoubleColUnaryMinus(col 32:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 35:double)(children: FuncPowerDoubleToDouble(col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 34:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 32:double) -> 22:double, IfExprNullCondExpr(col 31:boolean, null, col 33:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 31:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 33:bigint) -> 34:bigint) -> 32:double) -> 22:double, DoubleColSubtractDoubleScalar(col 32:double, val 10.175)(children: FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 37:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 34:boolean, null, col 36:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 34:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 36:bigint) -> 37:bigint) -> 35:double) -> 32:double) -> 35:double) -> 32:double) -> 22:double, FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 37:boolean, null, col 38:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 37:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 35:double) -> 32:double, DoubleColUnaryMinus(col 35:double)(children: FuncPowerDoubleToDouble(col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 42:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 40:double) -> 35:double, IfExprNullCondExpr(col 39:boolean, null, col 41:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 41:bigint) -> 42:bigint) -> 40:double) -> 35:double) -> 40:double, DoubleColDivideDoubleColumn(col 35:double, col 46:double)(children: DoubleColUnaryMinus(col 43:double)(children: DoubleColMultiplyDoubleColumn(col 35:double, col 46:double)(children: FuncPowerDoubleToDouble(col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 45:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 43:double) -> 35:double, IfExprNullCondExpr(col 42:boolean, null, col 44:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 42:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 44:bigint) -> 45:bigint) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 48:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 45:boolean, null, col 47:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 45:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 47:bigint) -> 48:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 50:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 48:boolean, null, col 49:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 48:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 49:bigint) -> 50:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double, DoubleColUnaryMinus(col 46:double)(children: DoubleColSubtractDoubleScalar(col 35:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 52:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 46:double) -> 35:double, IfExprNullCondExpr(col 50:boolean, null, col 51:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 50:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 51:bigint) -> 52:bigint) -> 46:double) -> 35:double) -> 46:double) -> 35:double, DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 46:double) -> 53:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 46:double)(children: FuncPowerDoubleToDouble(col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 46:double) -> 54:double) -> 46:double, IfExprNullCondExpr(col 52:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 52:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 54:double) -> 46:double) -> 54:double, FuncPowerDoubleToDouble(col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 46:double) -> 57:double) -> 46:double) -> 57:double) -> 46:double, DoubleColDivideDoubleColumn(col 58:double, col 57:double)(children: DoubleColDivideLongColumn(col 57:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 57:double) -> 58:double, FuncPowerDoubleToDouble(col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 61:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 57:double) -> 59:double) -> 57:double, IfExprNullCondExpr(col 56:boolean, null, col 60:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 60:bigint) -> 61:bigint) -> 59:double) -> 57:double) -> 59:double + projectedOutputColumnNums: [14, 19, 15, 23, 26, 30, 22, 33, 42, 9, 45, 36, 57, 58, 48, 63] + selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 29:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprCondExprCondExpr(col 25:boolean, col 27:bigintcol 28:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, ConstantVectorExpression(val null) -> 27:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 28:bigint) -> 29:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 32:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 30:double) -> 22:double, IfExprNullCondExpr(col 29:boolean, null, col 31:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 29:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 31:bigint) -> 32:bigint) -> 30:double) -> 22:double) -> 30:double, DoubleColUnaryMinus(col 33:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 36:double)(children: FuncPowerDoubleToDouble(col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 35:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 33:double) -> 22:double, IfExprNullCondExpr(col 32:boolean, null, col 34:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 32:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 34:bigint) -> 35:bigint) -> 33:double) -> 22:double, DoubleColSubtractDoubleScalar(col 33:double, val 10.175)(children: FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 33:double) -> 36:double) -> 33:double, IfExprCondExprCondExpr(col 35:boolean, col 37:bigintcol 38:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 35:boolean, ConstantVectorExpression(val null) -> 37:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 36:double) -> 33:double) -> 36:double) -> 33:double) -> 22:double, FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 41:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 33:double) -> 36:double) -> 33:double, IfExprNullCondExpr(col 39:boolean, null, col 40:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 40:bigint) -> 41:bigint) -> 36:double) -> 33:double, DoubleColUnaryMinus(col 36:double)(children: FuncPowerDoubleToDouble(col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 44:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 42:double) -> 36:double, IfExprNullCondExpr(col 41:boolean, null, col 43:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 41:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 43:bigint) -> 44:bigint) -> 42:double) -> 36:double) -> 42:double, DoubleColDivideDoubleColumn(col 36:double, col 48:double)(children: DoubleColUnaryMinus(col 45:double)(children: DoubleColMultiplyDoubleColumn(col 36:double, col 48:double)(children: FuncPowerDoubleToDouble(col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 47:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 45:double) -> 36:double, IfExprNullCondExpr(col 44:boolean, null, col 46:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 44:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 46:bigint) -> 47:bigint) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 51:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 47:boolean, col 49:bigintcol 50:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 47:boolean, ConstantVectorExpression(val null) -> 49:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 50:bigint) -> 51:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 54:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 51:boolean, col 52:bigintcol 53:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 51:boolean, ConstantVectorExpression(val null) -> 52:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 53:bigint) -> 54:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double, DoubleColUnaryMinus(col 48:double)(children: DoubleColSubtractDoubleScalar(col 36:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 48:double) -> 36:double, IfExprNullCondExpr(col 54:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 54:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 48:double) -> 36:double) -> 48:double) -> 36:double, DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 48:double) -> 57:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 48:double)(children: FuncPowerDoubleToDouble(col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 60:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 48:double) -> 58:double) -> 48:double, IfExprNullCondExpr(col 56:boolean, null, col 59:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 59:bigint) -> 60:bigint) -> 58:double) -> 48:double) -> 58:double, FuncPowerDoubleToDouble(col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 48:double) -> 61:double) -> 48:double) -> 61:double) -> 48:double, DoubleColDivideDoubleColumn(col 62:double, col 61:double)(children: DoubleColDivideLongColumn(col 61:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 61:double) -> 62:double, FuncPowerDoubleToDouble(col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 65:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 61:double) -> 63:double) -> 61:double, IfExprNullCondExpr(col 60:boolean, null, col 64:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 60:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 64:bigint) -> 65:bigint) -> 63:double) -> 61:double) -> 63:double Statistics: Num rows: 1 Data size: 128 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false diff --git ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out index 7f1c6a2..fd7c616 100644 --- ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out @@ -2585,8 +2585,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7, 6, 11, 4, 17, 20, 5, 23, 26, 14, 29, 30, 2, 34] - selectExpressions: DoubleColDivideLongColumn(col 6:double, col 10:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 7:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 7:double) -> 6:double, IfExprNullCondExpr(col 8:boolean, null, col 9:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 8:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 9:bigint) -> 10:bigint) -> 7:double, DoubleScalarMultiplyDoubleColumn(val 2563.58, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 13:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 11:double) -> 6:double, IfExprNullCondExpr(col 10:boolean, null, col 12:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 10:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 12:bigint) -> 13:bigint) -> 11:double) -> 6:double, DoubleColUnaryMinus(col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 16:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 11:double) -> 14:double) -> 11:double, IfExprNullCondExpr(col 13:boolean, null, col 15:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 15:bigint) -> 16:bigint) -> 14:double) -> 11:double, DoubleColAddDoubleScalar(col 14:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 19:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 17:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 18:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 18:bigint) -> 19:bigint) -> 17:double) -> 14:double) -> 17:double, DoubleColMultiplyDoubleColumn(col 14:double, col 23:double)(children: DoubleColUnaryMinus(col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 20:double) -> 14:double, IfExprNullCondExpr(col 19:boolean, null, col 21:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 19:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 20:double) -> 14:double, DoubleColAddDoubleScalar(col 20:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 20:double) -> 23:double) -> 20:double, IfExprNullCondExpr(col 22:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 22:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 20:double) -> 23:double) -> 20:double, DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 23:double) -> 14:double) -> 23:double, DoubleColSubtractDoubleColumn(col 0:double, col 14:double)(children: DoubleColUnaryMinus(col 26:double)(children: DoubleColDivideLongColumn(col 14:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 26:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 26:double) -> 14:double, IfExprNullCondExpr(col 25:boolean, null, col 27:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 25:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 27:bigint) -> 28:bigint) -> 26:double) -> 14:double) -> 26:double, FuncPowerDoubleToDouble(col 29:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 29:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 29:double) -> 14:double) -> 29:double) -> 14:double, DoubleColAddDoubleColumn(col 0:double, col 30:double)(children: DoubleColDivideLongColumn(col 29:double, col 32:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 30:double)(children: DoubleColDivideLongColumn(col 29:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 29:double) -> 30:double) -> 29:double, IfExprNullCondExpr(col 28:boolean, null, col 31:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 28:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 31:bigint) -> 32:bigint) -> 30:double) -> 29:double, DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 30:double, DoubleScalarModuloDoubleColumn(val -863.257, col 33:double)(children: DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 33:double) -> 34:double + projectedOutputColumnNums: [0, 7, 6, 11, 4, 17, 20, 5, 23, 27, 14, 30, 31, 2, 35] + selectExpressions: DoubleColDivideLongColumn(col 6:double, col 10:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 7:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 7:double) -> 6:double, IfExprNullCondExpr(col 8:boolean, null, col 9:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 8:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 9:bigint) -> 10:bigint) -> 7:double, DoubleScalarMultiplyDoubleColumn(val 2563.58, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 13:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 11:double) -> 6:double, IfExprNullCondExpr(col 10:boolean, null, col 12:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 10:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 12:bigint) -> 13:bigint) -> 11:double) -> 6:double, DoubleColUnaryMinus(col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 16:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 11:double) -> 14:double) -> 11:double, IfExprNullCondExpr(col 13:boolean, null, col 15:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 15:bigint) -> 16:bigint) -> 14:double) -> 11:double, DoubleColAddDoubleScalar(col 14:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 19:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 17:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 18:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 18:bigint) -> 19:bigint) -> 17:double) -> 14:double) -> 17:double, DoubleColMultiplyDoubleColumn(col 14:double, col 23:double)(children: DoubleColUnaryMinus(col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 20:double) -> 14:double, IfExprNullCondExpr(col 19:boolean, null, col 21:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 19:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 20:double) -> 14:double, DoubleColAddDoubleScalar(col 20:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 26:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 20:double) -> 23:double) -> 20:double, IfExprCondExprCondExpr(col 22:boolean, col 24:bigintcol 25:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 22:boolean, ConstantVectorExpression(val null) -> 24:bigint, LongColSubtractLongScalar(col 3:bigint, val 1) -> 25:bigint) -> 26:bigint) -> 23:double) -> 20:double) -> 23:double) -> 20:double, DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 23:double) -> 14:double) -> 23:double, DoubleColSubtractDoubleColumn(col 0:double, col 14:double)(children: DoubleColUnaryMinus(col 27:double)(children: DoubleColDivideLongColumn(col 14:double, col 29:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 27:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 27:double) -> 14:double, IfExprNullCondExpr(col 26:boolean, null, col 28:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 26:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 28:bigint) -> 29:bigint) -> 27:double) -> 14:double) -> 27:double, FuncPowerDoubleToDouble(col 30:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 30:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 30:double) -> 14:double) -> 30:double) -> 14:double, DoubleColAddDoubleColumn(col 0:double, col 31:double)(children: DoubleColDivideLongColumn(col 30:double, col 33:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 31:double)(children: DoubleColDivideLongColumn(col 30:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 30:double) -> 31:double) -> 30:double, IfExprNullCondExpr(col 29:boolean, null, col 32:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 29:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 32:bigint) -> 33:bigint) -> 31:double) -> 30:double, DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 31:double, DoubleScalarModuloDoubleColumn(val -863.257, col 34:double)(children: DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 34:double) -> 35:double Statistics: Num rows: 1251 Data size: 157600 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: double) diff --git ql/src/test/results/clientpositive/llap/vectorized_case.q.out ql/src/test/results/clientpositive/llap/vectorized_case.q.out index add166b..5445d3c 100644 --- ql/src/test/results/clientpositive/llap/vectorized_case.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_case.q.out @@ -227,8 +227,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 18, 24] - selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnNull(col 15:boolean, col 16:string, null)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string) -> 17:string) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 23:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 19:boolean, ConstantVectorExpression(val a) -> 20:string, IfExprNullColumn(col 21:boolean, null, col 22)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 21:boolean, ConstantVectorExpression(val c) -> 22:string) -> 23:string) -> 24:string + projectedOutputColumnNums: [1, 19, 26] + selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 18:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnCondExpr(col 15:boolean, col 16:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string, ConstantVectorExpression(val null) -> 17:string) -> 18:string) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 25:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 20:boolean, ConstantVectorExpression(val a) -> 21:string, IfExprCondExprColumn(col 22:boolean, col 23:string, col 24:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 22:boolean, ConstantVectorExpression(val null) -> 23:string, ConstantVectorExpression(val c) -> 24:string) -> 25:string) -> 26:string Statistics: Num rows: 7 Data size: 2600 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -256,7 +256,7 @@ STAGE PLANS: includeColumns: [1] dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, string, string, bigint, string, bigint, string, string, string] + scratchColumnTypeNames: [bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, string, string, string] Stage: Stage-0 Fetch Operator @@ -698,8 +698,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(1,0)/DECIMAL_64)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 7:decimal(11,0)col 10:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConstantVectorExpression(val 1) -> 7:decimal(11,0), ConvertDecimal64ToDecimal(col 8:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 8:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -727,7 +727,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(1,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -783,8 +783,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ColumnDecimal64Scalar(col 6:boolean, col 7:decimal(11,0)/DECIMAL_64, decimal64Val 2, decimalVal 2)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 10:decimal(11,0)col 8:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConvertDecimal64ToDecimal(col 7:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0), ConstantVectorExpression(val 2) -> 8:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -812,7 +812,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(1,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -971,8 +971,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprNullCondExpr(col 3:boolean, null, col 4:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 2) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, ConstantVectorExpression(val null) -> 4:bigint, LongColAddLongScalar(col 1:bigint, val 2) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -1000,7 +1000,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator @@ -1056,8 +1056,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprCondExprNull(col 3:boolean, col 4:bigint, null)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint, ConstantVectorExpression(val null) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -1085,7 +1085,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out index bf22f4c..fb28d21 100644 --- ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out +++ ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out @@ -149,8 +149,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [14, 19, 15, 23, 26, 29, 22, 32, 40, 9, 43, 35, 53, 54, 46, 59] - selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprNullCondExpr(col 25:boolean, null, col 27:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 27:bigint) -> 28:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 31:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 29:double) -> 22:double, IfExprNullCondExpr(col 28:boolean, null, col 30:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 28:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 30:bigint) -> 31:bigint) -> 29:double) -> 22:double) -> 29:double, DoubleColUnaryMinus(col 32:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 35:double)(children: FuncPowerDoubleToDouble(col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 34:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 32:double) -> 22:double, IfExprNullCondExpr(col 31:boolean, null, col 33:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 31:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 33:bigint) -> 34:bigint) -> 32:double) -> 22:double, DoubleColSubtractDoubleScalar(col 32:double, val 10.175)(children: FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 37:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 34:boolean, null, col 36:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 34:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 36:bigint) -> 37:bigint) -> 35:double) -> 32:double) -> 35:double) -> 32:double) -> 22:double, FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 37:boolean, null, col 38:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 37:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 35:double) -> 32:double, DoubleColUnaryMinus(col 35:double)(children: FuncPowerDoubleToDouble(col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 42:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 40:double) -> 35:double, IfExprNullCondExpr(col 39:boolean, null, col 41:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 41:bigint) -> 42:bigint) -> 40:double) -> 35:double) -> 40:double, DoubleColDivideDoubleColumn(col 35:double, col 46:double)(children: DoubleColUnaryMinus(col 43:double)(children: DoubleColMultiplyDoubleColumn(col 35:double, col 46:double)(children: FuncPowerDoubleToDouble(col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 45:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 43:double) -> 35:double, IfExprNullCondExpr(col 42:boolean, null, col 44:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 42:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 44:bigint) -> 45:bigint) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 48:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 45:boolean, null, col 47:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 45:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 47:bigint) -> 48:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 50:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 48:boolean, null, col 49:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 48:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 49:bigint) -> 50:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double, DoubleColUnaryMinus(col 46:double)(children: DoubleColSubtractDoubleScalar(col 35:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 52:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 46:double) -> 35:double, IfExprNullCondExpr(col 50:boolean, null, col 51:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 50:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 51:bigint) -> 52:bigint) -> 46:double) -> 35:double) -> 46:double) -> 35:double, DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 46:double) -> 53:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 46:double)(children: FuncPowerDoubleToDouble(col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 46:double) -> 54:double) -> 46:double, IfExprNullCondExpr(col 52:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 52:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 54:double) -> 46:double) -> 54:double, FuncPowerDoubleToDouble(col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 46:double) -> 57:double) -> 46:double) -> 57:double) -> 46:double, DoubleColDivideDoubleColumn(col 58:double, col 57:double)(children: DoubleColDivideLongColumn(col 57:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 57:double) -> 58:double, FuncPowerDoubleToDouble(col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 61:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 57:double) -> 59:double) -> 57:double, IfExprNullCondExpr(col 56:boolean, null, col 60:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 60:bigint) -> 61:bigint) -> 59:double) -> 57:double) -> 59:double + projectedOutputColumnNums: [14, 19, 15, 23, 26, 30, 22, 33, 42, 9, 45, 36, 57, 58, 48, 63] + selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 29:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprCondExprCondExpr(col 25:boolean, col 27:bigintcol 28:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, ConstantVectorExpression(val null) -> 27:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 28:bigint) -> 29:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 32:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 30:double) -> 22:double, IfExprNullCondExpr(col 29:boolean, null, col 31:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 29:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 31:bigint) -> 32:bigint) -> 30:double) -> 22:double) -> 30:double, DoubleColUnaryMinus(col 33:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 36:double)(children: FuncPowerDoubleToDouble(col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 35:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 33:double) -> 22:double, IfExprNullCondExpr(col 32:boolean, null, col 34:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 32:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 34:bigint) -> 35:bigint) -> 33:double) -> 22:double, DoubleColSubtractDoubleScalar(col 33:double, val 10.175)(children: FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 33:double) -> 36:double) -> 33:double, IfExprCondExprCondExpr(col 35:boolean, col 37:bigintcol 38:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 35:boolean, ConstantVectorExpression(val null) -> 37:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 36:double) -> 33:double) -> 36:double) -> 33:double) -> 22:double, FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 41:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 33:double) -> 36:double) -> 33:double, IfExprNullCondExpr(col 39:boolean, null, col 40:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 40:bigint) -> 41:bigint) -> 36:double) -> 33:double, DoubleColUnaryMinus(col 36:double)(children: FuncPowerDoubleToDouble(col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 44:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 42:double) -> 36:double, IfExprNullCondExpr(col 41:boolean, null, col 43:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 41:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 43:bigint) -> 44:bigint) -> 42:double) -> 36:double) -> 42:double, DoubleColDivideDoubleColumn(col 36:double, col 48:double)(children: DoubleColUnaryMinus(col 45:double)(children: DoubleColMultiplyDoubleColumn(col 36:double, col 48:double)(children: FuncPowerDoubleToDouble(col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 47:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 45:double) -> 36:double, IfExprNullCondExpr(col 44:boolean, null, col 46:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 44:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 46:bigint) -> 47:bigint) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 51:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 47:boolean, col 49:bigintcol 50:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 47:boolean, ConstantVectorExpression(val null) -> 49:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 50:bigint) -> 51:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 54:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 51:boolean, col 52:bigintcol 53:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 51:boolean, ConstantVectorExpression(val null) -> 52:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 53:bigint) -> 54:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double, DoubleColUnaryMinus(col 48:double)(children: DoubleColSubtractDoubleScalar(col 36:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 48:double) -> 36:double, IfExprNullCondExpr(col 54:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 54:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 48:double) -> 36:double) -> 48:double) -> 36:double, DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 48:double) -> 57:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 48:double)(children: FuncPowerDoubleToDouble(col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 60:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 48:double) -> 58:double) -> 48:double, IfExprNullCondExpr(col 56:boolean, null, col 59:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 59:bigint) -> 60:bigint) -> 58:double) -> 48:double) -> 58:double, FuncPowerDoubleToDouble(col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 48:double) -> 61:double) -> 48:double) -> 61:double) -> 48:double, DoubleColDivideDoubleColumn(col 62:double, col 61:double)(children: DoubleColDivideLongColumn(col 61:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 61:double) -> 62:double, FuncPowerDoubleToDouble(col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 65:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 61:double) -> 63:double) -> 61:double, IfExprNullCondExpr(col 60:boolean, null, col 64:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 60:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 64:bigint) -> 65:bigint) -> 63:double) -> 61:double) -> 63:double Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false diff --git ql/src/test/results/clientpositive/spark/vectorization_3.q.out ql/src/test/results/clientpositive/spark/vectorization_3.q.out index 1e78ef5..8d57940 100644 --- ql/src/test/results/clientpositive/spark/vectorization_3.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_3.q.out @@ -164,8 +164,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [14, 19, 15, 23, 26, 29, 22, 32, 40, 9, 43, 35, 53, 54, 46, 59] - selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprNullCondExpr(col 25:boolean, null, col 27:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 27:bigint) -> 28:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 31:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 29:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 29:double) -> 22:double, IfExprNullCondExpr(col 28:boolean, null, col 30:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 28:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 30:bigint) -> 31:bigint) -> 29:double) -> 22:double) -> 29:double, DoubleColUnaryMinus(col 32:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 35:double)(children: FuncPowerDoubleToDouble(col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 34:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 32:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 32:double) -> 22:double, IfExprNullCondExpr(col 31:boolean, null, col 33:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 31:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 33:bigint) -> 34:bigint) -> 32:double) -> 22:double, DoubleColSubtractDoubleScalar(col 32:double, val 10.175)(children: FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 37:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 34:boolean, null, col 36:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 34:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 36:bigint) -> 37:bigint) -> 35:double) -> 32:double) -> 35:double) -> 32:double) -> 22:double, FuncPowerDoubleToDouble(col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 35:double)(children: DoubleColDivideLongColumn(col 32:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 32:double) -> 35:double) -> 32:double, IfExprNullCondExpr(col 37:boolean, null, col 38:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 37:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 35:double) -> 32:double, DoubleColUnaryMinus(col 35:double)(children: FuncPowerDoubleToDouble(col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 42:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 40:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 40:double) -> 35:double, IfExprNullCondExpr(col 39:boolean, null, col 41:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 41:bigint) -> 42:bigint) -> 40:double) -> 35:double) -> 40:double, DoubleColDivideDoubleColumn(col 35:double, col 46:double)(children: DoubleColUnaryMinus(col 43:double)(children: DoubleColMultiplyDoubleColumn(col 35:double, col 46:double)(children: FuncPowerDoubleToDouble(col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 45:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 43:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 43:double) -> 35:double, IfExprNullCondExpr(col 42:boolean, null, col 44:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 42:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 44:bigint) -> 45:bigint) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 48:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 45:boolean, null, col 47:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 45:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 47:bigint) -> 48:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double) -> 35:double, DoubleColSubtractDoubleScalar(col 43:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 50:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 43:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 43:double) -> 46:double) -> 43:double, IfExprNullCondExpr(col 48:boolean, null, col 49:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 48:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 49:bigint) -> 50:bigint) -> 46:double) -> 43:double) -> 46:double) -> 43:double, DoubleColUnaryMinus(col 46:double)(children: DoubleColSubtractDoubleScalar(col 35:double, val 10.175)(children: FuncPowerDoubleToDouble(col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 52:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 46:double)(children: DoubleColDivideLongColumn(col 35:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 35:double) -> 46:double) -> 35:double, IfExprNullCondExpr(col 50:boolean, null, col 51:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 50:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 51:bigint) -> 52:bigint) -> 46:double) -> 35:double) -> 46:double) -> 35:double, DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 46:double) -> 53:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 46:double)(children: FuncPowerDoubleToDouble(col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 54:double)(children: DoubleColDivideLongColumn(col 46:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 46:double) -> 54:double) -> 46:double, IfExprNullCondExpr(col 52:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 52:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 54:double) -> 46:double) -> 54:double, FuncPowerDoubleToDouble(col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 57:double)(children: DoubleColDivideLongColumn(col 46:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 46:double) -> 57:double) -> 46:double) -> 57:double) -> 46:double, DoubleColDivideDoubleColumn(col 58:double, col 57:double)(children: DoubleColDivideLongColumn(col 57:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 57:double) -> 58:double, FuncPowerDoubleToDouble(col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 61:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 59:double)(children: DoubleColDivideLongColumn(col 57:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 57:double) -> 59:double) -> 57:double, IfExprNullCondExpr(col 56:boolean, null, col 60:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 60:bigint) -> 61:bigint) -> 59:double) -> 57:double) -> 59:double + projectedOutputColumnNums: [14, 19, 15, 23, 26, 30, 22, 33, 42, 9, 45, 36, 57, 58, 48, 63] + selectExpressions: FuncPowerDoubleToDouble(col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 18:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 15:double)(children: DoubleColDivideLongColumn(col 14:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 14:double) -> 15:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 17:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 17:bigint) -> 18:bigint) -> 15:double) -> 14:double, DoubleColSubtractDoubleScalar(col 15:double, val 10.175)(children: FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 21:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 19:double)(children: DoubleColDivideLongColumn(col 15:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 15:double) -> 19:double) -> 15:double, IfExprNullCondExpr(col 18:boolean, null, col 20:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 18:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 20:bigint) -> 21:bigint) -> 19:double) -> 15:double) -> 19:double, FuncPowerDoubleToDouble(col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 22:double)(children: DoubleColDivideLongColumn(col 15:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 15:double) -> 22:double) -> 15:double) -> 22:double) -> 15:double, DoubleColMultiplyDoubleColumn(col 22:double, col 26:double)(children: FuncPowerDoubleToDouble(col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 23:double) -> 22:double, IfExprNullCondExpr(col 21:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 21:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 22:double, DoubleColSubtractDoubleScalar(col 23:double, val 10.175)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 29:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 26:double)(children: DoubleColDivideLongColumn(col 23:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 23:double) -> 26:double) -> 23:double, IfExprCondExprCondExpr(col 25:boolean, col 27:bigintcol 28:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 25:boolean, ConstantVectorExpression(val null) -> 27:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 28:bigint) -> 29:bigint) -> 26:double) -> 23:double) -> 26:double) -> 23:double, DoubleColUnaryMinus(col 22:double)(children: FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 26:double)(children: DoubleColDivideLongColumn(col 22:double, col 5:bigint)(children: DoubleColMultiplyDoubleColumn(col 4:double, col 4:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double) -> 22:double) -> 26:double, DoubleColModuloDoubleScalar(col 22:double, val 79.553)(children: FuncPowerDoubleToDouble(col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 32:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 30:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 30:double) -> 22:double, IfExprNullCondExpr(col 29:boolean, null, col 31:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 29:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 31:bigint) -> 32:bigint) -> 30:double) -> 22:double) -> 30:double, DoubleColUnaryMinus(col 33:double)(children: DoubleColMultiplyDoubleColumn(col 22:double, col 36:double)(children: FuncPowerDoubleToDouble(col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 35:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 33:double)(children: DoubleColDivideLongColumn(col 22:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 22:double) -> 33:double) -> 22:double, IfExprNullCondExpr(col 32:boolean, null, col 34:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 32:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 34:bigint) -> 35:bigint) -> 33:double) -> 22:double, DoubleColSubtractDoubleScalar(col 33:double, val 10.175)(children: FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 39:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 33:double) -> 36:double) -> 33:double, IfExprCondExprCondExpr(col 35:boolean, col 37:bigintcol 38:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 35:boolean, ConstantVectorExpression(val null) -> 37:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 38:bigint) -> 39:bigint) -> 36:double) -> 33:double) -> 36:double) -> 33:double) -> 22:double, FuncPowerDoubleToDouble(col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 41:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 36:double)(children: DoubleColDivideLongColumn(col 33:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 33:double) -> 36:double) -> 33:double, IfExprNullCondExpr(col 39:boolean, null, col 40:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 39:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 40:bigint) -> 41:bigint) -> 36:double) -> 33:double, DoubleColUnaryMinus(col 36:double)(children: FuncPowerDoubleToDouble(col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 44:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 42:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 42:double) -> 36:double, IfExprNullCondExpr(col 41:boolean, null, col 43:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 41:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 43:bigint) -> 44:bigint) -> 42:double) -> 36:double) -> 42:double, DoubleColDivideDoubleColumn(col 36:double, col 48:double)(children: DoubleColUnaryMinus(col 45:double)(children: DoubleColMultiplyDoubleColumn(col 36:double, col 48:double)(children: FuncPowerDoubleToDouble(col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 47:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 45:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 45:double) -> 36:double, IfExprNullCondExpr(col 44:boolean, null, col 46:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 44:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 46:bigint) -> 47:bigint) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 51:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 47:boolean, col 49:bigintcol 50:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 47:boolean, ConstantVectorExpression(val null) -> 49:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 50:bigint) -> 51:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double) -> 36:double, DoubleColSubtractDoubleScalar(col 45:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 54:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 45:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 45:double) -> 48:double) -> 45:double, IfExprCondExprCondExpr(col 51:boolean, col 52:bigintcol 53:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 51:boolean, ConstantVectorExpression(val null) -> 52:bigint, LongColSubtractLongScalar(col 2:bigint, val 1) -> 53:bigint) -> 54:bigint) -> 48:double) -> 45:double) -> 48:double) -> 45:double, DoubleColUnaryMinus(col 48:double)(children: DoubleColSubtractDoubleScalar(col 36:double, val 10.175)(children: FuncPowerDoubleToDouble(col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 56:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 48:double)(children: DoubleColDivideLongColumn(col 36:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 36:double) -> 48:double) -> 36:double, IfExprNullCondExpr(col 54:boolean, null, col 55:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 54:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 55:bigint) -> 56:bigint) -> 48:double) -> 36:double) -> 48:double) -> 36:double, DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 48:double) -> 57:double, DoubleScalarSubtractDoubleColumn(val -3728.0, col 48:double)(children: FuncPowerDoubleToDouble(col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 60:bigint)(children: DoubleColSubtractDoubleColumn(col 0:double, col 58:double)(children: DoubleColDivideLongColumn(col 48:double, col 2:bigint)(children: DoubleColMultiplyDoubleColumn(col 1:double, col 1:double) -> 48:double) -> 58:double) -> 48:double, IfExprNullCondExpr(col 56:boolean, null, col 59:bigint)(children: LongColEqualLongScalar(col 2:bigint, val 1) -> 56:boolean, LongColSubtractLongScalar(col 2:bigint, val 1) -> 59:bigint) -> 60:bigint) -> 58:double) -> 48:double) -> 58:double, FuncPowerDoubleToDouble(col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 12:double, col 61:double)(children: DoubleColDivideLongColumn(col 48:double, col 11:bigint)(children: DoubleColMultiplyDoubleColumn(col 13:double, col 13:double) -> 48:double) -> 61:double) -> 48:double) -> 61:double) -> 48:double, DoubleColDivideDoubleColumn(col 62:double, col 61:double)(children: DoubleColDivideLongColumn(col 61:double, col 11:bigint)(children: CastLongToDouble(col 10:bigint) -> 61:double) -> 62:double, FuncPowerDoubleToDouble(col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 65:bigint)(children: DoubleColSubtractDoubleColumn(col 6:double, col 63:double)(children: DoubleColDivideLongColumn(col 61:double, col 8:bigint)(children: DoubleColMultiplyDoubleColumn(col 7:double, col 7:double) -> 61:double) -> 63:double) -> 61:double, IfExprNullCondExpr(col 60:boolean, null, col 64:bigint)(children: LongColEqualLongScalar(col 8:bigint, val 1) -> 60:boolean, LongColSubtractLongScalar(col 8:bigint, val 1) -> 64:bigint) -> 65:bigint) -> 63:double) -> 61:double) -> 63:double Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false diff --git ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out index 231dea6..6d35520 100644 --- ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out @@ -2565,8 +2565,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7, 6, 11, 4, 17, 20, 5, 23, 26, 14, 29, 30, 2, 34] - selectExpressions: DoubleColDivideLongColumn(col 6:double, col 10:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 7:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 7:double) -> 6:double, IfExprNullCondExpr(col 8:boolean, null, col 9:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 8:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 9:bigint) -> 10:bigint) -> 7:double, DoubleScalarMultiplyDoubleColumn(val 2563.58, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 13:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 11:double) -> 6:double, IfExprNullCondExpr(col 10:boolean, null, col 12:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 10:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 12:bigint) -> 13:bigint) -> 11:double) -> 6:double, DoubleColUnaryMinus(col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 16:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 11:double) -> 14:double) -> 11:double, IfExprNullCondExpr(col 13:boolean, null, col 15:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 15:bigint) -> 16:bigint) -> 14:double) -> 11:double, DoubleColAddDoubleScalar(col 14:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 19:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 17:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 18:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 18:bigint) -> 19:bigint) -> 17:double) -> 14:double) -> 17:double, DoubleColMultiplyDoubleColumn(col 14:double, col 23:double)(children: DoubleColUnaryMinus(col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 20:double) -> 14:double, IfExprNullCondExpr(col 19:boolean, null, col 21:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 19:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 20:double) -> 14:double, DoubleColAddDoubleScalar(col 20:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 25:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 20:double) -> 23:double) -> 20:double, IfExprNullCondExpr(col 22:boolean, null, col 24:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 22:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 24:bigint) -> 25:bigint) -> 23:double) -> 20:double) -> 23:double) -> 20:double, DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 23:double) -> 14:double) -> 23:double, DoubleColSubtractDoubleColumn(col 0:double, col 14:double)(children: DoubleColUnaryMinus(col 26:double)(children: DoubleColDivideLongColumn(col 14:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 26:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 26:double) -> 14:double, IfExprNullCondExpr(col 25:boolean, null, col 27:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 25:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 27:bigint) -> 28:bigint) -> 26:double) -> 14:double) -> 26:double, FuncPowerDoubleToDouble(col 29:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 29:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 29:double) -> 14:double) -> 29:double) -> 14:double, DoubleColAddDoubleColumn(col 0:double, col 30:double)(children: DoubleColDivideLongColumn(col 29:double, col 32:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 30:double)(children: DoubleColDivideLongColumn(col 29:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 29:double) -> 30:double) -> 29:double, IfExprNullCondExpr(col 28:boolean, null, col 31:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 28:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 31:bigint) -> 32:bigint) -> 30:double) -> 29:double, DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 30:double, DoubleScalarModuloDoubleColumn(val -863.257, col 33:double)(children: DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 33:double) -> 34:double + projectedOutputColumnNums: [0, 7, 6, 11, 4, 17, 20, 5, 23, 27, 14, 30, 31, 2, 35] + selectExpressions: DoubleColDivideLongColumn(col 6:double, col 10:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 7:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 7:double) -> 6:double, IfExprNullCondExpr(col 8:boolean, null, col 9:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 8:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 9:bigint) -> 10:bigint) -> 7:double, DoubleScalarMultiplyDoubleColumn(val 2563.58, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 13:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 11:double) -> 6:double, IfExprNullCondExpr(col 10:boolean, null, col 12:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 10:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 12:bigint) -> 13:bigint) -> 11:double) -> 6:double, DoubleColUnaryMinus(col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 16:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 14:double)(children: DoubleColDivideLongColumn(col 11:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 11:double) -> 14:double) -> 11:double, IfExprNullCondExpr(col 13:boolean, null, col 15:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 15:bigint) -> 16:bigint) -> 14:double) -> 11:double, DoubleColAddDoubleScalar(col 14:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 19:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 17:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 17:double) -> 14:double, IfExprNullCondExpr(col 16:boolean, null, col 18:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 16:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 18:bigint) -> 19:bigint) -> 17:double) -> 14:double) -> 17:double, DoubleColMultiplyDoubleColumn(col 14:double, col 23:double)(children: DoubleColUnaryMinus(col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 20:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 20:double) -> 14:double, IfExprNullCondExpr(col 19:boolean, null, col 21:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 19:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 20:double) -> 14:double, DoubleColAddDoubleScalar(col 20:double, val -5638.15)(children: DoubleScalarMultiplyDoubleColumn(val 2563.58, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 26:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 20:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 20:double) -> 23:double) -> 20:double, IfExprCondExprCondExpr(col 22:boolean, col 24:bigintcol 25:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 22:boolean, ConstantVectorExpression(val null) -> 24:bigint, LongColSubtractLongScalar(col 3:bigint, val 1) -> 25:bigint) -> 26:bigint) -> 23:double) -> 20:double) -> 23:double) -> 20:double, DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 23:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 23:double) -> 14:double) -> 23:double, DoubleColSubtractDoubleColumn(col 0:double, col 14:double)(children: DoubleColUnaryMinus(col 27:double)(children: DoubleColDivideLongColumn(col 14:double, col 29:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 27:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 27:double) -> 14:double, IfExprNullCondExpr(col 26:boolean, null, col 28:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 26:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 28:bigint) -> 29:bigint) -> 27:double) -> 14:double) -> 27:double, FuncPowerDoubleToDouble(col 30:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 30:double)(children: DoubleColDivideLongColumn(col 14:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 14:double) -> 30:double) -> 14:double) -> 30:double) -> 14:double, DoubleColAddDoubleColumn(col 0:double, col 31:double)(children: DoubleColDivideLongColumn(col 30:double, col 33:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 31:double)(children: DoubleColDivideLongColumn(col 30:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 30:double) -> 31:double) -> 30:double, IfExprNullCondExpr(col 29:boolean, null, col 32:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 29:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 32:bigint) -> 33:bigint) -> 31:double) -> 30:double, DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 31:double, DoubleScalarModuloDoubleColumn(val -863.257, col 34:double)(children: DoubleColMultiplyDoubleScalar(col 0:double, val 762.0) -> 34:double) -> 35:double Statistics: Num rows: 1327 Data size: 314038 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: double) diff --git ql/src/test/results/clientpositive/spark/vectorized_case.q.out ql/src/test/results/clientpositive/spark/vectorized_case.q.out index a96aca5..bddbe70 100644 --- ql/src/test/results/clientpositive/spark/vectorized_case.q.out +++ ql/src/test/results/clientpositive/spark/vectorized_case.q.out @@ -226,8 +226,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 18, 24] - selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnNull(col 15:boolean, col 16:string, null)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string) -> 17:string) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 23:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 19:boolean, ConstantVectorExpression(val a) -> 20:string, IfExprNullColumn(col 21:boolean, null, col 22)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 21:boolean, ConstantVectorExpression(val c) -> 22:string) -> 23:string) -> 24:string + projectedOutputColumnNums: [1, 19, 26] + selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 18:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnCondExpr(col 15:boolean, col 16:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string, ConstantVectorExpression(val null) -> 17:string) -> 18:string) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 25:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 20:boolean, ConstantVectorExpression(val a) -> 21:string, IfExprCondExprColumn(col 22:boolean, col 23:string, col 24:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 22:boolean, ConstantVectorExpression(val null) -> 23:string, ConstantVectorExpression(val c) -> 24:string) -> 25:string) -> 26:string Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -254,7 +254,7 @@ STAGE PLANS: includeColumns: [1] dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, string, string, bigint, string, bigint, string, string, string] + scratchColumnTypeNames: [bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, string, string, string] Stage: Stage-0 Fetch Operator @@ -691,8 +691,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(1,0)/DECIMAL_64)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 7:decimal(11,0)col 10:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConstantVectorExpression(val 1) -> 7:decimal(11,0), ConvertDecimal64ToDecimal(col 8:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 8:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -719,7 +719,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(1,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -775,8 +775,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ColumnDecimal64Scalar(col 6:boolean, col 7:decimal(11,0)/DECIMAL_64, decimal64Val 2, decimalVal 2)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 10:decimal(11,0)col 8:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConvertDecimal64ToDecimal(col 7:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0), ConstantVectorExpression(val 2) -> 8:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -803,7 +803,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(1,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -961,8 +961,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprNullCondExpr(col 3:boolean, null, col 4:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 2) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, ConstantVectorExpression(val null) -> 4:bigint, LongColAddLongScalar(col 1:bigint, val 2) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -989,7 +989,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator @@ -1045,8 +1045,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprCondExprNull(col 3:boolean, col 4:bigint, null)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint, ConstantVectorExpression(val null) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -1073,7 +1073,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/vector_case_when_1.q.out ql/src/test/results/clientpositive/vector_case_when_1.q.out index 270f5eb..3394e06 100644 --- ql/src/test/results/clientpositive/vector_case_when_1.q.out +++ ql/src/test/results/clientpositive/vector_case_when_1.q.out @@ -523,8 +523,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 22, 24, 25, 26, 27, 28, 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, VectorUDFDateAddColScalar(col 10:date, val 10) -> 18:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 19:date) -> 26:date, IfExprDoubleColumnLongScalar(col 17:boolean, col 28:double, val 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, IfExprDoubleColumnDoubleScalar(col 17:boolean, col 29:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 28:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 28:double) -> 29:double) -> 28: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:decimal(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(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER 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:int) -> 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, 22, 21, 23, 20, 28, 26, 29, 30, 31, 32, 33, 35, 39, 41, 44, 45] + 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 21: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, IfExprStringScalarStringGroupColumn(col 20:boolean, val Manycol 21:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, ConstantVectorExpression(val null) -> 21:string) -> 23:string) -> 21:string) -> 23:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 24:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 23:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 25:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringGroupColumnStringGroupColumn(col 20:boolean, col 23:string, col 23:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, ConstantVectorExpression(val null) -> 23:string, ConstantVectorExpression(val null) -> 24:string) -> 25:string) -> 23:string) -> 24:string) -> 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, IfExprDoubleColumnDoubleColumn(col 17:boolean, col 27:doublecol 26:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 26:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 26:double) -> 27:double, ConstantVectorExpression(val 0.0) -> 26:double) -> 28:double, IfExprDoubleColumnDoubleScalar(col 17:boolean, col 27:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 26:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 26:double) -> 27:double) -> 26:double, IfExprNullColumn(col 17:boolean, null, col 47)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 17:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 47:decimal(10,2)) -> 29:decimal(10,2), IfExprColumnNull(col 18:boolean, col 48: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) -> 48:decimal(10,2)) -> 30: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) -> 31: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) -> 32:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 19: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)) -> 19:boolean) -> 33:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 34: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)) -> 34:boolean) -> 35:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 36:boolean, col 37:timestampcol 38:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 36:boolean, CastDateToTimestamp(col 12:date) -> 37:timestamp, CastDateToTimestamp(col 11:date) -> 38:timestamp) -> 39:timestamp, IfExprColumnNull(col 36:boolean, col 40:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 36:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 40:int) -> 41:int, IfExprNullColumn(col 42:boolean, null, col 43)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 42:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 43:int) -> 44:int, IfExprLongScalarLongScalar(col 46:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 45:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 45:int) -> 46:boolean) -> 45:date Statistics: Num rows: 101 Data size: 78500 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -551,7 +551,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, string, 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)] Stage: Stage-0 Fetch Operator @@ -856,8 +856,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 27, 38, 48, 52, 54, 60, 62, 64, 66, 67, 68, 70, 74, 77, 80, 81] - 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:boolean, 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: LongColLessLongScalar(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, IfExprDoubleColumnLongScalar(col 57:boolean, col 58:double, val 0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 57:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 58:double) -> 54: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 83)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 61:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 83:decimal(10,2)) -> 62:decimal(10,2), IfExprColumnNull(col 63:boolean, col 84: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) -> 84: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)) -> 65:boolean) -> 66: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)) -> 65:boolean) -> 67:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 65:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 65:boolean) -> 68:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 69: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)) -> 69:boolean) -> 70:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 71:boolean, col 72:timestampcol 73:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 71:boolean, CastDateToTimestamp(col 12:date) -> 72:timestamp, CastDateToTimestamp(col 11:date) -> 73:timestamp) -> 74:timestamp, IfExprCondExprNull(col 75:boolean, col 76:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 75:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 76:int) -> 77:int, IfExprNullCondExpr(col 78:boolean, null, col 79:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 78:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 79:int) -> 80:int, IfExprLongScalarLongScalar(col 82:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 81:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 81:int) -> 82:boolean) -> 81:date + projectedOutputColumnNums: [4, 27, 39, 52, 56, 60, 64, 66, 68, 73, 77, 78, 80, 84, 87, 90, 91] + 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 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 23:boolean, ConstantVectorExpression(val Single) -> 28:string, IfExprColumnCondExpr(col 29:boolean, col 30:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 29:boolean, ConstantVectorExpression(val Two) -> 30:string, IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 31:boolean, ConstantVectorExpression(val Some) -> 32:string, IfExprColumnCondExpr(col 33:boolean, col 34:stringcol 35:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 33:boolean, ConstantVectorExpression(val Many) -> 34:string, ConstantVectorExpression(val null) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 51:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 50:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnCondExpr(col 44:boolean, col 45:stringcol 49:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string, IfExprCondExprCondExpr(col 46:boolean, col 47:stringcol 48:string)(children: LongColLessLongScalar(col 4:int, val 100) -> 46:boolean, ConstantVectorExpression(val null) -> 47:string, ConstantVectorExpression(val null) -> 48:string) -> 49:string) -> 50:string) -> 51:string) -> 52:string, IfExprCondExprCondExpr(col 53:boolean, col 54:datecol 55:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 53:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 54:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 55:date) -> 56:date, IfExprCondExprCondExpr(col 57:boolean, col 59:doublecol 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, IfExprCondExprColumn(col 61:boolean, col 63:double, col 62:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 61:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 62:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 62:double) -> 63:double, ConstantVectorExpression(val 0.0) -> 62:double) -> 64:double, IfExprNullColumn(col 65:boolean, null, col 93)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 93:decimal(10,2)) -> 66:decimal(10,2), IfExprColumnNull(col 67:boolean, col 94:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 67:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 68: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)) -> 72:boolean) -> 73: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)) -> 76:boolean) -> 77:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 76: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)) -> 76:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79: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)) -> 79:boolean) -> 80:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 81:boolean, col 82:timestampcol 83:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 81:boolean, CastDateToTimestamp(col 12:date) -> 82:timestamp, CastDateToTimestamp(col 11:date) -> 83:timestamp) -> 84:timestamp, IfExprCondExprNull(col 85:boolean, col 86:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 85:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 86:int) -> 87:int, IfExprNullCondExpr(col 88:boolean, null, col 89:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 88:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 89:int) -> 90:int, IfExprLongScalarLongScalar(col 92:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 91:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 91:int) -> 92:boolean) -> 91:date Statistics: Num rows: 101 Data size: 78500 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -884,7 +884,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, bigint, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, 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, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, 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)] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/vector_case_when_2.q.out ql/src/test/results/clientpositive/vector_case_when_2.q.out index 784abdd..d288cfce 100644 --- ql/src/test/results/clientpositive/vector_case_when_2.q.out +++ ql/src/test/results/clientpositive/vector_case_when_2.q.out @@ -134,21 +134,44 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [1, 3, 9, 10, 11, 8, 12, 7, 6, 17, 2] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 10:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 11:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 7:int) -> 8:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 12:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 5:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 5:boolean, col 6:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 6:boolean) -> 13:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 5:int) -> 6:int, IfExprLongColumnLongColumn(col 5:boolean, col 13:date, col 16:date)(children: DoubleColGreaterDoubleScalar(col 15:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 14:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 14:double) -> 15:double) -> 5:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 13:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 16:date) -> 17:date Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ + Reduce Sink Vectorization: + className: VectorReduceSinkOperator + native: false + nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true + nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) + Execution mode: vectorized Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - notVectorizedReason: SELECT operator: Unexpected hive type name void - vectorized: false + allNative: false + usesVectorUDFAdaptor: true + vectorized: true + rowBatchContext: + dataColumnCount: 4 + includeColumns: [0, 1, 2, 3] + dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, bigint, double, double, bigint, bigint] Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true @@ -374,44 +397,21 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE - TableScan Vectorization: - native: true - vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 - Select Vectorization: - className: VectorSelectOperator - native: true - projectedOutputColumnNums: [1, 3, 10, 12, 13, 14, 11, 7, 16, 23, 2] - selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 9:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 9:string) -> 10:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 12:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprColumnNull(col 8:boolean, col 9:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean, ConstantVectorExpression(val Early 2010s) -> 9:string) -> 11:string) -> 12:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprNullNull(null, null) -> 11:string) -> 13:string) -> 11:string) -> 13:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 7:int) -> 14:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 11:string, IfExprNullColumn(col 5:boolean, null, col 6)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 5:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, IfExprColumnNull(col 17:boolean, col 15:int, null)(children: ColAndCol(col 15:boolean, col 16:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 16:boolean) -> 17:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 15:int) -> 16:int, IfExprLongColumnLongColumn(col 20:boolean, col 21:date, col 22:date)(children: DoubleColGreaterDoubleScalar(col 19:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 18:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 18:double) -> 19:double) -> 20:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 21:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 22:date) -> 23:date Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ - Reduce Sink Vectorization: - className: VectorReduceSinkOperator - native: false - nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) - Execution mode: vectorized Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true - inputFormatFeatureSupport: [DECIMAL_64] - featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - allNative: false - usesVectorUDFAdaptor: true - vectorized: true - rowBatchContext: - dataColumnCount: 4 - includeColumns: [0, 1, 2, 3] - dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp - partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + notVectorizedReason: SELECT operator: Unsupported type timestamp for cast to String + vectorized: false Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true @@ -637,44 +637,21 @@ STAGE PLANS: TableScan alias: timestamps Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE - TableScan Vectorization: - native: true - vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 - Select Vectorization: - className: VectorSelectOperator - native: true - projectedOutputColumnNums: [1, 3, 15, 26, 36, 40, 42, 44, 46, 53, 2] - selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 11:boolean, col 16:stringcol 25:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 11:boolean, ConstantVectorExpression(val Old) -> 16:string, IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 24:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 17:boolean, ConstantVectorExpression(val Early 2000s) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 23:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 19:boolean, ConstantVectorExpression(val Late 2000s) -> 20:string, IfExprColumnNull(col 21:boolean, col 22:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 21:boolean, ConstantVectorExpression(val Early 2010s) -> 22:string) -> 23:string) -> 24:string) -> 25:string) -> 26:string, IfExprColumnCondExpr(col 27:boolean, col 28:stringcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 27:boolean, ConstantVectorExpression(val Old) -> 28:string, IfExprColumnCondExpr(col 29:boolean, col 30:stringcol 34:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 29:boolean, ConstantVectorExpression(val Early 2000s) -> 30:string, IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 33:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 31:boolean, ConstantVectorExpression(val Late 2000s) -> 32:string, IfExprNullNull(null, null) -> 33:string) -> 34:string) -> 35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 39:int) -> 40:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 42:string, IfExprNullCondExpr(col 41:boolean, null, col 43:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 41:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 43:int) -> 44:int, IfExprCondExprNull(col 47:boolean, col 45:int, null)(children: ColAndCol(col 45:boolean, col 46:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 45:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 46:boolean) -> 47:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: DoubleColGreaterDoubleScalar(col 49:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 48:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 48:double) -> 49:double) -> 50:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 51:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 52:date) -> 53:date Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) sort order: +++ - Reduce Sink Vectorization: - className: VectorReduceSinkOperator - native: false - nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) - Execution mode: vectorized Map Vectorization: enabled: true enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true - inputFormatFeatureSupport: [DECIMAL_64] - featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat - allNative: false - usesVectorUDFAdaptor: true - vectorized: true - rowBatchContext: - dataColumnCount: 4 - includeColumns: [0, 1, 2, 3] - dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp - 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, string, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + notVectorizedReason: SELECT operator: Unsupported type timestamp for cast to String + vectorized: false Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true diff --git ql/src/test/results/clientpositive/vector_when_case_null.q.out ql/src/test/results/clientpositive/vector_when_case_null.q.out index 6b374f1..4cab1b1 100644 --- ql/src/test/results/clientpositive/vector_when_case_null.q.out +++ ql/src/test/results/clientpositive/vector_when_case_null.q.out @@ -49,13 +49,13 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7] - selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 6:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnNull(col 4:boolean, col 5:int, null)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int) -> 6:int) -> 7:int + projectedOutputColumnNums: [0, 8] + selectExpressions: IfExprColumnCondExpr(col 1:boolean, col 3:intcol 7:int)(children: col 1:boolean, ConstantVectorExpression(val 1) -> 3:int, IfExprColumnCondExpr(col 4:boolean, col 5:intcol 6:bigint)(children: NotCol(col 1:boolean) -> 4:boolean, ConstantVectorExpression(val 0) -> 5:int, ConstantVectorExpression(val null) -> 6:bigint) -> 7:int) -> 8:int Statistics: Num rows: 5 Data size: 452 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(_col1) Group By Vectorization: - aggregators: VectorUDAFCount(col 7:int) -> bigint + aggregators: VectorUDAFCount(col 8:int) -> bigint className: VectorGroupByOperator groupByMode: HASH keyExpressions: col 0:string diff --git ql/src/test/results/clientpositive/vectorized_case.q.out ql/src/test/results/clientpositive/vectorized_case.q.out index db20aca..c20e5ea 100644 --- ql/src/test/results/clientpositive/vectorized_case.q.out +++ ql/src/test/results/clientpositive/vectorized_case.q.out @@ -220,8 +220,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 18, 24] - selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnNull(col 15:boolean, col 16:string, null)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string) -> 17:string) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 23:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 19:boolean, ConstantVectorExpression(val a) -> 20:string, IfExprNullColumn(col 21:boolean, null, col 22)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 21:boolean, ConstantVectorExpression(val c) -> 22:string) -> 23:string) -> 24:string + projectedOutputColumnNums: [1, 19, 26] + selectExpressions: IfExprColumnCondExpr(col 13:boolean, col 14:stringcol 18:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 13:boolean, ConstantVectorExpression(val a) -> 14:string, IfExprColumnCondExpr(col 15:boolean, col 16:stringcol 17:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 15:boolean, ConstantVectorExpression(val b) -> 16:string, ConstantVectorExpression(val null) -> 17:string) -> 18:string) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 25:string)(children: LongColEqualLongScalar(col 1:smallint, val 418) -> 20:boolean, ConstantVectorExpression(val a) -> 21:string, IfExprCondExprColumn(col 22:boolean, col 23:string, col 24:string)(children: LongColEqualLongScalar(col 1:smallint, val 12205) -> 22:boolean, ConstantVectorExpression(val null) -> 23:string, ConstantVectorExpression(val c) -> 24:string) -> 25:string) -> 26:string Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -248,7 +248,7 @@ STAGE PLANS: includeColumns: [1] dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, string, string, bigint, string, bigint, string, string, string] + scratchColumnTypeNames: [bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, string, string, string] Stage: Stage-0 Fetch Operator @@ -627,8 +627,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(1,0)/DECIMAL_64)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 7:decimal(11,0)col 10:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConstantVectorExpression(val 1) -> 7:decimal(11,0), ConvertDecimal64ToDecimal(col 8:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 2, decimalVal 2) -> 8:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -655,7 +655,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(1,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -708,8 +708,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [8] - selectExpressions: IfExprDecimal64ColumnDecimal64Scalar(col 6:boolean, col 7:decimal(11,0)/DECIMAL_64, decimal64Val 2, decimalVal 2)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64 + projectedOutputColumnNums: [9] + selectExpressions: IfExprDecimalColumnColumn(col 6:boolean, col 10:decimal(11,0)col 8:decimal(11,0))(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 6:boolean, ConvertDecimal64ToDecimal(col 7:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) -> 7:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0), ConstantVectorExpression(val 2) -> 8:decimal(11,0)) -> 9:decimal(11,0) Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -736,7 +736,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:decimal(10,0)/DECIMAL_64, attr:decimal(10,0)/DECIMAL_64 partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(1,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] Stage: Stage-0 Fetch Operator @@ -888,8 +888,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprNullCondExpr(col 3:boolean, null, col 4:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 2) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, ConstantVectorExpression(val null) -> 4:bigint, LongColAddLongScalar(col 1:bigint, val 2) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -916,7 +916,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator @@ -969,8 +969,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [5] - selectExpressions: IfExprCondExprNull(col 3:boolean, col 4:bigint, null)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint) -> 5:bigint + projectedOutputColumnNums: [6] + selectExpressions: IfExprCondExprCondExpr(col 3:boolean, col 4:bigintcol 5:bigint)(children: LongColEqualLongScalar(col 0:bigint, val 1) -> 3:boolean, LongColAddLongScalar(col 1:bigint, val 1) -> 4:bigint, ConstantVectorExpression(val null) -> 5:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -997,7 +997,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator