diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExpandDistinctAggregatesRule.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExpandDistinctAggregatesRule.java index c7bb23d7d8..103d5e157e 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExpandDistinctAggregatesRule.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExpandDistinctAggregatesRule.java @@ -250,8 +250,10 @@ public RexNode apply(RelDataTypeField input) { originalInputRefs.get(pos)); condition = rexBuilder.makeCall(SqlStdOperatorTable.AND, condition, notNull); } + RexNode caseExpr1 = rexBuilder.makeExactLiteral(BigDecimal.ONE); + RexNode caseExpr2 = rexBuilder.makeNullLiteral(caseExpr1.getType()); RexNode when = rexBuilder.makeCall(SqlStdOperatorTable.CASE, condition, - rexBuilder.makeExactLiteral(BigDecimal.ONE), rexBuilder.constantNull()); + caseExpr1, caseExpr2); gbChildProjLst.add(when); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java index 89fad04d26..100ee0b2d2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java @@ -571,22 +571,12 @@ private RexNode handleExplicitCast(ExprNodeGenericFuncDesc func, List c * If a CASE has branches with string/int/boolean branch types; there is no common type. */ private List adjustCaseBranchTypes(List nodes, RelDataType retType) { - List branchTypes = new ArrayList<>(); - for (int i = 0; i < nodes.size(); i++) { - if (i % 2 == 1 || i == nodes.size() - 1) { - branchTypes.add(nodes.get(i).getType()); - } - } - RelDataType commonType = cluster.getTypeFactory().leastRestrictive(branchTypes); - if (commonType != null) { - // conversion is possible; not changes are neccessary - return nodes; - } List newNodes = new ArrayList<>(); for (int i = 0; i < nodes.size(); i++) { RexNode node = nodes.get(i); - if (i % 2 == 1 || i == nodes.size() - 1) { - newNodes.add(cluster.getRexBuilder().makeCast(retType, node)); + if ((i % 2 == 1 || i == nodes.size() - 1) + && !node.getType().getSqlTypeName().equals(retType.getSqlTypeName())) { + newNodes.add(cluster.getRexBuilder().makeCast(retType, node)); } else { newNodes.add(node); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java index 7e804e3c2d..382c286aaa 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java @@ -1274,6 +1274,40 @@ protected ExprNodeDesc getXpathOrFuncExprNodeDesc(ASTNode expr, children); } + // introduce cast for expressions which are of different type than parent expr's type + // this is done so that vectorization is able to vectorize appropriately + if (genericUDF instanceof GenericUDFWhen && desc instanceof ExprNodeGenericFuncDesc) { + String castTypeName = desc.getTypeInfo().getTypeName(); + if (desc.getTypeInfo() instanceof DecimalTypeInfo) { + castTypeName = serdeConstants.DECIMAL_TYPE_NAME; + } + FunctionInfo castFun = FunctionRegistry.getFunctionInfo(castTypeName); + + String whenTypeName = desc.getTypeInfo().getTypeName(); + List updatedChildren = new ArrayList<>(); + if (castFun != null) { + GenericUDF castUDF = castFun.getGenericUDF(); + if (desc.getTypeInfo() instanceof DecimalTypeInfo || desc + .getTypeInfo() instanceof VarcharTypeInfo || desc + .getTypeInfo() instanceof CharTypeInfo || desc + .getTypeInfo() instanceof TimestampLocalTZTypeInfo) { + ((SettableUDF) castUDF).setTypeInfo(desc.getTypeInfo()); + } + for (int i = 0; i < desc.getChildren().size(); i++) { + ExprNodeDesc child = children.get(i); + ExprNodeDesc newChild = child; + if ((i % 2 == 1 || i == desc.getChildren().size() - 1) && !whenTypeName + .equals(child.getTypeInfo().getTypeName())) { + newChild = ExprNodeGenericFuncDesc + .newInstance(castUDF, whenTypeName, Arrays.asList(child)); + + } + updatedChildren.add(newChild); + } + desc = ExprNodeGenericFuncDesc.newInstance(genericUDF, funcText, updatedChildren); + } + } + // If the function is deterministic and the children are constants, // we try to fold the expression to remove e.g. cast on constant if (ctx.isFoldExpr() && desc instanceof ExprNodeGenericFuncDesc && diff --git a/ql/src/test/queries/clientpositive/vector_case_when_2.q b/ql/src/test/queries/clientpositive/vector_case_when_2.q index 6854fc00cd..5b6369a9cc 100644 --- a/ql/src/test/queries/clientpositive/vector_case_when_2.q +++ b/ql/src/test/queries/clientpositive/vector_case_when_2.q @@ -205,4 +205,34 @@ SELECT IF(cast(ctimestamp1 as double) % 500 > 100, DATE_ADD(cdate, 1), DATE_ADD(cdate, 365)) AS Field_5 FROM timestamps ORDER BY ctimestamp1, stimestamp1, ctimestamp2; - \ No newline at end of file + + +create temporary table foo(q548284 int); +insert into foo values(1),(2),(3),(4),(5),(6); + +set hive.cbo.enable=false; +explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1; +select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1; + +explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1; +select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1; + +set hive.cbo.enable=true; +explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1; +select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1; + +explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1; +select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1; + diff --git a/ql/src/test/results/clientpositive/deleteAnalyze.q.out b/ql/src/test/results/clientpositive/deleteAnalyze.q.out index a26c04fd47..448ebc0748 100644 --- a/ql/src/test/results/clientpositive/deleteAnalyze.q.out +++ b/ql/src/test/results/clientpositive/deleteAnalyze.q.out @@ -195,7 +195,7 @@ STAGE PLANS: predicate: ((id = 2) and item is not null) (type: boolean) Statistics: Num rows: 1 Data size: 312 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: item (type: string), CASE WHEN (amount is not null) THEN (amount) ELSE (0) END (type: decimal(13,3)), CASE WHEN (sales_tax is not null) THEN (sales_tax) ELSE (0) END (type: decimal(13,3)) + expressions: item (type: string), CASE WHEN (amount is not null) THEN (amount) ELSE (CAST( 0 AS decimal(10,3))) END (type: decimal(10,3)), CASE WHEN (sales_tax is not null) THEN (sales_tax) ELSE (CAST( 0 AS decimal(10,3))) END (type: decimal(10,3)) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator @@ -203,7 +203,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: decimal(13,3)), _col2 (type: decimal(13,3)) + value expressions: _col1 (type: decimal(10,3)), _col2 (type: decimal(10,3)) Reduce Operator Tree: Join Operator condition map: @@ -214,7 +214,7 @@ STAGE PLANS: outputColumnNames: _col0, _col3, _col4 Statistics: Num rows: 1 Data size: 228 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: int), _col3 (type: decimal(13,3)), _col4 (type: decimal(13,3)) + expressions: _col0 (type: int), _col3 (type: decimal(10,3)), _col4 (type: decimal(10,3)) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 228 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator diff --git a/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out b/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out index 5301644074..162b720c89 100644 --- a/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out +++ b/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out @@ -652,7 +652,7 @@ STAGE PLANS: properties: druid.fieldNames language,a,b druid.fieldTypes string,double,decimal(19,0) - druid.query.json {"queryType":"groupBy","dataSource":"default.druid_kafka_test","granularity":"all","dimensions":[{"type":"default","dimension":"language","outputName":"language","outputType":"STRING"}],"limitSpec":{"type":"default","columns":[{"dimension":"a","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"longSum","name":"$f1","fieldName":"added"},{"type":"longSum","name":"$f2","fieldName":"deleted"}],"postAggregations":[{"type":"expression","name":"a","expression":"(CAST(\"$f1\", 'DOUBLE') / CAST(\"$f2\", 'DOUBLE'))"},{"type":"expression","name":"b","expression":"case_searched((\"$f2\" == 0),1,\"$f2\")"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]} + druid.query.json {"queryType":"groupBy","dataSource":"default.druid_kafka_test","granularity":"all","dimensions":[{"type":"default","dimension":"language","outputName":"language","outputType":"STRING"}],"limitSpec":{"type":"default","columns":[{"dimension":"a","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"longSum","name":"$f1","fieldName":"added"},{"type":"longSum","name":"$f2","fieldName":"deleted"}],"postAggregations":[{"type":"expression","name":"a","expression":"(CAST(\"$f1\", 'DOUBLE') / CAST(\"$f2\", 'DOUBLE'))"},{"type":"expression","name":"b","expression":"case_searched((\"$f2\" == 0),1,CAST(\"$f2\", 'DOUBLE'))"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]} druid.query.type groupBy Select Operator expressions: language (type: string), a (type: double), b (type: decimal(19,0)) diff --git a/ql/src/test/results/clientpositive/infer_join_preds.q.out b/ql/src/test/results/clientpositive/infer_join_preds.q.out index 11dbfa1a67..fe3ccfe001 100644 --- a/ql/src/test/results/clientpositive/infer_join_preds.q.out +++ b/ql/src/test/results/clientpositive/infer_join_preds.q.out @@ -1187,7 +1187,7 @@ STAGE PLANS: predicate: prid is not null (type: boolean) Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: idp_warehouse_id (type: bigint), prid (type: bigint), concat(CAST( CASE WHEN (prid is null) THEN (1) ELSE (prid) END AS STRING), ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) + expressions: idp_warehouse_id (type: bigint), prid (type: bigint), concat(CAST( CASE WHEN (prid is null) THEN (1L) ELSE (prid) END AS STRING), ',', CASE WHEN (prtimesheetid is null) THEN (1L) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1L) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1L) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (CAST( 1 AS decimal(38,20))) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1L) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (CAST( prmodby AS STRING)) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1L) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1L) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1L) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (CAST( user_lov1 AS STRING)) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (CAST( user_lov2 AS STRING)) END, ',', CASE WHEN (incident_id is null) THEN (1L) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1L) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1L) ELSE (odf_ss_actuals) END) (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -1246,7 +1246,7 @@ STAGE PLANS: predicate: prid is not null (type: boolean) Statistics: Num rows: 1 Data size: 776 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: prid (type: bigint), concat(CASE WHEN (length(pruid) is null) THEN ('') ELSE (pruid) END, ',', CASE WHEN (prid is null) THEN (1) ELSE (prid) END, ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) + expressions: prid (type: bigint), concat(CASE WHEN (length(pruid) is null) THEN ('') ELSE (CAST( pruid AS STRING)) END, ',', CASE WHEN (prid is null) THEN (1L) ELSE (prid) END, ',', CASE WHEN (prtimesheetid is null) THEN (1L) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1L) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1L) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (CAST( 1 AS decimal(38,20))) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1L) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (CAST( prmodby AS STRING)) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1L) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1L) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1L) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (CAST( user_lov1 AS STRING)) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (CAST( user_lov2 AS STRING)) END, ',', CASE WHEN (incident_id is null) THEN (1L) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1L) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1L) ELSE (odf_ss_actuals) END) (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 776 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator diff --git a/ql/src/test/results/clientpositive/llap/subquery_select.q.out b/ql/src/test/results/clientpositive/llap/subquery_select.q.out index 7d6f226e34..8b4af96f5d 100644 --- a/ql/src/test/results/clientpositive/llap/subquery_select.q.out +++ b/ql/src/test/results/clientpositive/llap/subquery_select.q.out @@ -3943,10 +3943,14 @@ STAGE PLANS: mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: int) + Select Operator + expressions: UDFToDouble(_col0) (type: double) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: double) Reducer 2 Execution mode: llap Reduce Operator Tree: @@ -3987,7 +3991,7 @@ STAGE PLANS: 0 1 outputColumnNames: _col1, _col2, _col3 - Statistics: Num rows: 26 Data size: 416 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 26 Data size: 520 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CASE WHEN (_col1) THEN (_col2) ELSE (_col3) END (type: double) outputColumnNames: _col0 diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out b/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out index 5323159938..db7140a93a 100644 --- a/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out +++ b/ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out @@ -209,13 +209,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 21, 26, 30, 34, 38, 42, 44, 46, 48, 50, 52, 54, 58, 61, 64, 67] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date + selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -546,13 +546,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 24, 33, 40, 44, 49, 53, 55, 57, 59, 61, 63, 65, 69, 72, 75, 78] - selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date + projectedOutputColumnNums: [4, 24, 33, 40, 44, 48, 52, 54, 56, 58, 60, 62, 64, 68, 71, 74, 77] + selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleScalar(col 45:boolean, col 47:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double) -> 48:double, IfExprDoubleColumnDoubleScalar(col 49:boolean, col 51:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 49:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 50:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 50:double) -> 51:double) -> 52:double, IfExprNullColumn(col 53:boolean, null, col 78)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 53:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 78:decimal(10,2)) -> 54:decimal(10,2), IfExprColumnNull(col 55:boolean, col 79:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 55:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 56:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 57:boolean) -> 58:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 59:boolean) -> 60:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 61:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 61:boolean) -> 62:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 63:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 63:boolean) -> 64:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 65:boolean, col 66:timestampcol 67:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 65:boolean, CastDateToTimestamp(col 12:date) -> 66:timestamp, CastDateToTimestamp(col 11:date) -> 67:timestamp) -> 68:timestamp, IfExprColumnNull(col 69:boolean, col 70:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 69:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 70:int) -> 71:int, IfExprNullColumn(col 72:boolean, null, col 73)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 72:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 73:int) -> 74:int, IfExprLongScalarLongScalar(col 76:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 75:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 75:int) -> 76:boolean) -> 77:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -580,7 +580,7 @@ STAGE PLANS: includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14] dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), l_shipdate:date, l_commitdate:date, l_receiptdate:date, l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] Stage: Stage-0 Fetch Operator @@ -883,13 +883,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 27, 39, 48, 52, 57, 62, 64, 66, 71, 76, 78, 80, 84, 87, 90, 93] - selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string) -> 46:string) -> 47:string) -> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, IfExprCondExprCondExpr(col 53:boolean, col 55:doublecol 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 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) -> 93:date + selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 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, IfExprCondExprColumn(col 53:boolean, col 55:double, col 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 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) -> 93:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out index d7a7c2f9f9..121506fe84 100644 --- a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out +++ b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out @@ -917,3 +917,511 @@ ctimestamp1 ctimestamp2 ctimestamp2_description ctimestamp2_description_2 ctimes 9209-11-11 04:08:58.223768453 9209-11-10 02:05:54.223768453 Unknown NULL NULL 9209 2018-03-08 23:04:59 8 NULL 9209-11-12 9403-01-09 18:12:33.547 9403-01-08 16:09:29.547 Unknown NULL NULL 9403 2018-03-08 23:04:59 12 NULL 9404-01-09 NULL NULL Unknown NULL NULL NULL 2018-03-08 23:04:59 NULL NULL NULL +PREHOOK: query: create temporary table foo(q548284 int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@foo +POSTHOOK: query: create temporary table foo(q548284 int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@foo +PREHOOK: query: insert into foo values(1),(2),(3),(4),(5),(6) +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +PREHOOK: Output: default@foo +POSTHOOK: query: insert into foo values(1),(2),(3),(4),(5),(6) +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +POSTHOOK: Output: default@foo +POSTHOOK: Lineage: foo.q548284 SCRIPT [] +col1 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:q548284:int, 1:ROW__ID:struct] + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 1)) THEN (0.2) WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 16] + selectExpressions: IfExprColumnCondExpr(col 2:boolean, col 3:decimal(11,1)col 15:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 1) -> 2:boolean, ConstantVectorExpression(val 0.2) -> 3:decimal(11,1), IfExprColumnCondExpr(col 4:boolean, col 5:decimal(11,1)col 14:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 2) -> 4:boolean, ConstantVectorExpression(val 0.4) -> 5:decimal(11,1), IfExprColumnCondExpr(col 6:boolean, col 7:decimal(11,1)col 13:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 3) -> 6:boolean, ConstantVectorExpression(val 0.6) -> 7:decimal(11,1), IfExprColumnCondExpr(col 8:boolean, col 9:decimal(11,1)col 12:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 4) -> 8:boolean, ConstantVectorExpression(val 0.8) -> 9:decimal(11,1), IfExprColumnNull(col 10:boolean, col 11:decimal(11,1), null)(children: LongColEqualLongScalar(col 0:int, val 5) -> 10:boolean, ConstantVectorExpression(val 1) -> 11:decimal(11,1)) -> 12:decimal(11,1)) -> 13:decimal(11,1)) -> 14:decimal(11,1)) -> 15:decimal(11,1)) -> 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + keyColumns: 0:int + 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: 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: vectorized, llap + LLAP IO: no inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + allNative: true + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + includeColumns: [0] + dataColumns: q548284:int + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1)] + 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 + reduceColumnNullOrder: z + reduceColumnSortOrder: + + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + dataColumns: KEY.reducesinkkey0:int, VALUE._col0:decimal(11,1) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1] + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Limit Vectorization: + className: VectorLimitOperator + native: true + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 0.2 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: llap + LLAP IO: no inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + notVectorizedReason: SELECT operator: Could not instantiate IfExprDecimalScalarColumn with arguments arguments: [6, 10, 9, 11], argument classes: [Integer, Integer, Integer, Integer], exception: java.lang.IllegalArgumentException: argument type mismatch stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:423), org.apache.hadoop.hive.ql.exec.vector.VectorizationContext.instantiateExpression(VectorizationContext.java:2200), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4796), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4736), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.vectorizeSelectOperator(Vectorizer.java:4718), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperator(Vectorizer.java:5322), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChild(Vectorizer.java:983), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChildren(Vectorizer.java:869), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperatorTree(Vectorizer.java:836), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.access$2400(Vectorizer.java:247), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2118), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2070), ... + vectorized: false + 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 + reduceColumnNullOrder: z + reduceColumnSortOrder: + + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + dataColumns: KEY.reducesinkkey0:int, VALUE._col0:decimal(11,1) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1] + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Limit Vectorization: + className: VectorLimitOperator + native: true + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 8.0 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:q548284:int, 1:ROW__ID:struct] + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 1)) THEN (CAST( 0.2 AS decimal(11,1))) WHEN ((q548284 = 2)) THEN (CAST( 0.4 AS decimal(11,1))) WHEN ((q548284 = 3)) THEN (CAST( 0.6 AS decimal(11,1))) WHEN ((q548284 = 4)) THEN (CAST( 0.8 AS decimal(11,1))) WHEN ((q548284 = 5)) THEN (CAST( 1 AS decimal(11,1))) ELSE (null) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 16] + selectExpressions: IfExprColumnCondExpr(col 2:boolean, col 3:decimal(11,1)col 15:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 1) -> 2:boolean, ConstantVectorExpression(val 0.2) -> 3:decimal(11,1), IfExprColumnCondExpr(col 4:boolean, col 5:decimal(11,1)col 14:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 2) -> 4:boolean, ConstantVectorExpression(val 0.4) -> 5:decimal(11,1), IfExprColumnCondExpr(col 6:boolean, col 7:decimal(11,1)col 13:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 3) -> 6:boolean, ConstantVectorExpression(val 0.6) -> 7:decimal(11,1), IfExprColumnCondExpr(col 8:boolean, col 9:decimal(11,1)col 12:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 4) -> 8:boolean, ConstantVectorExpression(val 0.8) -> 9:decimal(11,1), IfExprColumnNull(col 10:boolean, col 11:decimal(11,1), null)(children: LongColEqualLongScalar(col 0:int, val 5) -> 10:boolean, ConstantVectorExpression(val 1) -> 11:decimal(11,1)) -> 12:decimal(11,1)) -> 13:decimal(11,1)) -> 14:decimal(11,1)) -> 15:decimal(11,1)) -> 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Reduce Sink Vectorization: + className: VectorReduceSinkObjectHashOperator + keyColumns: 0:int + 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: 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: vectorized, llap + LLAP IO: no inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + allNative: true + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + includeColumns: [0] + dataColumns: q548284:int + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1)] + 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 + reduceColumnNullOrder: z + reduceColumnSortOrder: + + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + dataColumns: KEY.reducesinkkey0:int, VALUE._col0:decimal(11,1) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1] + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Limit Vectorization: + className: VectorLimitOperator + native: true + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 0.2 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: q548284 (type: int), CAST( CASE WHEN ((q548284 = 4)) THEN (CAST( 0.8 AS decimal(2,1))) WHEN ((q548284 = 5)) THEN (CAST( 1 AS decimal(2,1))) ELSE (CAST( 8 AS decimal(2,1))) END AS decimal(11,1)) (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: llap + LLAP IO: no inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + notVectorizedReason: SELECT operator: Could not instantiate IfExprDecimalScalarColumn with arguments arguments: [6, 11, 9, 12], argument classes: [Integer, Integer, Integer, Integer], exception: java.lang.IllegalArgumentException: argument type mismatch stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:423), org.apache.hadoop.hive.ql.exec.vector.VectorizationContext.instantiateExpression(VectorizationContext.java:2200), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4796), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4752), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4736), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.vectorizeSelectOperator(Vectorizer.java:4718), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperator(Vectorizer.java:5322), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChild(Vectorizer.java:983), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChildren(Vectorizer.java:869), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperatorTree(Vectorizer.java:836), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.access$2400(Vectorizer.java:247), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2118), ... + vectorized: false + 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 + reduceColumnNullOrder: z + reduceColumnSortOrder: + + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + dataColumns: KEY.reducesinkkey0:int, VALUE._col0:decimal(11,1) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 1] + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Limit Vectorization: + className: VectorLimitOperator + native: true + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 8.0 diff --git a/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out b/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out index 39c041c448..3d70e15c73 100644 --- a/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out +++ b/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out @@ -152,7 +152,7 @@ STAGE PLANS: className: VectorSelectOperator native: true projectedOutputColumnNums: [5, 2, 20] - selectExpressions: IfExprCondExprCondExpr(col 16:boolean, col 18:doublecol 19:double)(children: ColAndCol(col 13:boolean, col 15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 17:double)(children: FuncLog2LongToDouble(col 2:int) -> 17:double) -> 18:double, ConstantVectorExpression(val 0.0) -> 19:double) -> 20:double + selectExpressions: IfExprCondExprColumn(col 16:boolean, col 18:double, col 19:double)(children: ColAndCol(col 13:boolean, col 15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 17:double)(children: FuncLog2LongToDouble(col 2:int) -> 17:double) -> 18:double, ConstantVectorExpression(val 0.0) -> 19:double) -> 20:double Reduce Sink Vectorization: className: VectorReduceSinkObjectHashOperator native: true diff --git a/ql/src/test/results/clientpositive/llap/vectorization_3.q.out b/ql/src/test/results/clientpositive/llap/vectorization_3.q.out index 5fcf6d53e0..db1827dc58 100644 --- a/ql/src/test/results/clientpositive/llap/vectorization_3.q.out +++ b/ql/src/test/results/clientpositive/llap/vectorization_3.q.out @@ -162,7 +162,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) + expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Select Vectorization: className: VectorSelectOperator diff --git a/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out b/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out index 900cfa393a..7e74baf1cd 100644 --- a/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out +++ b/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out @@ -2586,7 +2586,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 1251 Data size: 57520 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END) (type: double), (2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), _col4 (type: bigint), ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D) (type: double), ((- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) * ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D)) (type: double), _col5 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / _col3) (type: double), (_col0 - (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END))) (type: double), power(((_col1 - ((_col2 * _col2) / _col3)) / _col3), 0.5) (type: double), (_col0 + ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (_col0 * 762.0D) (type: double), _col2 (type: double), (-863.257D % (_col0 * 762.0D)) (type: double) + expressions: _col0 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END) (type: double), (2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), _col4 (type: bigint), ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D) (type: double), ((- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) * ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (UDFToLong(null)) ELSE ((_col3 - 1)) END)) + -5638.15D)) (type: double), _col5 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / _col3) (type: double), (_col0 - (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END))) (type: double), power(((_col1 - ((_col2 * _col2) / _col3)) / _col3), 0.5) (type: double), (_col0 + ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (_col0 * 762.0D) (type: double), _col2 (type: double), (-863.257D % (_col0 * 762.0D)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 Select Vectorization: className: VectorSelectOperator diff --git a/ql/src/test/results/clientpositive/llap/vectorized_case.q.out b/ql/src/test/results/clientpositive/llap/vectorized_case.q.out index 90cff5b44f..c1dd844b5e 100644 --- a/ql/src/test/results/clientpositive/llap/vectorized_case.q.out +++ b/ql/src/test/results/clientpositive/llap/vectorized_case.q.out @@ -695,13 +695,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN (1) ELSE ((attr + 2)) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN (CAST( 1 AS decimal(11,0))) ELSE ((attr + 2)) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + projectedOutputColumnNums: [8] + selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(11,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 Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -729,7 +729,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(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator @@ -780,13 +780,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (2) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (CAST( 2 AS decimal(11,0))) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + 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 Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -814,7 +814,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(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator diff --git a/ql/src/test/results/clientpositive/parquet_vectorization_3.q.out b/ql/src/test/results/clientpositive/parquet_vectorization_3.q.out index ce8b80781b..90d67241db 100644 --- a/ql/src/test/results/clientpositive/parquet_vectorization_3.q.out +++ b/ql/src/test/results/clientpositive/parquet_vectorization_3.q.out @@ -130,7 +130,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) + expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 1 Data size: 128 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query40.q.out b/ql/src/test/results/clientpositive/perf/spark/query40.q.out index 01b8ed18f8..2e32d5dd30 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query40.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query40.q.out @@ -233,7 +233,7 @@ STAGE PLANS: 1 Map 9 Statistics: Num rows: 421645953 Data size: 57099332415 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col14 (type: string), _col9 (type: string), CASE WHEN (_col11) THEN ((_col4 - CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0) END)) ELSE (0) END (type: decimal(13,2)), CASE WHEN (_col12) THEN ((_col4 - CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0) END)) ELSE (0) END (type: decimal(13,2)) + expressions: _col14 (type: string), _col9 (type: string), CASE WHEN (_col11) THEN ((_col4 - CASE WHEN (_col7 is not null) THEN (_col7) ELSE (CAST( 0 AS decimal(7,2))) END)) ELSE (CAST( 0 AS decimal(8,2))) END (type: decimal(8,2)), CASE WHEN (_col12) THEN ((_col4 - CASE WHEN (_col7 is not null) THEN (_col7) ELSE (CAST( 0 AS decimal(7,2))) END)) ELSE (CAST( 0 AS decimal(8,2))) END (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 421645953 Data size: 57099332415 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -249,7 +249,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string) Statistics: Num rows: 421645953 Data size: 57099332415 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col2 (type: decimal(23,2)), _col3 (type: decimal(23,2)) + value expressions: _col2 (type: decimal(18,2)), _col3 (type: decimal(18,2)) Reducer 4 Execution mode: vectorized Reduce Operator Tree: @@ -264,12 +264,12 @@ STAGE PLANS: sort order: ++ Statistics: Num rows: 210822976 Data size: 28549666139 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col2 (type: decimal(23,2)), _col3 (type: decimal(23,2)) + value expressions: _col2 (type: decimal(18,2)), _col3 (type: decimal(18,2)) Reducer 5 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(23,2)), VALUE._col1 (type: decimal(23,2)) + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(18,2)), VALUE._col1 (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 210822976 Data size: 28549666139 Basic stats: COMPLETE Column stats: NONE Limit diff --git a/ql/src/test/results/clientpositive/perf/spark/query49.q.out b/ql/src/test/results/clientpositive/perf/spark/query49.q.out index 119e84f07b..f04ad2fbd0 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query49.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query49.q.out @@ -304,7 +304,7 @@ STAGE PLANS: predicate: ((ws_net_paid > 0) and (ws_net_profit > 1) and (ws_quantity > 0) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null) (type: boolean) Statistics: Num rows: 5333432 Data size: 725192506 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ws_sold_date_sk (type: int), ws_item_sk (type: int), ws_order_number (type: int), CASE WHEN (ws_quantity is not null) THEN (ws_quantity) ELSE (0) END (type: int), CASE WHEN (ws_net_paid is not null) THEN (ws_net_paid) ELSE (0) END (type: decimal(12,2)) + expressions: ws_sold_date_sk (type: int), ws_item_sk (type: int), ws_order_number (type: int), CASE WHEN (ws_quantity is not null) THEN (ws_quantity) ELSE (0) END (type: int), CASE WHEN (ws_net_paid is not null) THEN (ws_net_paid) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 5333432 Data size: 725192506 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -312,7 +312,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 5333432 Data size: 725192506 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)) Execution mode: vectorized Map 10 Map Operator Tree: @@ -343,7 +343,7 @@ STAGE PLANS: predicate: ((wr_return_amt > 10000) and wr_item_sk is not null and wr_order_number is not null) (type: boolean) Statistics: Num rows: 4799489 Data size: 441731394 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: wr_item_sk (type: int), wr_order_number (type: int), CASE WHEN (wr_return_quantity is not null) THEN (wr_return_quantity) ELSE (0) END (type: int), CASE WHEN (wr_return_amt is not null) THEN (wr_return_amt) ELSE (0) END (type: decimal(12,2)) + expressions: wr_item_sk (type: int), wr_order_number (type: int), CASE WHEN (wr_return_quantity is not null) THEN (wr_return_quantity) ELSE (0) END (type: int), CASE WHEN (wr_return_amt is not null) THEN (wr_return_amt) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 4799489 Data size: 441731394 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -351,7 +351,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col0 (type: int), _col1 (type: int) Statistics: Num rows: 4799489 Data size: 441731394 Basic stats: COMPLETE Column stats: NONE - value expressions: _col2 (type: int), _col3 (type: decimal(12,2)) + value expressions: _col2 (type: int), _col3 (type: decimal(7,2)) Execution mode: vectorized Map 12 Map Operator Tree: @@ -363,7 +363,7 @@ STAGE PLANS: predicate: ((cs_net_paid > 0) and (cs_net_profit > 1) and (cs_quantity > 0) and cs_item_sk is not null and cs_order_number is not null and cs_sold_date_sk is not null) (type: boolean) Statistics: Num rows: 10666290 Data size: 1444429931 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: cs_sold_date_sk (type: int), cs_item_sk (type: int), cs_order_number (type: int), CASE WHEN (cs_quantity is not null) THEN (cs_quantity) ELSE (0) END (type: int), CASE WHEN (cs_net_paid is not null) THEN (cs_net_paid) ELSE (0) END (type: decimal(12,2)) + expressions: cs_sold_date_sk (type: int), cs_item_sk (type: int), cs_order_number (type: int), CASE WHEN (cs_quantity is not null) THEN (cs_quantity) ELSE (0) END (type: int), CASE WHEN (cs_net_paid is not null) THEN (cs_net_paid) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 10666290 Data size: 1444429931 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -371,7 +371,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 10666290 Data size: 1444429931 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)) Execution mode: vectorized Map 19 Map Operator Tree: @@ -383,7 +383,7 @@ STAGE PLANS: predicate: ((cr_return_amount > 10000) and cr_item_sk is not null and cr_order_number is not null) (type: boolean) Statistics: Num rows: 9599627 Data size: 1019078226 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: cr_item_sk (type: int), cr_order_number (type: int), CASE WHEN (cr_return_quantity is not null) THEN (cr_return_quantity) ELSE (0) END (type: int), CASE WHEN (cr_return_amount is not null) THEN (cr_return_amount) ELSE (0) END (type: decimal(12,2)) + expressions: cr_item_sk (type: int), cr_order_number (type: int), CASE WHEN (cr_return_quantity is not null) THEN (cr_return_quantity) ELSE (0) END (type: int), CASE WHEN (cr_return_amount is not null) THEN (cr_return_amount) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 9599627 Data size: 1019078226 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -391,7 +391,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col0 (type: int), _col1 (type: int) Statistics: Num rows: 9599627 Data size: 1019078226 Basic stats: COMPLETE Column stats: NONE - value expressions: _col2 (type: int), _col3 (type: decimal(12,2)) + value expressions: _col2 (type: int), _col3 (type: decimal(7,2)) Execution mode: vectorized Map 20 Map Operator Tree: @@ -403,7 +403,7 @@ STAGE PLANS: predicate: ((ss_net_paid > 0) and (ss_net_profit > 1) and (ss_quantity > 0) and ss_item_sk is not null and ss_sold_date_sk is not null and ss_ticket_number is not null) (type: boolean) Statistics: Num rows: 21333171 Data size: 1882018537 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int), CASE WHEN (ss_quantity is not null) THEN (ss_quantity) ELSE (0) END (type: int), CASE WHEN (ss_net_paid is not null) THEN (ss_net_paid) ELSE (0) END (type: decimal(12,2)) + expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int), CASE WHEN (ss_quantity is not null) THEN (ss_quantity) ELSE (0) END (type: int), CASE WHEN (ss_net_paid is not null) THEN (ss_net_paid) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 21333171 Data size: 1882018537 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -411,7 +411,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 21333171 Data size: 1882018537 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)) Execution mode: vectorized Map 27 Map Operator Tree: @@ -423,7 +423,7 @@ STAGE PLANS: predicate: ((sr_return_amt > 10000) and sr_item_sk is not null and sr_ticket_number is not null) (type: boolean) Statistics: Num rows: 19197050 Data size: 1487398277 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: sr_item_sk (type: int), sr_ticket_number (type: int), CASE WHEN (sr_return_quantity is not null) THEN (sr_return_quantity) ELSE (0) END (type: int), CASE WHEN (sr_return_amt is not null) THEN (sr_return_amt) ELSE (0) END (type: decimal(12,2)) + expressions: sr_item_sk (type: int), sr_ticket_number (type: int), CASE WHEN (sr_return_quantity is not null) THEN (sr_return_quantity) ELSE (0) END (type: int), CASE WHEN (sr_return_amt is not null) THEN (sr_return_amt) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 19197050 Data size: 1487398277 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -431,7 +431,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col0 (type: int), _col1 (type: int) Statistics: Num rows: 19197050 Data size: 1487398277 Basic stats: COMPLETE Column stats: NONE - value expressions: _col2 (type: int), _col3 (type: decimal(12,2)) + value expressions: _col2 (type: int), _col3 (type: decimal(7,2)) Execution mode: vectorized Reducer 13 Reduce Operator Tree: @@ -448,7 +448,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col1 (type: int), _col2 (type: int) Statistics: Num rows: 11732919 Data size: 1588872958 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col3 (type: int), _col4 (type: decimal(7,2)) Reducer 14 Reduce Operator Tree: Join Operator @@ -471,7 +471,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 12906211 Data size: 1747760291 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 15 Execution mode: vectorized Reduce Operator Tree: @@ -486,19 +486,19 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 16 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(22,2)), VALUE._col4 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(17,2)), VALUE._col4 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE PTF Operator Function definitions: Input definition input alias: ptf_0 - output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(22,2), _col4: decimal(22,2) + output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(17,2), _col4: decimal(17,2) type: WINDOWING Windowing table definition input alias: ptf_1 @@ -516,7 +516,7 @@ STAGE PLANS: isPivotResult: true Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) outputColumnNames: rank_window_0, _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -524,12 +524,12 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE - value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 17 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(22,2)), VALUE._col5 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(17,2)), VALUE._col5 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 6453105 Data size: 873880077 Basic stats: COMPLETE Column stats: NONE PTF Operator @@ -585,7 +585,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col1 (type: int), _col2 (type: int) Statistics: Num rows: 5866775 Data size: 797711773 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col3 (type: int), _col4 (type: decimal(7,2)) Reducer 21 Reduce Operator Tree: Join Operator @@ -601,7 +601,7 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: _col1 (type: int), _col2 (type: int) Statistics: Num rows: 23466488 Data size: 2070220435 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col4 (type: decimal(12,2)) + value expressions: _col3 (type: int), _col4 (type: decimal(7,2)) Reducer 22 Reduce Operator Tree: Join Operator @@ -624,7 +624,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 25813137 Data size: 2277242527 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 23 Execution mode: vectorized Reduce Operator Tree: @@ -639,19 +639,19 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 24 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(22,2)), VALUE._col4 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(17,2)), VALUE._col4 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE PTF Operator Function definitions: Input definition input alias: ptf_0 - output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(22,2), _col4: decimal(22,2) + output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(17,2), _col4: decimal(17,2) type: WINDOWING Windowing table definition input alias: ptf_1 @@ -669,7 +669,7 @@ STAGE PLANS: isPivotResult: true Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) outputColumnNames: rank_window_0, _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -677,12 +677,12 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE - value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 25 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(22,2)), VALUE._col5 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(17,2)), VALUE._col5 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 12906568 Data size: 1138621219 Basic stats: COMPLETE Column stats: NONE PTF Operator @@ -746,7 +746,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 6453452 Data size: 877482969 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 4 Execution mode: vectorized Reduce Operator Tree: @@ -761,19 +761,19 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 5 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(22,2)), VALUE._col4 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: decimal(17,2)), VALUE._col4 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE PTF Operator Function definitions: Input definition input alias: ptf_0 - output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(22,2), _col4: decimal(22,2) + output shape: _col0: int, _col1: bigint, _col2: bigint, _col3: decimal(17,2), _col4: decimal(17,2) type: WINDOWING Windowing table definition input alias: ptf_1 @@ -791,7 +791,7 @@ STAGE PLANS: isPivotResult: true Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) outputColumnNames: rank_window_0, _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -799,12 +799,12 @@ STAGE PLANS: sort order: ++ Map-reduce partition columns: 0 (type: int) Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE - value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(22,2)), _col4 (type: decimal(22,2)) + value expressions: rank_window_0 (type: int), _col0 (type: int), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 6 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(22,2)), VALUE._col5 (type: decimal(22,2)) + expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: decimal(17,2)), VALUE._col5 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 3226726 Data size: 438741484 Basic stats: COMPLETE Column stats: NONE PTF Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query66.q.out b/ql/src/test/results/clientpositive/perf/spark/query66.q.out index 7601a39801..7ab8705d58 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query66.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query66.q.out @@ -741,7 +741,7 @@ STAGE PLANS: 1 Map 16 Statistics: Num rows: 421645953 Data size: 57099332415 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col22 (type: string), _col23 (type: int), _col24 (type: string), _col25 (type: string), _col26 (type: string), _col27 (type: string), CASE WHEN (_col9) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col9) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col5) ELSE (0) END (type: decimal(18,2)) + expressions: _col22 (type: string), _col23 (type: int), _col24 (type: string), _col25 (type: string), _col26 (type: string), _col27 (type: string), CASE WHEN (_col9) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col9) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29 Statistics: Num rows: 421645953 Data size: 57099332415 Basic stats: PARTIAL Column stats: NONE Group By Operator @@ -807,7 +807,7 @@ STAGE PLANS: 1 Map 9 Statistics: Num rows: 210834322 Data size: 28667370686 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col22 (type: string), _col23 (type: int), _col24 (type: string), _col25 (type: string), _col26 (type: string), _col27 (type: string), CASE WHEN (_col9) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col4) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col9) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col5) ELSE (0) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col5) ELSE (0) END (type: decimal(18,2)) + expressions: _col22 (type: string), _col23 (type: int), _col24 (type: string), _col25 (type: string), _col26 (type: string), _col27 (type: string), CASE WHEN (_col9) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col4) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col9) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col10) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col11) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col12) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col13) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col14) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col15) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col16) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col17) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col18) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col19) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)), CASE WHEN (_col20) THEN (_col5) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29 Statistics: Num rows: 210834322 Data size: 28667370686 Basic stats: PARTIAL Column stats: NONE Group By Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query67.q.out b/ql/src/test/results/clientpositive/perf/spark/query67.q.out index d31acb2045..213b448ea8 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query67.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query67.q.out @@ -145,7 +145,7 @@ STAGE PLANS: predicate: (ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_store_sk (type: int), CASE WHEN ((ss_sales_price is not null and CAST( ss_quantity AS decimal(10,0)) is not null)) THEN ((ss_sales_price * CAST( ss_quantity AS decimal(10,0)))) ELSE (0) END (type: decimal(18,2)) + expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_store_sk (type: int), CASE WHEN ((ss_sales_price is not null and CAST( ss_quantity AS decimal(10,0)) is not null)) THEN ((ss_sales_price * CAST( ss_quantity AS decimal(10,0)))) ELSE (CAST( 0 AS decimal(18,2))) END (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query75.q.out b/ql/src/test/results/clientpositive/perf/spark/query75.q.out index 1141cb3e77..cb3a54152e 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query75.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query75.q.out @@ -546,7 +546,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 766650239 Data size: 67634106676 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 766650239 Data size: 67634106676 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -616,7 +616,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 191667562 Data size: 26061245514 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 191667562 Data size: 26061245514 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -670,7 +670,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 383314495 Data size: 51908482889 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 383314495 Data size: 51908482889 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -779,7 +779,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 766650239 Data size: 67634106676 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 766650239 Data size: 67634106676 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -801,7 +801,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 383314495 Data size: 51908482889 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 383314495 Data size: 51908482889 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -855,7 +855,7 @@ STAGE PLANS: outputColumnNames: _col3, _col4, _col6, _col7, _col8, _col9, _col13, _col14 Statistics: Num rows: 191667562 Data size: 26061245514 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (0) END) (type: decimal(8,2)) + expressions: _col6 (type: int), _col7 (type: int), _col8 (type: int), _col9 (type: int), (_col3 - CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: int), (_col4 - CASE WHEN (_col14 is not null) THEN (_col14) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 191667562 Data size: 26061245514 Basic stats: COMPLETE Column stats: NONE Group By Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query77.q.out b/ql/src/test/results/clientpositive/perf/spark/query77.q.out index ee09aea032..0612e97c28 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query77.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query77.q.out @@ -826,7 +826,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 95833780 Data size: 13030622681 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 'web channel' (type: string), _col3 (type: int), _col4 (type: decimal(17,2)), CASE WHEN (_col1 is not null) THEN (_col1) ELSE (0) END (type: decimal(17,2)), (_col5 - CASE WHEN (_col2 is not null) THEN (_col2) ELSE (0) END) (type: decimal(18,2)) + expressions: 'web channel' (type: string), _col3 (type: int), _col4 (type: decimal(17,2)), CASE WHEN (_col1 is not null) THEN (_col1) ELSE (CAST( 0 AS decimal(17,2))) END (type: decimal(17,2)), (_col5 - CASE WHEN (_col2 is not null) THEN (_col2) ELSE (CAST( 0 AS decimal(17,2))) END) (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 95833780 Data size: 13030622681 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -916,7 +916,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5 Statistics: Num rows: 383325119 Data size: 33817053337 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 'store channel' (type: string), _col0 (type: int), _col1 (type: decimal(17,2)), CASE WHEN (_col4 is not null) THEN (_col4) ELSE (0) END (type: decimal(17,2)), (_col2 - CASE WHEN (_col5 is not null) THEN (_col5) ELSE (0) END) (type: decimal(18,2)) + expressions: 'store channel' (type: string), _col0 (type: int), _col1 (type: decimal(17,2)), CASE WHEN (_col4 is not null) THEN (_col4) ELSE (CAST( 0 AS decimal(17,2))) END (type: decimal(17,2)), (_col2 - CASE WHEN (_col5 is not null) THEN (_col5) ELSE (CAST( 0 AS decimal(17,2))) END) (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 383325119 Data size: 33817053337 Basic stats: COMPLETE Column stats: NONE Group By Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query78.q.out b/ql/src/test/results/clientpositive/perf/spark/query78.q.out index ca30d38ac9..55931578c5 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query78.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query78.q.out @@ -455,7 +455,7 @@ STAGE PLANS: predicate: (_col2 > 0L) (type: boolean) Statistics: Num rows: 29038976 Data size: 3932460694 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col1 (type: int), _col2 (type: bigint), _col2 is not null (type: boolean), CASE WHEN (_col2 is not null) THEN (_col2) ELSE (0) END (type: bigint), CASE WHEN (_col3 is not null) THEN (_col3) ELSE (0) END (type: decimal(17,2)), CASE WHEN (_col4 is not null) THEN (_col4) ELSE (0) END (type: decimal(17,2)) + expressions: _col1 (type: int), _col2 (type: bigint), _col2 is not null (type: boolean), CASE WHEN (_col2 is not null) THEN (_col2) ELSE (0L) END (type: bigint), CASE WHEN (_col3 is not null) THEN (_col3) ELSE (CAST( 0 AS decimal(17,2))) END (type: decimal(17,2)), CASE WHEN (_col4 is not null) THEN (_col4) ELSE (CAST( 0 AS decimal(17,2))) END (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 29038976 Data size: 3932460694 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -556,7 +556,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col8, _col9, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), _col1 (type: int), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col12 and _col7 is not null)) THEN ((_col7 + _col11)) ELSE (1) END)), 2) (type: double), (CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0) END + _col13) (type: bigint), (CASE WHEN (_col8 is not null) THEN (_col8) ELSE (0) END + _col14) (type: decimal(18,2)), (CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END + _col15) (type: decimal(18,2)), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col7 is not null and _col11 is not null)) THEN ((_col7 + _col11)) ELSE (1) END)), 2) (type: double) + expressions: _col0 (type: int), _col1 (type: int), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col12 and _col7 is not null)) THEN ((_col7 + _col11)) ELSE (1L) END)), 2) (type: double), (CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0L) END + _col13) (type: bigint), (CASE WHEN (_col8 is not null) THEN (_col8) ELSE (CAST( 0 AS decimal(17,2))) END + _col14) (type: decimal(18,2)), (CASE WHEN (_col9 is not null) THEN (_col9) ELSE (CAST( 0 AS decimal(17,2))) END + _col15) (type: decimal(18,2)), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col7 is not null and _col11 is not null)) THEN ((_col7 + _col11)) ELSE (1L) END)), 2) (type: double) outputColumnNames: _col0, _col1, _col2, _col6, _col7, _col8, _col9, _col10, _col11, _col12 Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator diff --git a/ql/src/test/results/clientpositive/perf/spark/query80.q.out b/ql/src/test/results/clientpositive/perf/spark/query80.q.out index 7ab9894aa2..c9d382798b 100644 --- a/ql/src/test/results/clientpositive/perf/spark/query80.q.out +++ b/ql/src/test/results/clientpositive/perf/spark/query80.q.out @@ -656,7 +656,7 @@ STAGE PLANS: outputColumnNames: _col5, _col6, _col9, _col10, _col15 Statistics: Num rows: 463810558 Data size: 62809267017 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END (type: decimal(12,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (0) END) (type: decimal(13,2)) + expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 463810558 Data size: 62809267017 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -671,7 +671,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 463810558 Data size: 62809267017 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) Reducer 18 Execution mode: vectorized Reduce Operator Tree: @@ -682,7 +682,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 231905279 Data size: 31404633508 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 'catalog channel' (type: string), concat('catalog_page', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + expressions: 'catalog channel' (type: string), concat('catalog_page', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 231905279 Data size: 31404633508 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -698,7 +698,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) Statistics: Num rows: 2435062716 Data size: 264270971781 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(27,2)), _col5 (type: decimal(28,2)) Reducer 2 Reduce Operator Tree: Join Operator @@ -782,7 +782,7 @@ STAGE PLANS: 1 Map 33 Statistics: Num rows: 231917759 Data size: 31534108438 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END (type: decimal(12,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (0) END) (type: decimal(13,2)) + expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 231917759 Data size: 31534108438 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -797,7 +797,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 231917759 Data size: 31534108438 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) Reducer 28 Execution mode: vectorized Reduce Operator Tree: @@ -808,7 +808,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 115958879 Data size: 15767054151 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 'web channel' (type: string), concat('web_site', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + expressions: 'web channel' (type: string), concat('web_site', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 115958879 Data size: 15767054151 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -824,7 +824,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) Statistics: Num rows: 2435062716 Data size: 264270971781 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(27,2)), _col5 (type: decimal(28,2)) Reducer 3 Local Work: Map Reduce Local Work @@ -876,7 +876,7 @@ STAGE PLANS: 1 Map 12 Statistics: Num rows: 927646829 Data size: 81837272625 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END (type: decimal(12,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (0) END) (type: decimal(13,2)) + expressions: _col15 (type: string), _col5 (type: decimal(7,2)), CASE WHEN (_col9 is not null) THEN (_col9) ELSE (CAST( 0 AS decimal(7,2))) END (type: decimal(7,2)), (_col6 - CASE WHEN (_col10 is not null) THEN (_col10) ELSE (CAST( 0 AS decimal(7,2))) END) (type: decimal(8,2)) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 927646829 Data size: 81837272625 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -891,7 +891,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 927646829 Data size: 81837272625 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) Reducer 5 Execution mode: vectorized Reduce Operator Tree: @@ -902,7 +902,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 463823414 Data size: 40918636268 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 'store channel' (type: string), concat('store', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + expressions: 'store channel' (type: string), concat('store', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(17,2)), _col3 (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 463823414 Data size: 40918636268 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -918,7 +918,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) Statistics: Num rows: 2435062716 Data size: 264270971781 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(27,2)), _col5 (type: decimal(28,2)) Reducer 6 Execution mode: vectorized Reduce Operator Tree: @@ -930,7 +930,7 @@ STAGE PLANS: Statistics: Num rows: 1217531358 Data size: 132135485890 Basic stats: COMPLETE Column stats: NONE pruneGroupingSetId: true Select Operator - expressions: _col0 (type: string), _col1 (type: string), _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + expressions: _col0 (type: string), _col1 (type: string), _col3 (type: decimal(27,2)), _col4 (type: decimal(27,2)), _col5 (type: decimal(28,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 1217531358 Data size: 132135485890 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -938,12 +938,12 @@ STAGE PLANS: sort order: ++ Statistics: Num rows: 1217531358 Data size: 132135485890 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 - value expressions: _col2 (type: decimal(27,2)), _col3 (type: decimal(32,2)), _col4 (type: decimal(33,2)) + value expressions: _col2 (type: decimal(27,2)), _col3 (type: decimal(27,2)), _col4 (type: decimal(28,2)) Reducer 7 Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(27,2)), VALUE._col1 (type: decimal(32,2)), VALUE._col2 (type: decimal(33,2)) + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(27,2)), VALUE._col1 (type: decimal(27,2)), VALUE._col2 (type: decimal(28,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 1217531358 Data size: 132135485890 Basic stats: COMPLETE Column stats: NONE Limit diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query2.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query2.q.out index f867f46479..26a98ffcec 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query2.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query2.q.out @@ -131,7 +131,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC]) HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)], agg#4=[sum($5)], agg#5=[sum($6)], agg#6=[sum($7)]) - HiveProject($f0=[$3], $f1=[CASE($4, $1, null:NULL)], $f2=[CASE($5, $1, null:NULL)], $f3=[CASE($6, $1, null:NULL)], $f4=[CASE($7, $1, null:NULL)], $f5=[CASE($8, $1, null:NULL)], $f6=[CASE($9, $1, null:NULL)], $f7=[CASE($10, $1, null:NULL)]) + HiveProject($f0=[$3], $f1=[CASE($4, $1, null:DECIMAL(7, 2))], $f2=[CASE($5, $1, null:DECIMAL(7, 2))], $f3=[CASE($6, $1, null:DECIMAL(7, 2))], $f4=[CASE($7, $1, null:DECIMAL(7, 2))], $f5=[CASE($8, $1, null:DECIMAL(7, 2))], $f6=[CASE($9, $1, null:DECIMAL(7, 2))], $f7=[CASE($10, $1, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_ext_sales_price=[$1]) HiveUnion(all=[true]) @@ -151,7 +151,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC]) HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)], agg#4=[sum($5)], agg#5=[sum($6)], agg#6=[sum($7)]) - HiveProject($f0=[$3], $f1=[CASE($4, $1, null:NULL)], $f2=[CASE($5, $1, null:NULL)], $f3=[CASE($6, $1, null:NULL)], $f4=[CASE($7, $1, null:NULL)], $f5=[CASE($8, $1, null:NULL)], $f6=[CASE($9, $1, null:NULL)], $f7=[CASE($10, $1, null:NULL)]) + HiveProject($f0=[$3], $f1=[CASE($4, $1, null:DECIMAL(7, 2))], $f2=[CASE($5, $1, null:DECIMAL(7, 2))], $f3=[CASE($6, $1, null:DECIMAL(7, 2))], $f4=[CASE($7, $1, null:DECIMAL(7, 2))], $f5=[CASE($8, $1, null:DECIMAL(7, 2))], $f6=[CASE($9, $1, null:DECIMAL(7, 2))], $f7=[CASE($10, $1, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_ext_sales_price=[$1]) HiveUnion(all=[true]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query39.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query39.q.out index 2ffb2a6b5b..4f566d0952 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query39.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query39.q.out @@ -65,7 +65,7 @@ HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], d_moy=[CAST(4):INTEGER], mean=[ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$6], sort5=[$7], dir0=[ASC], dir1=[ASC], dir2=[ASC], dir3=[ASC], dir4=[ASC], dir5=[ASC]) HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[$2], cov=[$3], w_warehouse_sk0=[$4], i_item_sk0=[$5], mean0=[$6], cov0=[$7]) HiveJoin(condition=[AND(=($1, $5), =($0, $4))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(w_warehouse_sk=[$1], i_item_sk=[$2], mean=[/(CAST($6):DOUBLE, $5)], cov=[CASE(=(/(CAST($6):DOUBLE, $5), 0), null:NULL, /(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)))]) + HiveProject(w_warehouse_sk=[$1], i_item_sk=[$2], mean=[/(CAST($6):DOUBLE, $5)], cov=[CASE(=(/(CAST($6):DOUBLE, $5), 0), null:DOUBLE, /(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)))]) HiveFilter(condition=[CASE(=(/(CAST($6):DOUBLE, $5), 0), false, >(/(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)), 1))]) HiveAggregate(group=[{0, 1, 2}], agg#0=[sum($5)], agg#1=[sum($4)], agg#2=[count($3)], agg#3=[sum($3)]) HiveProject($f0=[$7], $f1=[$6], $f2=[$0], $f4=[$4], $f40=[CAST($4):DOUBLE], $f6=[*(CAST($4):DOUBLE, CAST($4):DOUBLE)]) @@ -84,7 +84,7 @@ HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], d_moy=[CAST(4):INTEGER], mean=[ HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2]) HiveFilter(condition=[IS NOT NULL($0)]) HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse]) - HiveProject(w_warehouse_sk=[$1], i_item_sk=[$2], mean=[/(CAST($6):DOUBLE, $5)], cov=[CASE(=(/(CAST($6):DOUBLE, $5), 0), null:NULL, /(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)))]) + HiveProject(w_warehouse_sk=[$1], i_item_sk=[$2], mean=[/(CAST($6):DOUBLE, $5)], cov=[CASE(=(/(CAST($6):DOUBLE, $5), 0), null:DOUBLE, /(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)))]) HiveFilter(condition=[CASE(=(/(CAST($6):DOUBLE, $5), 0), false, >(/(POWER(/(-($3, /(*($4, $4), $5)), CASE(=($5, 1), null:BIGINT, -($5, 1))), 0.5:DECIMAL(2, 1)), /(CAST($6):DOUBLE, $5)), 1))]) HiveAggregate(group=[{0, 1, 2}], agg#0=[sum($5)], agg#1=[sum($4)], agg#2=[count($3)], agg#3=[sum($3)]) HiveProject($f0=[$7], $f1=[$6], $f2=[$0], $f4=[$4], $f40=[CAST($4):DOUBLE], $f6=[*(CAST($4):DOUBLE, CAST($4):DOUBLE)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query40.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query40.q.out index adb6e9cdc1..09939b54e9 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query40.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query40.q.out @@ -68,7 +68,7 @@ CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)]) - HiveProject($f0=[$1], $f1=[$14], $f2=[CASE($11, -($6, CASE(IS NOT NULL($9), $9, 0)), 0)], $f3=[CASE($12, -($6, CASE(IS NOT NULL($9), $9, 0)), 0)]) + HiveProject($f0=[$1], $f1=[$14], $f2=[CASE($11, -($6, CASE(IS NOT NULL($9), $9, 0:DECIMAL(12, 2))), 0:DECIMAL(13, 2))], $f3=[CASE($12, -($6, CASE(IS NOT NULL($9), $9, 0:DECIMAL(12, 2))), 0:DECIMAL(13, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(w_warehouse_sk=[$0], w_state=[$10]) HiveFilter(condition=[IS NOT NULL($0)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query43.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query43.q.out index 6d6d30a9c4..d017e2ceff 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query43.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query43.q.out @@ -46,7 +46,7 @@ CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$4], sort5=[$5], sort6=[$6], sort7=[$7], sort8=[$8], dir0=[ASC], dir1=[ASC], dir2=[ASC], dir3=[ASC], dir4=[ASC], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC], fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)], agg#3=[sum($5)], agg#4=[sum($6)], agg#5=[sum($7)], agg#6=[sum($8)]) - HiveProject($f0=[$13], $f1=[$12], $f2=[CASE($4, $2, null:NULL)], $f3=[CASE($5, $2, null:NULL)], $f4=[CASE($6, $2, null:NULL)], $f5=[CASE($7, $2, null:NULL)], $f6=[CASE($8, $2, null:NULL)], $f7=[CASE($9, $2, null:NULL)], $f8=[CASE($10, $2, null:NULL)]) + HiveProject($f0=[$13], $f1=[$12], $f2=[CASE($4, $2, null:DECIMAL(7, 2))], $f3=[CASE($5, $2, null:DECIMAL(7, 2))], $f4=[CASE($6, $2, null:DECIMAL(7, 2))], $f5=[CASE($7, $2, null:DECIMAL(7, 2))], $f6=[CASE($8, $2, null:DECIMAL(7, 2))], $f7=[CASE($9, $2, null:DECIMAL(7, 2))], $f8=[CASE($10, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($11, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query49.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query49.q.out index 2d058c30f4..1e28ff9f43 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query49.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query49.q.out @@ -282,11 +282,11 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(ws_item_sk=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{5}], agg#0=[sum($2)], agg#1=[sum($7)], agg#2=[sum($3)], agg#3=[sum($8)]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(wr_item_sk=[$2], wr_order_number=[$13], CASE=[CASE(IS NOT NULL($14), $14, 0)], CASE3=[CASE(IS NOT NULL($15), $15, 0)]) + HiveProject(wr_item_sk=[$2], wr_order_number=[$13], CASE=[CASE(IS NOT NULL($14), $14, 0)], CASE3=[CASE(IS NOT NULL($15), $15, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($15, 10000:DECIMAL(5, 0)), IS NOT NULL($13), IS NOT NULL($2))]) HiveTableScan(table=[[default, web_returns]], table:alias=[wr]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_order_number=[$17], CASE=[CASE(IS NOT NULL($18), $18, 0)], CASE4=[CASE(IS NOT NULL($29), $29, 0)]) + HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_order_number=[$17], CASE=[CASE(IS NOT NULL($18), $18, 0)], CASE4=[CASE(IS NOT NULL($29), $29, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($33, 1:DECIMAL(1, 0)), >($29, 0:DECIMAL(1, 0)), >($18, 0), IS NOT NULL($17), IS NOT NULL($3), IS NOT NULL($0))]) HiveTableScan(table=[[default, web_sales]], table:alias=[ws]) HiveProject(d_date_sk=[$0]) @@ -298,11 +298,11 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(cs_item_sk=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{5}], agg#0=[sum($2)], agg#1=[sum($7)], agg#2=[sum($3)], agg#3=[sum($8)]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(cr_item_sk=[$2], cr_order_number=[$16], CASE=[CASE(IS NOT NULL($17), $17, 0)], CASE3=[CASE(IS NOT NULL($18), $18, 0)]) + HiveProject(cr_item_sk=[$2], cr_order_number=[$16], CASE=[CASE(IS NOT NULL($17), $17, 0)], CASE3=[CASE(IS NOT NULL($18), $18, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($18, 10000:DECIMAL(5, 0)), IS NOT NULL($16), IS NOT NULL($2))]) HiveTableScan(table=[[default, catalog_returns]], table:alias=[cr]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(cs_sold_date_sk=[$0], cs_item_sk=[$15], cs_order_number=[$17], CASE=[CASE(IS NOT NULL($18), $18, 0)], CASE4=[CASE(IS NOT NULL($29), $29, 0)]) + HiveProject(cs_sold_date_sk=[$0], cs_item_sk=[$15], cs_order_number=[$17], CASE=[CASE(IS NOT NULL($18), $18, 0)], CASE4=[CASE(IS NOT NULL($29), $29, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($33, 1:DECIMAL(1, 0)), >($29, 0:DECIMAL(1, 0)), >($18, 0), IS NOT NULL($17), IS NOT NULL($15), IS NOT NULL($0))]) HiveTableScan(table=[[default, catalog_sales]], table:alias=[cs]) HiveProject(d_date_sk=[$0]) @@ -314,11 +314,11 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(ss_item_sk=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{5}], agg#0=[sum($2)], agg#1=[sum($7)], agg#2=[sum($3)], agg#3=[sum($8)]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9], CASE=[CASE(IS NOT NULL($10), $10, 0)], CASE3=[CASE(IS NOT NULL($11), $11, 0)]) + HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9], CASE=[CASE(IS NOT NULL($10), $10, 0)], CASE3=[CASE(IS NOT NULL($11), $11, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($11, 10000:DECIMAL(5, 0)), IS NOT NULL($9), IS NOT NULL($2))]) HiveTableScan(table=[[default, store_returns]], table:alias=[sr]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_ticket_number=[$9], CASE=[CASE(IS NOT NULL($10), $10, 0)], CASE4=[CASE(IS NOT NULL($20), $20, 0)]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_ticket_number=[$9], CASE=[CASE(IS NOT NULL($10), $10, 0)], CASE4=[CASE(IS NOT NULL($20), $20, 0:DECIMAL(12, 2))]) HiveFilter(condition=[AND(>($22, 1:DECIMAL(1, 0)), >($20, 0:DECIMAL(1, 0)), >($10, 0), IS NOT NULL($9), IS NOT NULL($2), IS NOT NULL($0))]) HiveTableScan(table=[[default, store_sales]], table:alias=[sts]) HiveProject(d_date_sk=[$0]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query59.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query59.q.out index bcf9e3d5e2..abc5d999b5 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query59.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query59.q.out @@ -103,7 +103,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ HiveJoin(condition=[=($9, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)], agg#3=[sum($5)], agg#4=[sum($6)], agg#5=[sum($7)], agg#6=[sum($8)]) - HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:NULL)], $f3=[CASE($6, $2, null:NULL)], $f4=[CASE($7, $2, null:NULL)], $f5=[CASE($8, $2, null:NULL)], $f6=[CASE($9, $2, null:NULL)], $f7=[CASE($10, $2, null:NULL)], $f8=[CASE($11, $2, null:NULL)]) + HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:DECIMAL(7, 2))], $f3=[CASE($6, $2, null:DECIMAL(7, 2))], $f4=[CASE($7, $2, null:DECIMAL(7, 2))], $f5=[CASE($8, $2, null:DECIMAL(7, 2))], $f6=[CASE($9, $2, null:DECIMAL(7, 2))], $f7=[CASE($10, $2, null:DECIMAL(7, 2))], $f8=[CASE($11, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) @@ -122,7 +122,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($5)], agg#3=[sum($6)], agg#4=[sum($7)], agg#5=[sum($8)]) - HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:NULL)], $f3=[CASE($6, $2, null:NULL)], $f4=[CASE($7, $2, null:NULL)], $f5=[CASE($8, $2, null:NULL)], $f6=[CASE($9, $2, null:NULL)], $f7=[CASE($10, $2, null:NULL)], $f8=[CASE($11, $2, null:NULL)]) + HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:DECIMAL(7, 2))], $f3=[CASE($6, $2, null:DECIMAL(7, 2))], $f4=[CASE($7, $2, null:DECIMAL(7, 2))], $f5=[CASE($8, $2, null:DECIMAL(7, 2))], $f6=[CASE($9, $2, null:DECIMAL(7, 2))], $f7=[CASE($10, $2, null:DECIMAL(7, 2))], $f8=[CASE($11, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query66.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query66.q.out index db1ce36766..b5b85e5d25 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query66.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query66.q.out @@ -463,7 +463,7 @@ HiveProject(w_warehouse_name=[$0], w_warehouse_sq_ft=[$1], w_city=[$2], w_county HiveUnion(all=[true]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8], $f9=[$9], $f10=[$10], $f11=[$11], $f12=[$12], $f13=[$13], $f14=[$14], $f15=[$15], $f16=[$16], $f17=[$17], $f18=[$18], $f19=[$19], $f20=[$20], $f21=[$21], $f22=[$22], $f23=[$23], $f24=[$24], $f25=[$25], $f26=[$26], $f27=[$27], $f28=[$28], $f29=[$29]) HiveAggregate(group=[{0, 1, 2, 3, 4, 5}], agg#0=[sum($6)], agg#1=[sum($7)], agg#2=[sum($8)], agg#3=[sum($9)], agg#4=[sum($10)], agg#5=[sum($11)], agg#6=[sum($12)], agg#7=[sum($13)], agg#8=[sum($14)], agg#9=[sum($15)], agg#10=[sum($16)], agg#11=[sum($17)], agg#12=[sum($18)], agg#13=[sum($19)], agg#14=[sum($20)], agg#15=[sum($21)], agg#16=[sum($22)], agg#17=[sum($23)], agg#18=[sum($24)], agg#19=[sum($25)], agg#20=[sum($26)], agg#21=[sum($27)], agg#22=[sum($28)], agg#23=[sum($29)]) - HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], $f5=[$6], $f7=[CASE($15, $11, 0)], $f8=[CASE($16, $11, 0)], $f9=[CASE($17, $11, 0)], $f10=[CASE($18, $11, 0)], $f11=[CASE($19, $11, 0)], $f12=[CASE($20, $11, 0)], $f13=[CASE($21, $11, 0)], $f14=[CASE($22, $11, 0)], $f15=[CASE($23, $11, 0)], $f16=[CASE($24, $11, 0)], $f17=[CASE($25, $11, 0)], $f18=[CASE($26, $11, 0)], $f19=[CASE($15, $12, 0)], $f20=[CASE($16, $12, 0)], $f21=[CASE($17, $12, 0)], $f22=[CASE($18, $12, 0)], $f23=[CASE($19, $12, 0)], $f24=[CASE($20, $12, 0)], $f25=[CASE($21, $12, 0)], $f26=[CASE($22, $12, 0)], $f27=[CASE($23, $12, 0)], $f28=[CASE($24, $12, 0)], $f29=[CASE($25, $12, 0)], $f30=[CASE($26, $12, 0)]) + HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], $f5=[$6], $f7=[CASE($15, $11, 0:DECIMAL(18, 2))], $f8=[CASE($16, $11, 0:DECIMAL(18, 2))], $f9=[CASE($17, $11, 0:DECIMAL(18, 2))], $f10=[CASE($18, $11, 0:DECIMAL(18, 2))], $f11=[CASE($19, $11, 0:DECIMAL(18, 2))], $f12=[CASE($20, $11, 0:DECIMAL(18, 2))], $f13=[CASE($21, $11, 0:DECIMAL(18, 2))], $f14=[CASE($22, $11, 0:DECIMAL(18, 2))], $f15=[CASE($23, $11, 0:DECIMAL(18, 2))], $f16=[CASE($24, $11, 0:DECIMAL(18, 2))], $f17=[CASE($25, $11, 0:DECIMAL(18, 2))], $f18=[CASE($26, $11, 0:DECIMAL(18, 2))], $f19=[CASE($15, $12, 0:DECIMAL(18, 2))], $f20=[CASE($16, $12, 0:DECIMAL(18, 2))], $f21=[CASE($17, $12, 0:DECIMAL(18, 2))], $f22=[CASE($18, $12, 0:DECIMAL(18, 2))], $f23=[CASE($19, $12, 0:DECIMAL(18, 2))], $f24=[CASE($20, $12, 0:DECIMAL(18, 2))], $f25=[CASE($21, $12, 0:DECIMAL(18, 2))], $f26=[CASE($22, $12, 0:DECIMAL(18, 2))], $f27=[CASE($23, $12, 0:DECIMAL(18, 2))], $f28=[CASE($24, $12, 0:DECIMAL(18, 2))], $f29=[CASE($25, $12, 0:DECIMAL(18, 2))], $f30=[CASE($26, $12, 0:DECIMAL(18, 2))]) HiveJoin(condition=[=($10, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2], w_warehouse_sq_ft=[$3], w_city=[$8], w_county=[$9], w_state=[$10], w_country=[$12]) HiveFilter(condition=[IS NOT NULL($0)]) @@ -485,7 +485,7 @@ HiveProject(w_warehouse_name=[$0], w_warehouse_sq_ft=[$1], w_city=[$2], w_county HiveTableScan(table=[[default, ship_mode]], table:alias=[ship_mode]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8], $f9=[$9], $f10=[$10], $f11=[$11], $f12=[$12], $f13=[$13], $f14=[$14], $f15=[$15], $f16=[$16], $f17=[$17], $f18=[$18], $f19=[$19], $f20=[$20], $f21=[$21], $f22=[$22], $f23=[$23], $f24=[$24], $f25=[$25], $f26=[$26], $f27=[$27], $f28=[$28], $f29=[$29]) HiveAggregate(group=[{0, 1, 2, 3, 4, 5}], agg#0=[sum($6)], agg#1=[sum($7)], agg#2=[sum($8)], agg#3=[sum($9)], agg#4=[sum($10)], agg#5=[sum($11)], agg#6=[sum($12)], agg#7=[sum($13)], agg#8=[sum($14)], agg#9=[sum($15)], agg#10=[sum($16)], agg#11=[sum($17)], agg#12=[sum($18)], agg#13=[sum($19)], agg#14=[sum($20)], agg#15=[sum($21)], agg#16=[sum($22)], agg#17=[sum($23)], agg#18=[sum($24)], agg#19=[sum($25)], agg#20=[sum($26)], agg#21=[sum($27)], agg#22=[sum($28)], agg#23=[sum($29)]) - HiveProject($f0=[$22], $f1=[$23], $f2=[$24], $f3=[$25], $f4=[$26], $f5=[$27], $f7=[CASE($8, $4, 0)], $f8=[CASE($9, $4, 0)], $f9=[CASE($10, $4, 0)], $f10=[CASE($11, $4, 0)], $f11=[CASE($12, $4, 0)], $f12=[CASE($13, $4, 0)], $f13=[CASE($14, $4, 0)], $f14=[CASE($15, $4, 0)], $f15=[CASE($16, $4, 0)], $f16=[CASE($17, $4, 0)], $f17=[CASE($18, $4, 0)], $f18=[CASE($19, $4, 0)], $f19=[CASE($8, $5, 0)], $f20=[CASE($9, $5, 0)], $f21=[CASE($10, $5, 0)], $f22=[CASE($11, $5, 0)], $f23=[CASE($12, $5, 0)], $f24=[CASE($13, $5, 0)], $f25=[CASE($14, $5, 0)], $f26=[CASE($15, $5, 0)], $f27=[CASE($16, $5, 0)], $f28=[CASE($17, $5, 0)], $f29=[CASE($18, $5, 0)], $f30=[CASE($19, $5, 0)]) + HiveProject($f0=[$22], $f1=[$23], $f2=[$24], $f3=[$25], $f4=[$26], $f5=[$27], $f7=[CASE($8, $4, 0:DECIMAL(18, 2))], $f8=[CASE($9, $4, 0:DECIMAL(18, 2))], $f9=[CASE($10, $4, 0:DECIMAL(18, 2))], $f10=[CASE($11, $4, 0:DECIMAL(18, 2))], $f11=[CASE($12, $4, 0:DECIMAL(18, 2))], $f12=[CASE($13, $4, 0:DECIMAL(18, 2))], $f13=[CASE($14, $4, 0:DECIMAL(18, 2))], $f14=[CASE($15, $4, 0:DECIMAL(18, 2))], $f15=[CASE($16, $4, 0:DECIMAL(18, 2))], $f16=[CASE($17, $4, 0:DECIMAL(18, 2))], $f17=[CASE($18, $4, 0:DECIMAL(18, 2))], $f18=[CASE($19, $4, 0:DECIMAL(18, 2))], $f19=[CASE($8, $5, 0:DECIMAL(18, 2))], $f20=[CASE($9, $5, 0:DECIMAL(18, 2))], $f21=[CASE($10, $5, 0:DECIMAL(18, 2))], $f22=[CASE($11, $5, 0:DECIMAL(18, 2))], $f23=[CASE($12, $5, 0:DECIMAL(18, 2))], $f24=[CASE($13, $5, 0:DECIMAL(18, 2))], $f25=[CASE($14, $5, 0:DECIMAL(18, 2))], $f26=[CASE($15, $5, 0:DECIMAL(18, 2))], $f27=[CASE($16, $5, 0:DECIMAL(18, 2))], $f28=[CASE($17, $5, 0:DECIMAL(18, 2))], $f29=[CASE($18, $5, 0:DECIMAL(18, 2))], $f30=[CASE($19, $5, 0:DECIMAL(18, 2))]) HiveJoin(condition=[=($3, $21)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($2, $20)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $7)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query77.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query77.q.out index fb8b35e207..29ff348890 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query77.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query77.q.out @@ -237,7 +237,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)]) HiveProject(channel=[$0], id=[$1], sales=[$2], returns=[$3], profit=[$4]) HiveUnion(all=[true]) - HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0)], profit=[-($2, CASE(IS NOT NULL($5), $5, 0))]) + HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0:DECIMAL(17, 2))], profit=[-($2, CASE(IS NOT NULL($5), $5, 0:DECIMAL(17, 2)))]) HiveJoin(condition=[=($0, $3)], joinType=[left], algorithm=[none], cost=[not available]) HiveProject(s_store_sk=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{5}], agg#0=[sum($2)], agg#1=[sum($3)]) @@ -285,7 +285,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(BETWEEN(false, CAST($2):TIMESTAMP(9), 1998-08-04 00:00:00:TIMESTAMP(9), 1998-09-03 00:00:00:TIMESTAMP(9)), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0)], profit=[-($2, CASE(IS NOT NULL($5), $5, 0))]) + HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0:DECIMAL(17, 2))], profit=[-($2, CASE(IS NOT NULL($5), $5, 0:DECIMAL(17, 2)))]) HiveJoin(condition=[=($0, $3)], joinType=[left], algorithm=[none], cost=[not available]) HiveProject(wp_web_page_sk=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{0}], agg#0=[sum($3)], agg#1=[sum($4)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out index 0c314a6141..f77eadfc6b 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out @@ -132,7 +132,7 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject(ss_sold_year=[CAST(2000):INTEGER], ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[$2], store_qty=[$3], store_wholesale_cost=[$4], store_sales_price=[$5], other_chan_qty=[$6], other_chan_wholesale_cost=[$7], other_chan_sales_price=[$8]) HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$9], sort3=[$10], sort4=[$11], sort5=[$6], sort6=[$7], sort7=[$8], sort8=[$12], dir0=[ASC], dir1=[ASC], dir2=[DESC-nulls-last], dir3=[DESC-nulls-last], dir4=[DESC-nulls-last], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND($12, IS NOT NULL($7)), +($7, $11), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($7), $7, 0), $13)], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($8), $8, 0), $14)], other_chan_sales_price=[+(CASE(IS NOT NULL($9), $9, 0), $15)], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1)):DOUBLE), 2)]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND($12, IS NOT NULL($7)), +($7, $11), 1:BIGINT)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($7), $7, 0:BIGINT), $13)], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($8), $8, 0:DECIMAL(17, 2)), $14)], other_chan_sales_price=[+(CASE(IS NOT NULL($9), $9, 0:DECIMAL(17, 2)), $15)], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1:BIGINT)):DOUBLE), 2)]) HiveJoin(condition=[=($10, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[AND(=($5, $0), =($6, $1))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) @@ -166,7 +166,7 @@ HiveSortLimit(fetch=[100]) HiveProject(wr_item_sk=[$2], wr_order_number=[$13]) HiveFilter(condition=[AND(IS NOT NULL($13), IS NOT NULL($2))]) HiveTableScan(table=[[default, web_returns]], table:alias=[web_returns]) - HiveProject($f2=[$1], $f3=[$2], IS NOT NULL=[IS NOT NULL($2)], CASE=[CASE(IS NOT NULL($2), $2, 0)], CASE7=[CASE(IS NOT NULL($3), $3, 0)], CASE8=[CASE(IS NOT NULL($4), $4, 0)]) + HiveProject($f2=[$1], $f3=[$2], IS NOT NULL=[IS NOT NULL($2)], CASE=[CASE(IS NOT NULL($2), $2, 0:BIGINT)], CASE7=[CASE(IS NOT NULL($3), $3, 0:DECIMAL(17, 2))], CASE8=[CASE(IS NOT NULL($4), $4, 0:DECIMAL(17, 2))]) HiveFilter(condition=[>($2, 0)]) HiveProject(cs_item_sk=[$1], cs_bill_customer_sk=[$0], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query80.q.out b/ql/src/test/results/clientpositive/perf/tez/cbo_query80.q.out index 5387d714b6..7f479b35b7 100644 --- a/ql/src/test/results/clientpositive/perf/tez/cbo_query80.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query80.q.out @@ -222,7 +222,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveUnion(all=[true]) HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'store', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0)], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0))]) + HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2))], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(s_store_sk=[$0], s_store_id=[$1]) HiveFilter(condition=[IS NOT NULL($0)]) @@ -248,7 +248,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) HiveProject(channel=[_UTF-16LE'catalog channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'catalog_page', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0)], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0))]) + HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2))], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($4, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cp_catalog_page_sk=[$0], cp_catalog_page_id=[$1]) HiveFilter(condition=[IS NOT NULL($0)]) @@ -274,7 +274,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'web_site', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$15], $f1=[$7], $f2=[CASE(IS NOT NULL($11), $11, 0)], $f3=[-($8, CASE(IS NOT NULL($12), $12, 0))]) + HiveProject($f0=[$15], $f1=[$7], $f2=[CASE(IS NOT NULL($11), $11, 0:DECIMAL(12, 2))], $f3=[-($8, CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(p_promo_sk=[$0]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query2.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query2.q.out index 30ecde869a..4c90da4476 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query2.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query2.q.out @@ -131,7 +131,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC]) HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)], agg#4=[sum($5)], agg#5=[sum($6)], agg#6=[sum($7)]) - HiveProject($f0=[$3], $f1=[CASE($4, $1, null:NULL)], $f2=[CASE($5, $1, null:NULL)], $f3=[CASE($6, $1, null:NULL)], $f4=[CASE($7, $1, null:NULL)], $f5=[CASE($8, $1, null:NULL)], $f6=[CASE($9, $1, null:NULL)], $f7=[CASE($10, $1, null:NULL)]) + HiveProject($f0=[$3], $f1=[CASE($4, $1, null:DECIMAL(7, 2))], $f2=[CASE($5, $1, null:DECIMAL(7, 2))], $f3=[CASE($6, $1, null:DECIMAL(7, 2))], $f4=[CASE($7, $1, null:DECIMAL(7, 2))], $f5=[CASE($8, $1, null:DECIMAL(7, 2))], $f6=[CASE($9, $1, null:DECIMAL(7, 2))], $f7=[CASE($10, $1, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_ext_sales_price=[$1]) HiveUnion(all=[true]) @@ -151,7 +151,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC]) HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)], agg#4=[sum($5)], agg#5=[sum($6)], agg#6=[sum($7)]) - HiveProject($f0=[$3], $f1=[CASE($4, $1, null:NULL)], $f2=[CASE($5, $1, null:NULL)], $f3=[CASE($6, $1, null:NULL)], $f4=[CASE($7, $1, null:NULL)], $f5=[CASE($8, $1, null:NULL)], $f6=[CASE($9, $1, null:NULL)], $f7=[CASE($10, $1, null:NULL)]) + HiveProject($f0=[$3], $f1=[CASE($4, $1, null:DECIMAL(7, 2))], $f2=[CASE($5, $1, null:DECIMAL(7, 2))], $f3=[CASE($6, $1, null:DECIMAL(7, 2))], $f4=[CASE($7, $1, null:DECIMAL(7, 2))], $f5=[CASE($8, $1, null:DECIMAL(7, 2))], $f6=[CASE($9, $1, null:DECIMAL(7, 2))], $f7=[CASE($10, $1, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_ext_sales_price=[$1]) HiveUnion(all=[true]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query39.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query39.q.out index ec236ee4df..fc4e7e312a 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query39.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query39.q.out @@ -65,7 +65,7 @@ HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], d_moy=[CAST(4):INTEGER], mean=[ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$6], sort5=[$7], dir0=[ASC], dir1=[ASC], dir2=[ASC], dir3=[ASC], dir4=[ASC], dir5=[ASC]) HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[$6], cov=[$7], w_warehouse_sk0=[$0], i_item_sk0=[$1], mean0=[$2], cov0=[$3]) HiveJoin(condition=[AND(=($5, $1), =($4, $0))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[/(CAST($5):DOUBLE, $4)], cov=[CASE(=(/(CAST($5):DOUBLE, $4), 0), null:NULL, /(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)))]) + HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[/(CAST($5):DOUBLE, $4)], cov=[CASE(=(/(CAST($5):DOUBLE, $4), 0), null:DOUBLE, /(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)))]) HiveFilter(condition=[CASE(=(/(CAST($5):DOUBLE, $4), 0), false, >(/(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)), 1))]) HiveAggregate(group=[{1, 2}], agg#0=[sum($5)], agg#1=[sum($4)], agg#2=[count($3)], agg#3=[sum($3)]) HiveProject($f0=[$6], $f1=[$5], $f2=[$3], $f4=[$2], $f40=[CAST($2):DOUBLE], $f6=[*(CAST($2):DOUBLE, CAST($2):DOUBLE)]) @@ -78,7 +78,7 @@ HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], d_moy=[CAST(4):INTEGER], mean=[ HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2]) HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse]) - HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[/(CAST($5):DOUBLE, $4)], cov=[CASE(=(/(CAST($5):DOUBLE, $4), 0), null:NULL, /(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)))]) + HiveProject(w_warehouse_sk=[$0], i_item_sk=[$1], mean=[/(CAST($5):DOUBLE, $4)], cov=[CASE(=(/(CAST($5):DOUBLE, $4), 0), null:DOUBLE, /(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)))]) HiveFilter(condition=[CASE(=(/(CAST($5):DOUBLE, $4), 0), false, >(/(POWER(/(-($2, /(*($3, $3), $4)), CASE(=($4, 1), null:BIGINT, -($4, 1))), 0.5:DECIMAL(2, 1)), /(CAST($5):DOUBLE, $4)), 1))]) HiveAggregate(group=[{1, 2}], agg#0=[sum($5)], agg#1=[sum($4)], agg#2=[count($3)], agg#3=[sum($3)]) HiveProject($f0=[$6], $f1=[$5], $f2=[$3], $f4=[$2], $f40=[CAST($2):DOUBLE], $f6=[*(CAST($2):DOUBLE, CAST($2):DOUBLE)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query40.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query40.q.out index 1aa3fa83d8..f71c0b57db 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query40.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query40.q.out @@ -68,7 +68,7 @@ CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)]) - HiveProject($f0=[$1], $f1=[$14], $f2=[CASE($11, -($6, CASE(IS NOT NULL($9), $9, 0)), 0)], $f3=[CASE($12, -($6, CASE(IS NOT NULL($9), $9, 0)), 0)]) + HiveProject($f0=[$1], $f1=[$14], $f2=[CASE($11, -($6, CASE(IS NOT NULL($9), $9, 0:DECIMAL(12, 2))), 0:DECIMAL(13, 2))], $f3=[CASE($12, -($6, CASE(IS NOT NULL($9), $9, 0:DECIMAL(12, 2))), 0:DECIMAL(13, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(w_warehouse_sk=[$0], w_state=[$10]) HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query43.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query43.q.out index 6058e4ca9e..4eb819b1a1 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query43.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query43.q.out @@ -46,7 +46,7 @@ CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$4], sort5=[$5], sort6=[$6], sort7=[$7], sort8=[$8], dir0=[ASC], dir1=[ASC], dir2=[ASC], dir3=[ASC], dir4=[ASC], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC], fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)], agg#3=[sum($5)], agg#4=[sum($6)], agg#5=[sum($7)], agg#6=[sum($8)]) - HiveProject($f0=[$13], $f1=[$12], $f2=[CASE($4, $2, null:NULL)], $f3=[CASE($5, $2, null:NULL)], $f4=[CASE($6, $2, null:NULL)], $f5=[CASE($7, $2, null:NULL)], $f6=[CASE($8, $2, null:NULL)], $f7=[CASE($9, $2, null:NULL)], $f8=[CASE($10, $2, null:NULL)]) + HiveProject($f0=[$13], $f1=[$12], $f2=[CASE($4, $2, null:DECIMAL(7, 2))], $f3=[CASE($5, $2, null:DECIMAL(7, 2))], $f4=[CASE($6, $2, null:DECIMAL(7, 2))], $f5=[CASE($7, $2, null:DECIMAL(7, 2))], $f6=[CASE($8, $2, null:DECIMAL(7, 2))], $f7=[CASE($9, $2, null:DECIMAL(7, 2))], $f8=[CASE($10, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($11, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query49.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query49.q.out index af1b3321e8..b499ae96cf 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query49.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query49.q.out @@ -281,7 +281,7 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(item=[$0], return_ratio=[/(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4))], rank_window_0=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], rank_window_1=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($3):DECIMAL(15, 4), CAST($4):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)]) - HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0)], $f4=[CASE(IS NOT NULL($8), $8, 0)]) + HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0:DECIMAL(12, 2))], $f4=[CASE(IS NOT NULL($8), $8, 0:DECIMAL(12, 2))]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(wr_item_sk=[$2], wr_order_number=[$13], wr_return_quantity=[$14], wr_return_amt=[$15]) HiveFilter(condition=[>($15, 10000:DECIMAL(5, 0))]) @@ -298,7 +298,7 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(item=[$0], return_ratio=[/(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4))], rank_window_0=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], rank_window_1=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($3):DECIMAL(15, 4), CAST($4):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)]) - HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0)], $f4=[CASE(IS NOT NULL($8), $8, 0)]) + HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0:DECIMAL(12, 2))], $f4=[CASE(IS NOT NULL($8), $8, 0:DECIMAL(12, 2))]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cr_item_sk=[$2], cr_order_number=[$16], cr_return_quantity=[$17], cr_return_amount=[$18]) HiveFilter(condition=[>($18, 10000:DECIMAL(5, 0))]) @@ -315,7 +315,7 @@ HiveSortLimit(sort0=[$0], sort1=[$3], sort2=[$4], dir0=[ASC], dir1=[ASC], dir2=[ HiveProject(item=[$0], return_ratio=[/(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4))], rank_window_0=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($1):DECIMAL(15, 4), CAST($2):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], rank_window_1=[rank() OVER (PARTITION BY 0 ORDER BY /(CAST($3):DECIMAL(15, 4), CAST($4):DECIMAL(15, 4)) NULLS LAST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)], agg#3=[sum($4)]) - HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0)], $f4=[CASE(IS NOT NULL($8), $8, 0)]) + HiveProject($f0=[$5], $f1=[CASE(IS NOT NULL($2), $2, 0)], $f2=[CASE(IS NOT NULL($7), $7, 0)], $f3=[CASE(IS NOT NULL($3), $3, 0:DECIMAL(12, 2))], $f4=[CASE(IS NOT NULL($8), $8, 0:DECIMAL(12, 2))]) HiveJoin(condition=[AND(=($6, $1), =($5, $0))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9], sr_return_quantity=[$10], sr_return_amt=[$11]) HiveFilter(condition=[>($11, 10000:DECIMAL(5, 0))]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query59.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query59.q.out index 68081a558f..8d17cc79d1 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query59.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query59.q.out @@ -102,7 +102,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ HiveJoin(condition=[=($9, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)], agg#3=[sum($5)], agg#4=[sum($6)], agg#5=[sum($7)], agg#6=[sum($8)]) - HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:NULL)], $f3=[CASE($6, $2, null:NULL)], $f4=[CASE($7, $2, null:NULL)], $f5=[CASE($8, $2, null:NULL)], $f6=[CASE($9, $2, null:NULL)], $f7=[CASE($10, $2, null:NULL)], $f8=[CASE($11, $2, null:NULL)]) + HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:DECIMAL(7, 2))], $f3=[CASE($6, $2, null:DECIMAL(7, 2))], $f4=[CASE($7, $2, null:DECIMAL(7, 2))], $f5=[CASE($8, $2, null:DECIMAL(7, 2))], $f6=[CASE($9, $2, null:DECIMAL(7, 2))], $f7=[CASE($10, $2, null:DECIMAL(7, 2))], $f8=[CASE($11, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) @@ -120,7 +120,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ HiveJoin(condition=[=($8, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7]) HiveAggregate(group=[{0, 1}], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($5)], agg#3=[sum($6)], agg#4=[sum($7)], agg#5=[sum($8)]) - HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:NULL)], $f3=[CASE($6, $2, null:NULL)], $f4=[CASE($7, $2, null:NULL)], $f5=[CASE($8, $2, null:NULL)], $f6=[CASE($9, $2, null:NULL)], $f7=[CASE($10, $2, null:NULL)], $f8=[CASE($11, $2, null:NULL)]) + HiveProject($f0=[$4], $f1=[$1], $f2=[CASE($5, $2, null:DECIMAL(7, 2))], $f3=[CASE($6, $2, null:DECIMAL(7, 2))], $f4=[CASE($7, $2, null:DECIMAL(7, 2))], $f5=[CASE($8, $2, null:DECIMAL(7, 2))], $f6=[CASE($9, $2, null:DECIMAL(7, 2))], $f7=[CASE($10, $2, null:DECIMAL(7, 2))], $f8=[CASE($11, $2, null:DECIMAL(7, 2))]) HiveJoin(condition=[=($3, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_store_sk=[$7], ss_sales_price=[$13]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query66.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query66.q.out index b3de4c17df..34cddacd86 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query66.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query66.q.out @@ -463,7 +463,7 @@ HiveProject(w_warehouse_name=[$0], w_warehouse_sq_ft=[$1], w_city=[$2], w_county HiveUnion(all=[true]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8], $f9=[$9], $f10=[$10], $f11=[$11], $f12=[$12], $f13=[$13], $f14=[$14], $f15=[$15], $f16=[$16], $f17=[$17], $f18=[$18], $f19=[$19], $f20=[$20], $f21=[$21], $f22=[$22], $f23=[$23], $f24=[$24], $f25=[$25], $f26=[$26], $f27=[$27], $f28=[$28], $f29=[$29]) HiveAggregate(group=[{0, 1, 2, 3, 4, 5}], agg#0=[sum($6)], agg#1=[sum($7)], agg#2=[sum($8)], agg#3=[sum($9)], agg#4=[sum($10)], agg#5=[sum($11)], agg#6=[sum($12)], agg#7=[sum($13)], agg#8=[sum($14)], agg#9=[sum($15)], agg#10=[sum($16)], agg#11=[sum($17)], agg#12=[sum($18)], agg#13=[sum($19)], agg#14=[sum($20)], agg#15=[sum($21)], agg#16=[sum($22)], agg#17=[sum($23)], agg#18=[sum($24)], agg#19=[sum($25)], agg#20=[sum($26)], agg#21=[sum($27)], agg#22=[sum($28)], agg#23=[sum($29)]) - HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], $f5=[$6], $f7=[CASE($15, $11, 0)], $f8=[CASE($16, $11, 0)], $f9=[CASE($17, $11, 0)], $f10=[CASE($18, $11, 0)], $f11=[CASE($19, $11, 0)], $f12=[CASE($20, $11, 0)], $f13=[CASE($21, $11, 0)], $f14=[CASE($22, $11, 0)], $f15=[CASE($23, $11, 0)], $f16=[CASE($24, $11, 0)], $f17=[CASE($25, $11, 0)], $f18=[CASE($26, $11, 0)], $f19=[CASE($15, $12, 0)], $f20=[CASE($16, $12, 0)], $f21=[CASE($17, $12, 0)], $f22=[CASE($18, $12, 0)], $f23=[CASE($19, $12, 0)], $f24=[CASE($20, $12, 0)], $f25=[CASE($21, $12, 0)], $f26=[CASE($22, $12, 0)], $f27=[CASE($23, $12, 0)], $f28=[CASE($24, $12, 0)], $f29=[CASE($25, $12, 0)], $f30=[CASE($26, $12, 0)]) + HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], $f5=[$6], $f7=[CASE($15, $11, 0:DECIMAL(18, 2))], $f8=[CASE($16, $11, 0:DECIMAL(18, 2))], $f9=[CASE($17, $11, 0:DECIMAL(18, 2))], $f10=[CASE($18, $11, 0:DECIMAL(18, 2))], $f11=[CASE($19, $11, 0:DECIMAL(18, 2))], $f12=[CASE($20, $11, 0:DECIMAL(18, 2))], $f13=[CASE($21, $11, 0:DECIMAL(18, 2))], $f14=[CASE($22, $11, 0:DECIMAL(18, 2))], $f15=[CASE($23, $11, 0:DECIMAL(18, 2))], $f16=[CASE($24, $11, 0:DECIMAL(18, 2))], $f17=[CASE($25, $11, 0:DECIMAL(18, 2))], $f18=[CASE($26, $11, 0:DECIMAL(18, 2))], $f19=[CASE($15, $12, 0:DECIMAL(18, 2))], $f20=[CASE($16, $12, 0:DECIMAL(18, 2))], $f21=[CASE($17, $12, 0:DECIMAL(18, 2))], $f22=[CASE($18, $12, 0:DECIMAL(18, 2))], $f23=[CASE($19, $12, 0:DECIMAL(18, 2))], $f24=[CASE($20, $12, 0:DECIMAL(18, 2))], $f25=[CASE($21, $12, 0:DECIMAL(18, 2))], $f26=[CASE($22, $12, 0:DECIMAL(18, 2))], $f27=[CASE($23, $12, 0:DECIMAL(18, 2))], $f28=[CASE($24, $12, 0:DECIMAL(18, 2))], $f29=[CASE($25, $12, 0:DECIMAL(18, 2))], $f30=[CASE($26, $12, 0:DECIMAL(18, 2))]) HiveJoin(condition=[=($10, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2], w_warehouse_sq_ft=[$3], w_city=[$8], w_county=[$9], w_state=[$10], w_country=[$12]) HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse]) @@ -484,7 +484,7 @@ HiveProject(w_warehouse_name=[$0], w_warehouse_sq_ft=[$1], w_city=[$2], w_county HiveTableScan(table=[[default, ship_mode]], table:alias=[ship_mode]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], $f6=[$6], $f7=[$7], $f8=[$8], $f9=[$9], $f10=[$10], $f11=[$11], $f12=[$12], $f13=[$13], $f14=[$14], $f15=[$15], $f16=[$16], $f17=[$17], $f18=[$18], $f19=[$19], $f20=[$20], $f21=[$21], $f22=[$22], $f23=[$23], $f24=[$24], $f25=[$25], $f26=[$26], $f27=[$27], $f28=[$28], $f29=[$29]) HiveAggregate(group=[{0, 1, 2, 3, 4, 5}], agg#0=[sum($6)], agg#1=[sum($7)], agg#2=[sum($8)], agg#3=[sum($9)], agg#4=[sum($10)], agg#5=[sum($11)], agg#6=[sum($12)], agg#7=[sum($13)], agg#8=[sum($14)], agg#9=[sum($15)], agg#10=[sum($16)], agg#11=[sum($17)], agg#12=[sum($18)], agg#13=[sum($19)], agg#14=[sum($20)], agg#15=[sum($21)], agg#16=[sum($22)], agg#17=[sum($23)], agg#18=[sum($24)], agg#19=[sum($25)], agg#20=[sum($26)], agg#21=[sum($27)], agg#22=[sum($28)], agg#23=[sum($29)]) - HiveProject($f0=[$22], $f1=[$23], $f2=[$24], $f3=[$25], $f4=[$26], $f5=[$27], $f7=[CASE($8, $4, 0)], $f8=[CASE($9, $4, 0)], $f9=[CASE($10, $4, 0)], $f10=[CASE($11, $4, 0)], $f11=[CASE($12, $4, 0)], $f12=[CASE($13, $4, 0)], $f13=[CASE($14, $4, 0)], $f14=[CASE($15, $4, 0)], $f15=[CASE($16, $4, 0)], $f16=[CASE($17, $4, 0)], $f17=[CASE($18, $4, 0)], $f18=[CASE($19, $4, 0)], $f19=[CASE($8, $5, 0)], $f20=[CASE($9, $5, 0)], $f21=[CASE($10, $5, 0)], $f22=[CASE($11, $5, 0)], $f23=[CASE($12, $5, 0)], $f24=[CASE($13, $5, 0)], $f25=[CASE($14, $5, 0)], $f26=[CASE($15, $5, 0)], $f27=[CASE($16, $5, 0)], $f28=[CASE($17, $5, 0)], $f29=[CASE($18, $5, 0)], $f30=[CASE($19, $5, 0)]) + HiveProject($f0=[$22], $f1=[$23], $f2=[$24], $f3=[$25], $f4=[$26], $f5=[$27], $f7=[CASE($8, $4, 0:DECIMAL(18, 2))], $f8=[CASE($9, $4, 0:DECIMAL(18, 2))], $f9=[CASE($10, $4, 0:DECIMAL(18, 2))], $f10=[CASE($11, $4, 0:DECIMAL(18, 2))], $f11=[CASE($12, $4, 0:DECIMAL(18, 2))], $f12=[CASE($13, $4, 0:DECIMAL(18, 2))], $f13=[CASE($14, $4, 0:DECIMAL(18, 2))], $f14=[CASE($15, $4, 0:DECIMAL(18, 2))], $f15=[CASE($16, $4, 0:DECIMAL(18, 2))], $f16=[CASE($17, $4, 0:DECIMAL(18, 2))], $f17=[CASE($18, $4, 0:DECIMAL(18, 2))], $f18=[CASE($19, $4, 0:DECIMAL(18, 2))], $f19=[CASE($8, $5, 0:DECIMAL(18, 2))], $f20=[CASE($9, $5, 0:DECIMAL(18, 2))], $f21=[CASE($10, $5, 0:DECIMAL(18, 2))], $f22=[CASE($11, $5, 0:DECIMAL(18, 2))], $f23=[CASE($12, $5, 0:DECIMAL(18, 2))], $f24=[CASE($13, $5, 0:DECIMAL(18, 2))], $f25=[CASE($14, $5, 0:DECIMAL(18, 2))], $f26=[CASE($15, $5, 0:DECIMAL(18, 2))], $f27=[CASE($16, $5, 0:DECIMAL(18, 2))], $f28=[CASE($17, $5, 0:DECIMAL(18, 2))], $f29=[CASE($18, $5, 0:DECIMAL(18, 2))], $f30=[CASE($19, $5, 0:DECIMAL(18, 2))]) HiveJoin(condition=[=($3, $21)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($2, $20)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $7)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query77.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query77.q.out index e06aef4b13..7aebc6fcb8 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query77.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query77.q.out @@ -237,7 +237,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], agg#0=[sum($2)], agg#1=[sum($3)], agg#2=[sum($4)]) HiveProject(channel=[$0], id=[$1], sales=[$2], returns=[$3], profit=[$4]) HiveUnion(all=[true]) - HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0)], profit=[-($2, CASE(IS NOT NULL($5), $5, 0))]) + HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0:DECIMAL(17, 2))], profit=[-($2, CASE(IS NOT NULL($5), $5, 0:DECIMAL(17, 2)))]) HiveJoin(condition=[=($0, $3)], joinType=[left], algorithm=[none], cost=[not available]) HiveProject(ss_store_sk=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)]) @@ -279,7 +279,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[BETWEEN(false, CAST($2):TIMESTAMP(9), 1998-08-04 00:00:00:TIMESTAMP(9), 1998-09-03 00:00:00:TIMESTAMP(9))]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0)], profit=[-($2, CASE(IS NOT NULL($5), $5, 0))]) + HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[$0], sales=[$1], returns=[CASE(IS NOT NULL($4), $4, 0:DECIMAL(17, 2))], profit=[-($2, CASE(IS NOT NULL($5), $5, 0:DECIMAL(17, 2)))]) HiveJoin(condition=[=($0, $3)], joinType=[left], algorithm=[none], cost=[not available]) HiveProject(ws_web_page_sk=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out index 9893ebc259..d55c397844 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out @@ -132,7 +132,7 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject(ss_sold_year=[CAST(2000):INTEGER], ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[$2], store_qty=[$3], store_wholesale_cost=[$4], store_sales_price=[$5], other_chan_qty=[$6], other_chan_wholesale_cost=[$7], other_chan_sales_price=[$8]) HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$9], sort3=[$10], sort4=[$11], sort5=[$6], sort6=[$7], sort7=[$8], sort8=[$12], dir0=[ASC], dir1=[ASC], dir2=[DESC-nulls-last], dir3=[DESC-nulls-last], dir4=[DESC-nulls-last], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($11), IS NOT NULL($6)), +($11, $6), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($11), $11, 0), CASE(IS NOT NULL($6), $6, 0))], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($12), $12, 0), CASE(IS NOT NULL($7), $7, 0))], other_chan_sales_price=[+(CASE(IS NOT NULL($13), $13, 0), CASE(IS NOT NULL($8), $8, 0))], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($11), IS NOT NULL($6)), +($11, $6), 1)):DOUBLE), 2)]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($11), IS NOT NULL($6)), +($11, $6), 1:BIGINT)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($11), $11, 0:BIGINT), CASE(IS NOT NULL($6), $6, 0:BIGINT))], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($12), $12, 0:DECIMAL(17, 2)), CASE(IS NOT NULL($7), $7, 0:DECIMAL(17, 2)))], other_chan_sales_price=[+(CASE(IS NOT NULL($13), $13, 0:DECIMAL(17, 2)), CASE(IS NOT NULL($8), $8, 0:DECIMAL(17, 2)))], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($11), IS NOT NULL($6)), +($11, $6), 1:BIGINT)):DOUBLE), 2)]) HiveJoin(condition=[AND(=($9, $0), =($10, $1))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($5, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query80.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query80.q.out index 5187d2ae1d..685a200477 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query80.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query80.q.out @@ -222,7 +222,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveUnion(all=[true]) HiveProject(channel=[_UTF-16LE'store channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'store', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0)], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0))]) + HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2))], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(s_store_sk=[$0], s_store_id=[$1]) HiveTableScan(table=[[default, store]], table:alias=[store]) @@ -246,7 +246,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) HiveProject(channel=[_UTF-16LE'catalog channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'catalog_page', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0)], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0))]) + HiveProject($f0=[$1], $f1=[$8], $f2=[CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2))], $f3=[-($9, CASE(IS NOT NULL($13), $13, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($4, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cp_catalog_page_sk=[$0], cp_catalog_page_id=[$1]) HiveTableScan(table=[[default, catalog_page]], table:alias=[catalog_page]) @@ -270,7 +270,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) HiveProject(channel=[_UTF-16LE'web channel':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], id=[||(_UTF-16LE'web_site', $0)], sales=[$1], returns=[$2], profit=[$3]) HiveAggregate(group=[{0}], agg#0=[sum($1)], agg#1=[sum($2)], agg#2=[sum($3)]) - HiveProject($f0=[$15], $f1=[$7], $f2=[CASE(IS NOT NULL($11), $11, 0)], $f3=[-($8, CASE(IS NOT NULL($12), $12, 0))]) + HiveProject($f0=[$15], $f1=[$7], $f2=[CASE(IS NOT NULL($11), $11, 0:DECIMAL(12, 2))], $f3=[-($8, CASE(IS NOT NULL($12), $12, 0:DECIMAL(12, 2)))]) HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(p_promo_sk=[$0]) diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/mv_query67.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/mv_query67.q.out index cf7b13b18c..f70f1bd8d8 100644 --- a/ql/src/test/results/clientpositive/perf/tez/constraints/mv_query67.q.out +++ b/ql/src/test/results/clientpositive/perf/tez/constraints/mv_query67.q.out @@ -477,7 +477,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$4], sort5= HiveJoin(condition=[=($1, $10)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($2, $8)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_store_sk=[$7], CASE=[CASE(AND(IS NOT NULL($13), IS NOT NULL(CAST($10):DECIMAL(10, 0))), *($13, CAST($10):DECIMAL(10, 0)), 0)]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_store_sk=[$7], CASE=[CASE(AND(IS NOT NULL($13), IS NOT NULL(CAST($10):DECIMAL(10, 0))), *($13, CAST($10):DECIMAL(10, 0)), 0:DECIMAL(18, 2))]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8], d_qoy=[$10]) diff --git a/ql/src/test/results/clientpositive/semijoin5.q.out b/ql/src/test/results/clientpositive/semijoin5.q.out index a193428534..3d41ca6360 100644 --- a/ql/src/test/results/clientpositive/semijoin5.q.out +++ b/ql/src/test/results/clientpositive/semijoin5.q.out @@ -182,7 +182,7 @@ STAGE PLANS: window frame: ROWS PRECEDING(MAX)~FOLLOWING(48) Statistics: Num rows: 1 Data size: 212 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: 498 (type: int), (_col7 + UDFToInteger(_col5)) (type: int), floor(_col3) (type: bigint), CASE WHEN (sum_window_0 is not null) THEN (sum_window_0) ELSE (704) END (type: bigint) + expressions: 498 (type: int), (_col7 + UDFToInteger(_col5)) (type: int), floor(_col3) (type: bigint), CASE WHEN (sum_window_0 is not null) THEN (sum_window_0) ELSE (704L) END (type: bigint) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 212 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git a/ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out b/ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out index 0f794950b5..a841aca6d4 100644 --- a/ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out +++ b/ql/src/test/results/clientpositive/spark/parquet_vectorization_3.q.out @@ -145,7 +145,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) + expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Select Vectorization: className: VectorSelectOperator diff --git a/ql/src/test/results/clientpositive/spark/subquery_select.q.out b/ql/src/test/results/clientpositive/spark/subquery_select.q.out index 1b1528b868..b201eb36f2 100644 --- a/ql/src/test/results/clientpositive/spark/subquery_select.q.out +++ b/ql/src/test/results/clientpositive/spark/subquery_select.q.out @@ -3928,10 +3928,14 @@ STAGE PLANS: mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: + Select Operator + expressions: UDFToDouble(_col0) (type: double) + outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: double) Reducer 2 Reduce Operator Tree: Join Operator diff --git a/ql/src/test/results/clientpositive/spark/vectorization_3.q.out b/ql/src/test/results/clientpositive/spark/vectorization_3.q.out index f89a821a56..68dbc5f230 100644 --- a/ql/src/test/results/clientpositive/spark/vectorization_3.q.out +++ b/ql/src/test/results/clientpositive/spark/vectorization_3.q.out @@ -160,7 +160,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) + expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Select Vectorization: className: VectorSelectOperator diff --git a/ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out b/ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out index fbcdb7bda7..60e25815f1 100644 --- a/ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out +++ b/ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out @@ -2566,7 +2566,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 1327 Data size: 314038 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END) (type: double), (2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), _col4 (type: bigint), ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D) (type: double), ((- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) * ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D)) (type: double), _col5 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / _col3) (type: double), (_col0 - (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END))) (type: double), power(((_col1 - ((_col2 * _col2) / _col3)) / _col3), 0.5) (type: double), (_col0 + ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (_col0 * 762.0D) (type: double), _col2 (type: double), (-863.257D % (_col0 * 762.0D)) (type: double) + expressions: _col0 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END) (type: double), (2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), _col4 (type: bigint), ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) + -5638.15D) (type: double), ((- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) * ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (UDFToLong(null)) ELSE ((_col3 - 1)) END)) + -5638.15D)) (type: double), _col5 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / _col3) (type: double), (_col0 - (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END))) (type: double), power(((_col1 - ((_col2 * _col2) / _col3)) / _col3), 0.5) (type: double), (_col0 + ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (_col0 * 762.0D) (type: double), _col2 (type: double), (-863.257D % (_col0 * 762.0D)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 Select Vectorization: className: VectorSelectOperator diff --git a/ql/src/test/results/clientpositive/spark/vectorized_case.q.out b/ql/src/test/results/clientpositive/spark/vectorized_case.q.out index b1c7cc3005..19c6016ffa 100644 --- a/ql/src/test/results/clientpositive/spark/vectorized_case.q.out +++ b/ql/src/test/results/clientpositive/spark/vectorized_case.q.out @@ -688,13 +688,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN (1) ELSE ((attr + 2)) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN (CAST( 1 AS decimal(11,0))) ELSE ((attr + 2)) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + projectedOutputColumnNums: [8] + selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(11,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 Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -721,7 +721,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(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator @@ -772,13 +772,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (2) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (CAST( 2 AS decimal(11,0))) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + 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 Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -805,7 +805,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(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator diff --git a/ql/src/test/results/clientpositive/union_offcbo.q.out b/ql/src/test/results/clientpositive/union_offcbo.q.out index 76d99da9d8..53aa2648f5 100644 --- a/ql/src/test/results/clientpositive/union_offcbo.q.out +++ b/ql/src/test/results/clientpositive/union_offcbo.q.out @@ -644,7 +644,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and (CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END <> 'RET')) (type: boolean) + predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and ((_col0 is null and (_col3 >= '2016-02-05')) or (_col0 is null and (_col3 <= '2016-02-05')) is not true)) (type: boolean) Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) @@ -739,7 +739,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) and (CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END <> 'RET')) (type: boolean) + predicate: ((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) (type: boolean) Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) @@ -1713,7 +1713,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and (CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END <> 'RET')) (type: boolean) + predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and ((_col0 is null and (_col3 >= '2016-02-05')) or (_col0 is null and (_col3 <= '2016-02-05')) is not true)) (type: boolean) Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) @@ -1806,7 +1806,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) and (CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END <> 'RET')) (type: boolean) + predicate: ((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) (type: boolean) Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) diff --git a/ql/src/test/results/clientpositive/vector_case_when_1.q.out b/ql/src/test/results/clientpositive/vector_case_when_1.q.out index bedfd548ca..d6c8a3dac0 100644 --- a/ql/src/test/results/clientpositive/vector_case_when_1.q.out +++ b/ql/src/test/results/clientpositive/vector_case_when_1.q.out @@ -206,13 +206,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 21, 26, 30, 34, 38, 42, 44, 46, 48, 50, 52, 54, 58, 61, 64, 67] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date + selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -539,13 +539,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 24, 33, 40, 44, 49, 53, 55, 57, 59, 61, 63, 65, 69, 72, 75, 78] - selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date + projectedOutputColumnNums: [4, 24, 33, 40, 44, 48, 52, 54, 56, 58, 60, 62, 64, 68, 71, 74, 77] + selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleScalar(col 45:boolean, col 47:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double) -> 48:double, IfExprDoubleColumnDoubleScalar(col 49:boolean, col 51:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 49:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 50:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 50:double) -> 51:double) -> 52:double, IfExprNullColumn(col 53:boolean, null, col 78)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 53:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 78:decimal(10,2)) -> 54:decimal(10,2), IfExprColumnNull(col 55:boolean, col 79:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 55:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 56:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 57:boolean) -> 58:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 59:boolean) -> 60:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 61:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 61:boolean) -> 62:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 63:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 63:boolean) -> 64:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 65:boolean, col 66:timestampcol 67:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 65:boolean, CastDateToTimestamp(col 12:date) -> 66:timestamp, CastDateToTimestamp(col 11:date) -> 67:timestamp) -> 68:timestamp, IfExprColumnNull(col 69:boolean, col 70:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 69:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 70:int) -> 71:int, IfExprNullColumn(col 72:boolean, null, col 73)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 72:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 73:int) -> 74:int, IfExprLongScalarLongScalar(col 76:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 75:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 75:int) -> 76:boolean) -> 77:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -572,7 +572,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, bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, string, string, string, string, string, bigint, bigint, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] Stage: Stage-0 Fetch Operator @@ -872,13 +872,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((l_shipinstruct = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 27, 39, 48, 52, 57, 62, 64, 66, 71, 76, 78, 80, 84, 87, 90, 93] - selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string) -> 46:string) -> 47:string) -> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, IfExprCondExprCondExpr(col 53:boolean, col 55:doublecol 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 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) -> 93:date + selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 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, IfExprCondExprColumn(col 53:boolean, col 55:double, col 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((l_shipinstruct = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((l_shipinstruct = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val DELIVER IN PERSON) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualVarCharScalar(col 13:varchar(20), val TAKE BACK RETURN) -> 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) -> 93:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false diff --git a/ql/src/test/results/clientpositive/vector_case_when_2.q.out b/ql/src/test/results/clientpositive/vector_case_when_2.q.out index aba9ff2e11..c2ad887f6d 100644 --- a/ql/src/test/results/clientpositive/vector_case_when_2.q.out +++ b/ql/src/test/results/clientpositive/vector_case_when_2.q.out @@ -839,3 +839,395 @@ ctimestamp1 ctimestamp2 ctimestamp2_description ctimestamp2_description_2 ctimes 9209-11-11 04:08:58.223768453 9209-11-10 02:05:54.223768453 Unknown NULL NULL 9209 2018-03-08 23:04:59 8 NULL 9209-11-12 9403-01-09 18:12:33.547 9403-01-08 16:09:29.547 Unknown NULL NULL 9403 2018-03-08 23:04:59 12 NULL 9404-01-09 NULL NULL Unknown NULL NULL NULL 2018-03-08 23:04:59 NULL NULL NULL +PREHOOK: query: create temporary table foo(q548284 int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@foo +POSTHOOK: query: create temporary table foo(q548284 int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@foo +PREHOOK: query: insert into foo values(1),(2),(3),(4),(5),(6) +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +PREHOOK: Output: default@foo +POSTHOOK: query: insert into foo values(1),(2),(3),(4),(5),(6) +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +POSTHOOK: Output: default@foo +POSTHOOK: Lineage: foo.q548284 SCRIPT [] +col1 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 + Map Reduce + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:q548284:int, 1:ROW__ID:struct] + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 1)) THEN (0.2) WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 16] + selectExpressions: IfExprColumnCondExpr(col 2:boolean, col 3:decimal(11,1)col 15:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 1) -> 2:boolean, ConstantVectorExpression(val 0.2) -> 3:decimal(11,1), IfExprColumnCondExpr(col 4:boolean, col 5:decimal(11,1)col 14:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 2) -> 4:boolean, ConstantVectorExpression(val 0.4) -> 5:decimal(11,1), IfExprColumnCondExpr(col 6:boolean, col 7:decimal(11,1)col 13:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 3) -> 6:boolean, ConstantVectorExpression(val 0.6) -> 7:decimal(11,1), IfExprColumnCondExpr(col 8:boolean, col 9:decimal(11,1)col 12:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 4) -> 8:boolean, ConstantVectorExpression(val 0.8) -> 9:decimal(11,1), IfExprColumnNull(col 10:boolean, col 11:decimal(11,1), null)(children: LongColEqualLongScalar(col 0:int, val 5) -> 10:boolean, ConstantVectorExpression(val 1) -> 11:decimal(11,1)) -> 12:decimal(11,1)) -> 13:decimal(11,1)) -> 14:decimal(11,1)) -> 15:decimal(11,1)) -> 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + 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: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: vectorized + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + includeColumns: [0] + dataColumns: q548284:int + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1)] + Reduce Vectorization: + enabled: false + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true + enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 0.2 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 + Map Reduce + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + notVectorizedReason: SELECT operator: Could not instantiate IfExprDecimalScalarColumn with arguments arguments: [6, 10, 9, 11], argument classes: [Integer, Integer, Integer, Integer], exception: java.lang.IllegalArgumentException: argument type mismatch stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:423), org.apache.hadoop.hive.ql.exec.vector.VectorizationContext.instantiateExpression(VectorizationContext.java:2200), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4796), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4736), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.vectorizeSelectOperator(Vectorizer.java:4718), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperator(Vectorizer.java:5322), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChild(Vectorizer.java:983), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChildren(Vectorizer.java:869), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperatorTree(Vectorizer.java:836), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.access$2400(Vectorizer.java:247), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2118), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2070), ... + vectorized: false + Reduce Vectorization: + enabled: false + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true + enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 8.0 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 + Map Reduce + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:q548284:int, 1:ROW__ID:struct] + Select Operator + expressions: q548284 (type: int), CASE WHEN ((q548284 = 1)) THEN (CAST( 0.2 AS decimal(11,1))) WHEN ((q548284 = 2)) THEN (CAST( 0.4 AS decimal(11,1))) WHEN ((q548284 = 3)) THEN (CAST( 0.6 AS decimal(11,1))) WHEN ((q548284 = 4)) THEN (CAST( 0.8 AS decimal(11,1))) WHEN ((q548284 = 5)) THEN (CAST( 1 AS decimal(11,1))) ELSE (null) END (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [0, 16] + selectExpressions: IfExprColumnCondExpr(col 2:boolean, col 3:decimal(11,1)col 15:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 1) -> 2:boolean, ConstantVectorExpression(val 0.2) -> 3:decimal(11,1), IfExprColumnCondExpr(col 4:boolean, col 5:decimal(11,1)col 14:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 2) -> 4:boolean, ConstantVectorExpression(val 0.4) -> 5:decimal(11,1), IfExprColumnCondExpr(col 6:boolean, col 7:decimal(11,1)col 13:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 3) -> 6:boolean, ConstantVectorExpression(val 0.6) -> 7:decimal(11,1), IfExprColumnCondExpr(col 8:boolean, col 9:decimal(11,1)col 12:decimal(11,1))(children: LongColEqualLongScalar(col 0:int, val 4) -> 8:boolean, ConstantVectorExpression(val 0.8) -> 9:decimal(11,1), IfExprColumnNull(col 10:boolean, col 11:decimal(11,1), null)(children: LongColEqualLongScalar(col 0:int, val 5) -> 10:boolean, ConstantVectorExpression(val 1) -> 11:decimal(11,1)) -> 12:decimal(11,1)) -> 13:decimal(11,1)) -> 14:decimal(11,1)) -> 15:decimal(11,1)) -> 16:decimal(11,1) + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + 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: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Execution mode: vectorized + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + includeColumns: [0] + dataColumns: q548284:int + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), bigint, decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1), decimal(11,1)] + Reduce Vectorization: + enabled: false + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true + enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) + WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) + THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 0.2 +PREHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) + WHEN ((q548284 = 5)) THEN (1) ELSE (8) END from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +Explain +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 + Map Reduce + Map Operator Tree: + TableScan + alias: foo + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: q548284 (type: int), CAST( CASE WHEN ((q548284 = 4)) THEN (CAST( 0.8 AS decimal(2,1))) WHEN ((q548284 = 5)) THEN (CAST( 1 AS decimal(2,1))) ELSE (CAST( 8 AS decimal(2,1))) END AS decimal(11,1)) (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + value expressions: _col1 (type: decimal(11,1)) + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vector.serde.deserialize IS true + inputFileFormats: org.apache.hadoop.mapred.TextInputFormat + notVectorizedReason: SELECT operator: Could not instantiate IfExprDecimalScalarColumn with arguments arguments: [6, 11, 9, 12], argument classes: [Integer, Integer, Integer, Integer], exception: java.lang.IllegalArgumentException: argument type mismatch stack trace: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:423), org.apache.hadoop.hive.ql.exec.vector.VectorizationContext.instantiateExpression(VectorizationContext.java:2200), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4796), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4752), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.fixDecimalDataTypePhysicalVariations(Vectorizer.java:4736), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.vectorizeSelectOperator(Vectorizer.java:4718), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperator(Vectorizer.java:5322), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChild(Vectorizer.java:983), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.doProcessChildren(Vectorizer.java:869), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.validateAndVectorizeOperatorTree(Vectorizer.java:836), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.access$2400(Vectorizer.java:247), org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapOperators(Vectorizer.java:2118), ... + vectorized: false + Reduce Vectorization: + enabled: false + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true + enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(11,1)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 1 + Processor Tree: + ListSink + +PREHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@foo +#### A masked pattern was here #### +POSTHOOK: query: select q548284, CASE WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (8) END + from foo order by q548284 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@foo +#### A masked pattern was here #### +q548284 _c1 +1 8.0 diff --git a/ql/src/test/results/clientpositive/vector_coalesce.q.out b/ql/src/test/results/clientpositive/vector_coalesce.q.out index eac2d434f3..1ab2d6ebb1 100644 --- a/ql/src/test/results/clientpositive/vector_coalesce.q.out +++ b/ql/src/test/results/clientpositive/vector_coalesce.q.out @@ -125,7 +125,7 @@ STAGE PLANS: className: VectorSelectOperator native: true projectedOutputColumnNums: [5, 2, 20] - selectExpressions: IfExprCondExprCondExpr(col 16:boolean, col 18:doublecol 19:double)(children: ColAndCol(col 13:boolean, col 15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 17:double)(children: FuncLog2LongToDouble(col 2:int) -> 17:double) -> 18:double, ConstantVectorExpression(val 0.0) -> 19:double) -> 20:double + selectExpressions: IfExprCondExprColumn(col 16:boolean, col 18:double, col 19:double)(children: ColAndCol(col 13:boolean, col 15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 17:double)(children: FuncLog2LongToDouble(col 2:int) -> 17:double) -> 18:double, ConstantVectorExpression(val 0.0) -> 19:double) -> 20:double Reduce Sink Vectorization: className: VectorReduceSinkOperator native: false diff --git a/ql/src/test/results/clientpositive/vectorization_3.q.out b/ql/src/test/results/clientpositive/vectorization_3.q.out index a8dc7a63ff..0fc6326d0b 100644 --- a/ql/src/test/results/clientpositive/vectorization_3.q.out +++ b/ql/src/test/results/clientpositive/vectorization_3.q.out @@ -137,7 +137,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) + expressions: power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D) (type: double), power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- power(((_col3 - ((_col4 * _col4) / _col5)) / _col5), 0.5)) (type: double), (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) % 79.553D) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) (type: double), power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5) (type: double), (- power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), _col9 (type: double), ((- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) * (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D))) / (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (UDFToLong(null)) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (- (power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5) - 10.175D)) (type: double), (UDFToDouble(_col10) / _col11) (type: double), (-3728.0D - power(((_col0 - ((_col1 * _col1) / _col2)) / CASE WHEN ((_col2 = 1L)) THEN (null) ELSE ((_col2 - 1)) END), 0.5)) (type: double), power(((_col12 - ((_col13 * _col13) / _col11)) / _col11), 0.5) (type: double), ((UDFToDouble(_col10) / _col11) / power(((_col6 - ((_col7 * _col7) / _col8)) / CASE WHEN ((_col8 = 1L)) THEN (null) ELSE ((_col8 - 1)) END), 0.5)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 1 Data size: 128 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator diff --git a/ql/src/test/results/clientpositive/vectorized_case.q.out b/ql/src/test/results/clientpositive/vectorized_case.q.out index 3892f7da4f..c6ffd70aa6 100644 --- a/ql/src/test/results/clientpositive/vectorized_case.q.out +++ b/ql/src/test/results/clientpositive/vectorized_case.q.out @@ -624,13 +624,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN (1) ELSE ((attr + 2)) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN (CAST( 1 AS decimal(11,0))) ELSE ((attr + 2)) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + projectedOutputColumnNums: [8] + selectExpressions: IfExprDecimal64ScalarDecimal64Column(col 6:boolean, decimal64Val 1, decimalVal 1, col 7:decimal(11,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 Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -657,7 +657,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(11,0)/DECIMAL_64, bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)/DECIMAL_64, bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator @@ -705,13 +705,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64, 2:ROW__ID:struct] Select Operator - expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (2) END (type: decimal(11,0)) + expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (CAST( 2 AS decimal(11,0))) END (type: decimal(11,0)) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator native: true - 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) + 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 Statistics: Num rows: 3 Data size: 336 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -738,7 +738,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(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), decimal(11,0), decimal(11,0)] + scratchColumnTypeNames: [bigint, decimal(11,0)/DECIMAL_64, decimal(11,0), bigint, decimal(11,0)/DECIMAL_64, decimal(11,0)/DECIMAL_64] Stage: Stage-0 Fetch Operator