diff --git itests/src/test/resources/testconfiguration.properties itests/src/test/resources/testconfiguration.properties index 98280c52fe..0b42df40d6 100644 --- itests/src/test/resources/testconfiguration.properties +++ itests/src/test/resources/testconfiguration.properties @@ -805,6 +805,7 @@ minillaplocal.query.files=\ union_top_level.q,\ update_access_time_non_current_db.q, \ vector_acid4.q,\ + vector_and_or_scalar_col.q,\ vector_annotate_stats_select.q,\ vector_auto_smb_mapjoin_14.q,\ vector_case_when_conversion.q,\ diff --git ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt index 60dc7259ff..4f531169b7 100644 --- ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt +++ ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt @@ -29,8 +29,8 @@ import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor; import org.apache.hadoop.hive.ql.metadata.HiveException; /** - * Generated from template ColumnCompareScalar.txt, which covers binary comparison - * expressions between a column and a scalar. The boolean output is stored in a + * Generated from template ScalarCompareColumn.txt, which covers binary comparison + * expressions between a scalar and a column. The boolean output is stored in a * separate boolean column. */ public class extends VectorExpression { diff --git ql/src/gen/vectorization/ExpressionTemplates/ScalarDivideColumn.txt ql/src/gen/vectorization/ExpressionTemplates/ScalarDivideColumn.txt index 3cb7aaa10a..4e32955fd0 100644 --- ql/src/gen/vectorization/ExpressionTemplates/ScalarDivideColumn.txt +++ ql/src/gen/vectorization/ExpressionTemplates/ScalarDivideColumn.txt @@ -36,7 +36,7 @@ import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil; import org.apache.hadoop.hive.ql.metadata.HiveException; /** - * Generated from template ScalarArithmeticColumn.txt. + * Generated from template ScalarDivideColumn.txt. * Implements a vectorized arithmetic operator with a scalar on the left and a * column vector on the right. The result is output to an output column vector. */ diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExpressionDescriptor.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExpressionDescriptor.java index fb40f5e422..e8e0f64b5d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExpressionDescriptor.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExpressionDescriptor.java @@ -171,7 +171,8 @@ public boolean isSameTypeOrFamily(ArgumentType other) { NONE(0), COLUMN(1), SCALAR(2), - DYNAMICVALUE(3); + DYNAMICVALUE(3), + NULLSCALAR(4); private final int value; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java index d5257c76c4..4ba2c1b7e9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java @@ -1966,10 +1966,10 @@ private VectorExpression getVectorExpressionForUdf(GenericUDF genericUdf, builder.setInputExpressionType(i, InputExpressionType.COLUMN); } else if (child instanceof ExprNodeConstantDesc) { if (isNullConst(child)) { - // Cannot handle NULL scalar parameter. - return null; + builder.setInputExpressionType(i, InputExpressionType.NULLSCALAR); + }else { + builder.setInputExpressionType(i, InputExpressionType.SCALAR); } - builder.setInputExpressionType(i, InputExpressionType.SCALAR); } else if (child instanceof ExprNodeDynamicValueDesc) { builder.setInputExpressionType(i, InputExpressionType.DYNAMICVALUE); } else { @@ -4067,10 +4067,10 @@ private Object getScalarValue(ExprNodeConstantDesc constDesc) } else if (varcharTypePattern.matcher(typeString).matches()) { return ((HiveVarchar) constDesc.getValue()).getValue().getBytes(StandardCharsets.UTF_8); } else if (typeString.equalsIgnoreCase("boolean")) { - if (constDesc.getValue().equals(Boolean.TRUE)) { - return 1; - } else { - return 0; + if (constDesc.getValue() == null) { + return null; + }else{ + return constDesc.getValue().equals(Boolean.TRUE) ? 1 : 0; } } else if (decimalTypePattern.matcher(typeString).matches()) { return constDesc.getValue(); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java index c6b52faa98..8442f448dd 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java @@ -57,6 +57,11 @@ public void evaluate(VectorizedRowBatch batch) throws HiveException { LongColumnVector inputColVector1 = (LongColumnVector) batch.cols[colNum1]; LongColumnVector inputColVector2 = (LongColumnVector) batch.cols[colNum2]; + doEvaluate(batch, inputColVector1, inputColVector2); + } + + protected void doEvaluate(VectorizedRowBatch batch, LongColumnVector inputColVector1, + LongColumnVector inputColVector2) { int[] sel = batch.selected; int n = batch.size; long[] vector1 = inputColVector1.vector; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java index 6d816d15b0..19fc2896d2 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java @@ -60,6 +60,11 @@ public void evaluate(VectorizedRowBatch batch) throws HiveException { LongColumnVector inputColVector1 = (LongColumnVector) batch.cols[colNum1]; LongColumnVector inputColVector2 = (LongColumnVector) batch.cols[colNum2]; + doEvaluate(batch, inputColVector1, inputColVector2); + } + + protected void doEvaluate(VectorizedRowBatch batch, LongColumnVector inputColVector1, + LongColumnVector inputColVector2) { int[] sel = batch.selected; int n = batch.size; long[] vector1 = inputColVector1.vector; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java index 94a07d30b3..647936e30d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java @@ -38,8 +38,6 @@ import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; -import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; -import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; /** * Constant is represented as a vector with repeating values. @@ -524,4 +522,8 @@ public String vectorExpressionParameters() { public VectorExpressionDescriptor.Descriptor getDescriptor() { return (new VectorExpressionDescriptor.Builder()).build(); } + + public boolean getIsNullValue() { + return isNullValue; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullAndCol.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullAndCol.java new file mode 100644 index 0000000000..5f304595ee --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullAndCol.java @@ -0,0 +1,52 @@ +package org.apache.hadoop.hive.ql.exec.vector.expressions; + +import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector; +import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor; +import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class ScalarNullAndCol extends ColAndCol { + private static final long serialVersionUID = 1L; + protected final int colNum; + + public ScalarNullAndCol(ConstantVectorExpression expression, int colNum, int outputColumnNum) { + super(colNum, -1, outputColumnNum); + this.colNum = colNum; + } + + public ScalarNullAndCol() { + super(); + colNum = -1; + } + + @Override + public void evaluate(VectorizedRowBatch batch) throws HiveException { + if (childExpressions != null) { + super.evaluateChildren(batch); + } + + LongColumnVector inputColVector = (LongColumnVector) batch.cols[colNum]; + + super.doEvaluate(batch, new LongColumnVector(inputColVector.vector.length).fillWithNulls(), + inputColVector); + } + + @Override + public String vectorExpressionParameters() { + return getColumnParamString(0, colNum) + ", " + getLongValueParamString(1, 0); + } + + @Override + public VectorExpressionDescriptor.Descriptor getDescriptor() { + return (new VectorExpressionDescriptor.Builder()) + .setMode( + VectorExpressionDescriptor.Mode.PROJECTION) + .setNumArguments(2) + .setArgumentTypes( + VectorExpressionDescriptor.ArgumentType.getType("long"), + VectorExpressionDescriptor.ArgumentType.getType("long")) + .setInputExpressionTypes( + VectorExpressionDescriptor.InputExpressionType.NULLSCALAR, + VectorExpressionDescriptor.InputExpressionType.COLUMN).build(); + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullOrCol.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullOrCol.java new file mode 100644 index 0000000000..7173e0ef4a --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ScalarNullOrCol.java @@ -0,0 +1,52 @@ +package org.apache.hadoop.hive.ql.exec.vector.expressions; + +import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector; +import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor; +import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class ScalarNullOrCol extends ColOrCol { + private static final long serialVersionUID = 1L; + protected final int colNum; + + public ScalarNullOrCol(ConstantVectorExpression expression, int colNum, int outputColumnNum) { + super(colNum, -1, outputColumnNum); + this.colNum = colNum; + } + + public ScalarNullOrCol() { + super(); + colNum = -1; + } + + @Override + public void evaluate(VectorizedRowBatch batch) throws HiveException { + if (childExpressions != null) { + super.evaluateChildren(batch); + } + + LongColumnVector inputColVector = (LongColumnVector) batch.cols[colNum]; + + super.doEvaluate(batch, new LongColumnVector(inputColVector.vector.length).fillWithNulls(), + inputColVector); + } + + @Override + public String vectorExpressionParameters() { + return getColumnParamString(0, colNum) + ", " + getLongValueParamString(1, 0); + } + + @Override + public VectorExpressionDescriptor.Descriptor getDescriptor() { + return (new VectorExpressionDescriptor.Builder()) + .setMode( + VectorExpressionDescriptor.Mode.PROJECTION) + .setNumArguments(2) + .setArgumentTypes( + VectorExpressionDescriptor.ArgumentType.getType("long"), + VectorExpressionDescriptor.ArgumentType.getType("long")) + .setInputExpressionTypes( + VectorExpressionDescriptor.InputExpressionType.NULLSCALAR, + VectorExpressionDescriptor.InputExpressionType.COLUMN).build(); + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPAnd.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPAnd.java index d1777afba5..dd6df67285 100644 --- ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPAnd.java +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPAnd.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterColAndScalar; import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterExprAndExpr; import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterScalarAndColumn; +import org.apache.hadoop.hive.ql.exec.vector.expressions.ScalarNullAndCol; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.udf.UDFType; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -37,7 +38,7 @@ * GenericUDF Class for computing and. */ @Description(name = "and", value = "a1 _FUNC_ a2 _FUNC_ ... _FUNC_ an - Logical and") -@VectorizedExpressions({ColAndCol.class, FilterExprAndExpr.class, FilterColAndScalar.class, +@VectorizedExpressions({ColAndCol.class, ScalarNullAndCol.class, FilterExprAndExpr.class, FilterColAndScalar.class, FilterScalarAndColumn.class}) @NDV(maxNdv = 2) @UDFType(deterministic = true, commutative = true) diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPOr.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPOr.java index 5b0bdc2c41..cb85566161 100644 --- ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPOr.java +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPOr.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterColOrScalar; import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterExprOrExpr; import org.apache.hadoop.hive.ql.exec.vector.expressions.FilterScalarOrColumn; +import org.apache.hadoop.hive.ql.exec.vector.expressions.ScalarNullOrCol; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.udf.UDFType; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -37,8 +38,8 @@ * GenericUDF Class for computing or. */ @Description(name = "or", value = "a1 _FUNC_ a2 _FUNC_ ... _FUNC_ an - Logical or") -@VectorizedExpressions({ColOrCol.class, FilterExprOrExpr.class, FilterColOrScalar.class, - FilterScalarOrColumn.class}) +@VectorizedExpressions({ ColOrCol.class, ScalarNullOrCol.class, FilterExprOrExpr.class, + FilterColOrScalar.class, FilterScalarOrColumn.class }) @NDV(maxNdv = 2) @UDFType(deterministic = true, commutative = true) public class GenericUDFOPOr extends GenericUDF { diff --git ql/src/test/queries/clientpositive/vector_and_or_scalar_col.q ql/src/test/queries/clientpositive/vector_and_or_scalar_col.q new file mode 100644 index 0000000000..5a4a88d2c0 --- /dev/null +++ ql/src/test/queries/clientpositive/vector_and_or_scalar_col.q @@ -0,0 +1,85 @@ +--! qt:dataset:src +set hive.explain.user=false; +set hive.vectorized.execution.enabled=true; +set hive.fetch.task.conversion=none; +set hive.test.vectorizer.suppress.fatal.exceptions=false; + +drop table if exists vector_and_or; +create table vector_and_or (dt1 date, dt2 date) stored as orc; + +insert into table vector_and_or + select null, null from src limit 1; +insert into table vector_and_or + select date '1999-12-31', date '2000-01-01' from src limit 1; +insert into table vector_and_or + select date '2001-01-01', date '2001-06-01' from src limit 1; + +select '*** OR ***'; +-- select null explicitly + +explain vectorization detail select null or dt1 is not null from vector_and_or; +select '*** vectorized null or dt1 is not null ***'; +select null or dt1 is not null from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized null or dt1 is not null ***'; +select null or dt1 is not null from vector_and_or; +set hive.vectorized.execution.enabled=true; + + +-- select boolean constant, already vectorized + +explain vectorization detail select false or dt1 is not null from vector_and_or; +select '*** vectorized false or dt1 is not null ***'; +select false or dt1 is not null from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized false or dt1 is not null ***'; +select false or dt1 is not null from vector_and_or; +set hive.vectorized.execution.enabled=true; + +-- select dt1 = dt1 which is translated to "null or ..." after HIVE-21001 + +explain vectorization detail select dt1 = dt1 from vector_and_or; +select '*** vectorized dt1=dt1 ***'; +select dt1 = dt1 from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized dt1=dt1 ***'; +select dt1 = dt1 from vector_and_or; +set hive.vectorized.execution.enabled=true; + + +select '*** AND ***'; +-- select null explicitly + +explain vectorization detail select null and dt1 is null from vector_and_or; +select '*** vectorized null and dt1 is null ***'; +select null and dt1 is null from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized null and dt1 is null ***'; +select null and dt1 is null from vector_and_or; +set hive.vectorized.execution.enabled=true; + + +-- select boolean constant, already vectorized + +explain vectorization detail select true and dt1 is null from vector_and_or; +select '*** vectorized true and dt1 is null ***'; +select true and dt1 is null from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized true and dt1 is null ***'; +select true and dt1 is null from vector_and_or; +set hive.vectorized.execution.enabled=true; + +-- select dt1 != dt1 which is translated to "null and ..." after HIVE-21001 + +explain vectorization detail select dt1 != dt1 from vector_and_or; +select '*** vectorized dt1!=dt1 ***'; +select dt1 != dt1 from vector_and_or; + +set hive.vectorized.execution.enabled=false; +select '*** non-vectorized dt1!=dt1 ***'; +select dt1 != dt1 from vector_and_or; \ No newline at end of file diff --git ql/src/test/results/clientpositive/llap/vector_and_or_scalar_col.q.out ql/src/test/results/clientpositive/llap/vector_and_or_scalar_col.q.out new file mode 100644 index 0000000000..22dee08c45 --- /dev/null +++ ql/src/test/results/clientpositive/llap/vector_and_or_scalar_col.q.out @@ -0,0 +1,738 @@ +PREHOOK: query: drop table if exists vector_and_or +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table if exists vector_and_or +POSTHOOK: type: DROPTABLE +PREHOOK: query: create table vector_and_or (dt1 date, dt2 date) stored as orc +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@vector_and_or +POSTHOOK: query: create table vector_and_or (dt1 date, dt2 date) stored as orc +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@vector_and_or +PREHOOK: query: insert into table vector_and_or + select null, null from src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@vector_and_or +POSTHOOK: query: insert into table vector_and_or + select null, null from src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@vector_and_or +POSTHOOK: Lineage: vector_and_or.dt1 EXPRESSION [] +POSTHOOK: Lineage: vector_and_or.dt2 EXPRESSION [] +PREHOOK: query: insert into table vector_and_or + select date '1999-12-31', date '2000-01-01' from src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@vector_and_or +POSTHOOK: query: insert into table vector_and_or + select date '1999-12-31', date '2000-01-01' from src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@vector_and_or +POSTHOOK: Lineage: vector_and_or.dt1 SIMPLE [] +POSTHOOK: Lineage: vector_and_or.dt2 SIMPLE [] +PREHOOK: query: insert into table vector_and_or + select date '2001-01-01', date '2001-06-01' from src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@vector_and_or +POSTHOOK: query: insert into table vector_and_or + select date '2001-01-01', date '2001-06-01' from src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@vector_and_or +POSTHOOK: Lineage: vector_and_or.dt1 SIMPLE [] +POSTHOOK: Lineage: vector_and_or.dt2 SIMPLE [] +PREHOOK: query: select '*** OR ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** OR ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** OR *** +PREHOOK: query: explain vectorization detail select null or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select null or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: (null or dt1 is not null) (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5] + selectExpressions: ScalarNullOrCol(col 4:boolean, val 0:boolean)(children: IsNotNull(col 0:date) -> 4:boolean) -> 5:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized null or dt1 is not null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized null or dt1 is not null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized null or dt1 is not null *** +PREHOOK: query: select null or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select null or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +NULL +PREHOOK: query: select '*** non-vectorized null or dt1 is not null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized null or dt1 is not null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized null or dt1 is not null *** +PREHOOK: query: select null or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select null or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +NULL +PREHOOK: query: explain vectorization detail select false or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select false or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: dt1 is not null (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [3] + selectExpressions: IsNotNull(col 0:date) -> 3:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized false or dt1 is not null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized false or dt1 is not null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized false or dt1 is not null *** +PREHOOK: query: select false or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select false or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +false +PREHOOK: query: select '*** non-vectorized false or dt1 is not null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized false or dt1 is not null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized false or dt1 is not null *** +PREHOOK: query: select false or dt1 is not null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select false or dt1 is not null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +false +PREHOOK: query: explain vectorization detail select dt1 = dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select dt1 = dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: (null or dt1 is not null) (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5] + selectExpressions: ScalarNullOrCol(col 4:boolean, val 0:boolean)(children: IsNotNull(col 0:date) -> 4:boolean) -> 5:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized dt1=dt1 ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized dt1=dt1 ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized dt1=dt1 *** +PREHOOK: query: select dt1 = dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select dt1 = dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +NULL +PREHOOK: query: select '*** non-vectorized dt1=dt1 ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized dt1=dt1 ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized dt1=dt1 *** +PREHOOK: query: select dt1 = dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select dt1 = dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +true +true +NULL +PREHOOK: query: select '*** AND ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** AND ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** AND *** +PREHOOK: query: explain vectorization detail select null and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select null and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: (null and dt1 is null) (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5] + selectExpressions: ScalarNullAndCol(col 4:boolean, val 0:boolean)(children: IsNull(col 0:date) -> 4:boolean) -> 5:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized null and dt1 is null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized null and dt1 is null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized null and dt1 is null *** +PREHOOK: query: select null and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select null and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +NULL +PREHOOK: query: select '*** non-vectorized null and dt1 is null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized null and dt1 is null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized null and dt1 is null *** +PREHOOK: query: select null and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select null and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +NULL +PREHOOK: query: explain vectorization detail select true and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select true and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: dt1 is null (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [3] + selectExpressions: IsNull(col 0:date) -> 3:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized true and dt1 is null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized true and dt1 is null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized true and dt1 is null *** +PREHOOK: query: select true and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select true and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +true +PREHOOK: query: select '*** non-vectorized true and dt1 is null ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized true and dt1 is null ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized true and dt1 is null *** +PREHOOK: query: select true and dt1 is null from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select true and dt1 is null from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +true +PREHOOK: query: explain vectorization detail select dt1 != dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select dt1 != dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +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 #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: vector_and_or + Statistics: Num rows: 3 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:dt1:date, 1:dt2:date, 2:ROW__ID:struct] + Select Operator + expressions: (null and dt1 is null) (type: boolean) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [5] + selectExpressions: ScalarNullAndCol(col 4:boolean, val 0:boolean)(children: IsNull(col 0:date) -> 4:boolean) -> 5:boolean + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + 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 + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 2 + includeColumns: [0] + dataColumns: dt1:date, dt2:date + partitionColumnCount: 0 + scratchColumnTypeNames: [bigint, bigint, bigint] + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select '*** vectorized dt1!=dt1 ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** vectorized dt1!=dt1 ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** vectorized dt1!=dt1 *** +PREHOOK: query: select dt1 != dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select dt1 != dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +NULL +PREHOOK: query: select '*** non-vectorized dt1!=dt1 ***' +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select '*** non-vectorized dt1!=dt1 ***' +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +*** non-vectorized dt1!=dt1 *** +PREHOOK: query: select dt1 != dt1 from vector_and_or +PREHOOK: type: QUERY +PREHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +POSTHOOK: query: select dt1 != dt1 from vector_and_or +POSTHOOK: type: QUERY +POSTHOOK: Input: default@vector_and_or +#### A masked pattern was here #### +false +false +NULL diff --git ql/src/test/results/clientpositive/llap/vector_date_1.q.out ql/src/test/results/clientpositive/llap/vector_date_1.q.out index 57d1ff3faf..4fd22eeb5e 100644 --- ql/src/test/results/clientpositive/llap/vector_date_1.q.out +++ ql/src/test/results/clientpositive/llap/vector_date_1.q.out @@ -124,8 +124,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 1, 4, 5, 6, 7, 9, 10, 11] - selectExpressions: VectorUDFAdaptor((null or dt1 is not null))(children: IsNotNull(col 0:date) -> 3:boolean) -> 4:boolean, LongColNotEqualLongColumn(col 0:date, col 1:date) -> 5:boolean, LongColLessEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColLessLongColumn(col 0:date, col 1:date) -> 7:boolean, VectorUDFAdaptor((null or dt2 is not null))(children: IsNotNull(col 1:date) -> 8:boolean) -> 9:boolean, LongColGreaterEqualLongColumn(col 1:date, col 0:date) -> 10:boolean, LongColGreaterLongColumn(col 1:date, col 0:date) -> 11:boolean + projectedOutputColumnNums: [0, 1, 5, 6, 7, 8, 11, 12, 13] + selectExpressions: ScalarNullOrCol(col 4:boolean, val 0:boolean)(children: IsNotNull(col 0:date) -> 4:boolean) -> 5:boolean, LongColNotEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColLessEqualLongColumn(col 0:date, col 1:date) -> 7:boolean, LongColLessLongColumn(col 0:date, col 1:date) -> 8:boolean, ScalarNullOrCol(col 10:boolean, val 0:boolean)(children: IsNotNull(col 1:date) -> 10:boolean) -> 11:boolean, LongColGreaterEqualLongColumn(col 1:date, col 0:date) -> 12:boolean, LongColGreaterLongColumn(col 1:date, col 0:date) -> 13:boolean Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: date) @@ -135,7 +135,7 @@ STAGE PLANS: keyColumns: 0:date 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: 1:date, 4:boolean, 5:boolean, 6:boolean, 7:boolean, 9:boolean, 10:boolean, 11:boolean + valueColumns: 1:date, 5:boolean, 6:boolean, 7:boolean, 8:boolean, 11:boolean, 12:boolean, 13:boolean Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: date), _col2 (type: boolean), _col3 (type: boolean), _col5 (type: boolean), _col6 (type: boolean), _col7 (type: boolean), _col8 (type: boolean), _col9 (type: boolean) Execution mode: vectorized, llap @@ -147,14 +147,14 @@ STAGE PLANS: featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat allNative: true - usesVectorUDFAdaptor: true + usesVectorUDFAdaptor: false vectorized: true rowBatchContext: dataColumnCount: 2 includeColumns: [0, 1] dataColumns: dt1:date, dt2:date partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: diff --git ql/src/test/results/clientpositive/llap/vector_interval_2.q.out ql/src/test/results/clientpositive/llap/vector_interval_2.q.out index 5836daede3..adde279c29 100644 --- ql/src/test/results/clientpositive/llap/vector_interval_2.q.out +++ ql/src/test/results/clientpositive/llap/vector_interval_2.q.out @@ -139,8 +139,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [2, 9, 12, 15, 18, 21, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56] - selectExpressions: VectorUDFAdaptor((null or CAST( str1 AS INTERVAL YEAR TO MONTH) is not null))(children: IsNotNull(col 7:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 7:interval_year_month) -> 8:boolean) -> 9:boolean, LongColLessEqualLongColumn(col 10:interval_year_month, col 11:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 10:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 11:interval_year_month) -> 12:boolean, LongColLessLongColumn(col 13:interval_year_month, col 14:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 13:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 14:interval_year_month) -> 15:boolean, LongColGreaterEqualLongColumn(col 16:interval_year_month, col 17:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 16:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 17:interval_year_month) -> 18:boolean, LongColGreaterLongColumn(col 19:interval_year_month, col 20:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 19:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 20:interval_year_month) -> 21:boolean, LongColNotEqualLongColumn(col 22:interval_year_month, col 23:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 22:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 23:interval_year_month) -> 24:boolean, IntervalYearMonthColEqualIntervalYearMonthScalar(col 25:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 25:interval_year_month) -> 26:boolean, IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 27:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 27:interval_year_month) -> 28:boolean, IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 29:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 29:interval_year_month) -> 30:boolean, IntervalYearMonthColLessIntervalYearMonthScalar(col 31:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 31:interval_year_month) -> 32:boolean, IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 33:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 33:interval_year_month) -> 34:boolean, IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 35:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 35:interval_year_month) -> 36:boolean, IntervalYearMonthColGreaterIntervalYearMonthScalar(col 37:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 37:interval_year_month) -> 38:boolean, IntervalYearMonthColNotEqualIntervalYearMonthScalar(col 39:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 39:interval_year_month) -> 40:boolean, IntervalYearMonthScalarEqualIntervalYearMonthColumn(val 14, col 41:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 41:interval_year_month) -> 42:boolean, IntervalYearMonthScalarLessEqualIntervalYearMonthColumn(val 14, col 43:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 43:interval_year_month) -> 44:boolean, IntervalYearMonthScalarLessEqualIntervalYearMonthColumn(val 14, col 45:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 45:interval_year_month) -> 46:boolean, IntervalYearMonthScalarLessIntervalYearMonthColumn(val 14, col 47:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 47:interval_year_month) -> 48:boolean, IntervalYearMonthScalarGreaterEqualIntervalYearMonthColumn(val 14, col 49:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 49:interval_year_month) -> 50:boolean, IntervalYearMonthScalarGreaterEqualIntervalYearMonthColumn(val 15, col 51:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 51:interval_year_month) -> 52:boolean, IntervalYearMonthScalarGreaterIntervalYearMonthColumn(val 15, col 53:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 53:interval_year_month) -> 54:boolean, IntervalYearMonthScalarNotEqualIntervalYearMonthColumn(val 14, col 55:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 55:interval_year_month) -> 56:boolean + projectedOutputColumnNums: [2, 10, 13, 16, 19, 22, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57] + selectExpressions: ScalarNullOrCol(col 9:boolean, val 0:boolean)(children: IsNotNull(col 8:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 8:interval_year_month) -> 9:boolean) -> 10:boolean, LongColLessEqualLongColumn(col 11:interval_year_month, col 12:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 11:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 12:interval_year_month) -> 13:boolean, LongColLessLongColumn(col 14:interval_year_month, col 15:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 14:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 15:interval_year_month) -> 16:boolean, LongColGreaterEqualLongColumn(col 17:interval_year_month, col 18:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 17:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 18:interval_year_month) -> 19:boolean, LongColGreaterLongColumn(col 20:interval_year_month, col 21:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 20:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 21:interval_year_month) -> 22:boolean, LongColNotEqualLongColumn(col 23:interval_year_month, col 24:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 23:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 24:interval_year_month) -> 25:boolean, IntervalYearMonthColEqualIntervalYearMonthScalar(col 26:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 26:interval_year_month) -> 27:boolean, IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 28:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 28:interval_year_month) -> 29:boolean, IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 30:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 30:interval_year_month) -> 31:boolean, IntervalYearMonthColLessIntervalYearMonthScalar(col 32:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 32:interval_year_month) -> 33:boolean, IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 34:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 34:interval_year_month) -> 35:boolean, IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 36:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 36:interval_year_month) -> 37:boolean, IntervalYearMonthColGreaterIntervalYearMonthScalar(col 38:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 38:interval_year_month) -> 39:boolean, IntervalYearMonthColNotEqualIntervalYearMonthScalar(col 40:interval_year_month, val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 40:interval_year_month) -> 41:boolean, IntervalYearMonthScalarEqualIntervalYearMonthColumn(val 14, col 42:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 42:interval_year_month) -> 43:boolean, IntervalYearMonthScalarLessEqualIntervalYearMonthColumn(val 14, col 44:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 44:interval_year_month) -> 45:boolean, IntervalYearMonthScalarLessEqualIntervalYearMonthColumn(val 14, col 46:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 46:interval_year_month) -> 47:boolean, IntervalYearMonthScalarLessIntervalYearMonthColumn(val 14, col 48:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 48:interval_year_month) -> 49:boolean, IntervalYearMonthScalarGreaterEqualIntervalYearMonthColumn(val 14, col 50:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 50:interval_year_month) -> 51:boolean, IntervalYearMonthScalarGreaterEqualIntervalYearMonthColumn(val 15, col 52:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 52:interval_year_month) -> 53:boolean, IntervalYearMonthScalarGreaterIntervalYearMonthColumn(val 15, col 54:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 54:interval_year_month) -> 55:boolean, IntervalYearMonthScalarNotEqualIntervalYearMonthColumn(val 14, col 56:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 56:interval_year_month) -> 57:boolean Statistics: Num rows: 2 Data size: 366 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) @@ -160,7 +160,7 @@ STAGE PLANS: featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat allNative: true - usesVectorUDFAdaptor: true + usesVectorUDFAdaptor: false vectorized: true Reducer 2 Execution mode: vectorized, llap @@ -559,8 +559,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 9, 12, 15, 18, 21, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56] - selectExpressions: VectorUDFAdaptor((null or CAST( str3 AS INTERVAL DAY TO SECOND) is not null))(children: IsNotNull(col 7:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 7:interval_day_time) -> 8:boolean) -> 9:boolean, IntervalDayTimeColLessEqualIntervalDayTimeColumn(col 10:interval_day_time, col 11:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 10:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 11:interval_day_time) -> 12:boolean, IntervalDayTimeColLessIntervalDayTimeColumn(col 13:interval_day_time, col 14:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 13:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 14:interval_day_time) -> 15:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeColumn(col 16:interval_day_time, col 17:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 16:interval_day_time, CastStringToIntervalDayTime(col 4:string) -> 17:interval_day_time) -> 18:boolean, IntervalDayTimeColGreaterIntervalDayTimeColumn(col 19:interval_day_time, col 20:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 19:interval_day_time, CastStringToIntervalDayTime(col 4:string) -> 20:interval_day_time) -> 21:boolean, IntervalDayTimeColNotEqualIntervalDayTimeColumn(col 22:interval_day_time, col 23:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 22:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 23:interval_day_time) -> 24:boolean, IntervalDayTimeColEqualIntervalDayTimeScalar(col 25:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 25:interval_day_time) -> 26:boolean, IntervalDayTimeColLessEqualIntervalDayTimeScalar(col 27:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 27:interval_day_time) -> 28:boolean, IntervalDayTimeColLessEqualIntervalDayTimeScalar(col 29:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 29:interval_day_time) -> 30:boolean, IntervalDayTimeColLessIntervalDayTimeScalar(col 31:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 31:interval_day_time) -> 32:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeScalar(col 33:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 33:interval_day_time) -> 34:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeScalar(col 35:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 5:string) -> 35:interval_day_time) -> 36:boolean, IntervalDayTimeColGreaterIntervalDayTimeScalar(col 37:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 5:string) -> 37:interval_day_time) -> 38:boolean, IntervalDayTimeColNotEqualIntervalDayTimeScalar(col 39:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 39:interval_day_time) -> 40:boolean, IntervalDayTimeScalarEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 41:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 41:interval_day_time) -> 42:boolean, IntervalDayTimeScalarLessEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 43:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 43:interval_day_time) -> 44:boolean, IntervalDayTimeScalarLessEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 45:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 45:interval_day_time) -> 46:boolean, IntervalDayTimeScalarLessIntervalDayTimeColumn(val 1 02:03:04.000000000, col 47:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 47:interval_day_time) -> 48:boolean, IntervalDayTimeScalarGreaterEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 49:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 49:interval_day_time) -> 50:boolean, IntervalDayTimeScalarGreaterEqualIntervalDayTimeColumn(val 1 02:03:05.000000000, col 51:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 51:interval_day_time) -> 52:boolean, IntervalDayTimeScalarGreaterIntervalDayTimeColumn(val 1 02:03:05.000000000, col 53:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 53:interval_day_time) -> 54:boolean, IntervalDayTimeScalarNotEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 55:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 55:interval_day_time) -> 56:boolean + projectedOutputColumnNums: [4, 10, 13, 16, 19, 22, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57] + selectExpressions: ScalarNullOrCol(col 9:boolean, val 0:boolean)(children: IsNotNull(col 8:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 8:interval_day_time) -> 9:boolean) -> 10:boolean, IntervalDayTimeColLessEqualIntervalDayTimeColumn(col 11:interval_day_time, col 12:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 11:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 12:interval_day_time) -> 13:boolean, IntervalDayTimeColLessIntervalDayTimeColumn(col 14:interval_day_time, col 15:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 14:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 15:interval_day_time) -> 16:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeColumn(col 17:interval_day_time, col 18:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 17:interval_day_time, CastStringToIntervalDayTime(col 4:string) -> 18:interval_day_time) -> 19:boolean, IntervalDayTimeColGreaterIntervalDayTimeColumn(col 20:interval_day_time, col 21:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 20:interval_day_time, CastStringToIntervalDayTime(col 4:string) -> 21:interval_day_time) -> 22:boolean, IntervalDayTimeColNotEqualIntervalDayTimeColumn(col 23:interval_day_time, col 24:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 23:interval_day_time, CastStringToIntervalDayTime(col 5:string) -> 24:interval_day_time) -> 25:boolean, IntervalDayTimeColEqualIntervalDayTimeScalar(col 26:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 26:interval_day_time) -> 27:boolean, IntervalDayTimeColLessEqualIntervalDayTimeScalar(col 28:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 28:interval_day_time) -> 29:boolean, IntervalDayTimeColLessEqualIntervalDayTimeScalar(col 30:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 30:interval_day_time) -> 31:boolean, IntervalDayTimeColLessIntervalDayTimeScalar(col 32:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 32:interval_day_time) -> 33:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeScalar(col 34:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 34:interval_day_time) -> 35:boolean, IntervalDayTimeColGreaterEqualIntervalDayTimeScalar(col 36:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 5:string) -> 36:interval_day_time) -> 37:boolean, IntervalDayTimeColGreaterIntervalDayTimeScalar(col 38:interval_day_time, val 1 02:03:04.000000000)(children: CastStringToIntervalDayTime(col 5:string) -> 38:interval_day_time) -> 39:boolean, IntervalDayTimeColNotEqualIntervalDayTimeScalar(col 40:interval_day_time, val 1 02:03:05.000000000)(children: CastStringToIntervalDayTime(col 4:string) -> 40:interval_day_time) -> 41:boolean, IntervalDayTimeScalarEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 42:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 42:interval_day_time) -> 43:boolean, IntervalDayTimeScalarLessEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 44:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 44:interval_day_time) -> 45:boolean, IntervalDayTimeScalarLessEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 46:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 46:interval_day_time) -> 47:boolean, IntervalDayTimeScalarLessIntervalDayTimeColumn(val 1 02:03:04.000000000, col 48:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 48:interval_day_time) -> 49:boolean, IntervalDayTimeScalarGreaterEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 50:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 50:interval_day_time) -> 51:boolean, IntervalDayTimeScalarGreaterEqualIntervalDayTimeColumn(val 1 02:03:05.000000000, col 52:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 52:interval_day_time) -> 53:boolean, IntervalDayTimeScalarGreaterIntervalDayTimeColumn(val 1 02:03:05.000000000, col 54:interval_day_time)(children: CastStringToIntervalDayTime(col 4:string) -> 54:interval_day_time) -> 55:boolean, IntervalDayTimeScalarNotEqualIntervalDayTimeColumn(val 1 02:03:04.000000000, col 56:interval_day_time)(children: CastStringToIntervalDayTime(col 5:string) -> 56:interval_day_time) -> 57:boolean Statistics: Num rows: 2 Data size: 374 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) @@ -580,7 +580,7 @@ STAGE PLANS: featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat allNative: true - usesVectorUDFAdaptor: true + usesVectorUDFAdaptor: false vectorized: true Reducer 2 Execution mode: vectorized, llap diff --git ql/src/test/results/clientpositive/vector_date_1.q.out ql/src/test/results/clientpositive/vector_date_1.q.out index 65711a14b3..5da1c8d205 100644 --- ql/src/test/results/clientpositive/vector_date_1.q.out +++ ql/src/test/results/clientpositive/vector_date_1.q.out @@ -118,8 +118,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 1, 4, 5, 6, 7, 9, 10, 11] - selectExpressions: VectorUDFAdaptor((null or dt1 is not null))(children: IsNotNull(col 0:date) -> 3:boolean) -> 4:boolean, LongColNotEqualLongColumn(col 0:date, col 1:date) -> 5:boolean, LongColLessEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColLessLongColumn(col 0:date, col 1:date) -> 7:boolean, VectorUDFAdaptor((null or dt2 is not null))(children: IsNotNull(col 1:date) -> 8:boolean) -> 9:boolean, LongColGreaterEqualLongColumn(col 1:date, col 0:date) -> 10:boolean, LongColGreaterLongColumn(col 1:date, col 0:date) -> 11:boolean + projectedOutputColumnNums: [0, 1, 5, 6, 7, 8, 11, 12, 13] + selectExpressions: ScalarNullOrCol(col 4:boolean, val 0:boolean)(children: IsNotNull(col 0:date) -> 4:boolean) -> 5:boolean, LongColNotEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColLessEqualLongColumn(col 0:date, col 1:date) -> 7:boolean, LongColLessLongColumn(col 0:date, col 1:date) -> 8:boolean, ScalarNullOrCol(col 10:boolean, val 0:boolean)(children: IsNotNull(col 1:date) -> 10:boolean) -> 11:boolean, LongColGreaterEqualLongColumn(col 1:date, col 0:date) -> 12:boolean, LongColGreaterLongColumn(col 1:date, col 0:date) -> 13:boolean Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: date) @@ -139,14 +139,14 @@ STAGE PLANS: featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat allNative: false - usesVectorUDFAdaptor: true + usesVectorUDFAdaptor: false vectorized: true rowBatchContext: dataColumnCount: 2 includeColumns: [0, 1] dataColumns: dt1:date, dt2:date partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true @@ -261,8 +261,8 @@ STAGE PLANS: Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 1, 4, 5, 6, 7, 9, 10, 11] - selectExpressions: VectorUDFAdaptor((null and dt1 is null))(children: IsNull(col 0:date) -> 3:boolean) -> 4:boolean, LongColEqualLongColumn(col 0:date, col 1:date) -> 5:boolean, LongColGreaterEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColGreaterLongColumn(col 0:date, col 1:date) -> 7:boolean, VectorUDFAdaptor((null and dt2 is null))(children: IsNull(col 1:date) -> 8:boolean) -> 9:boolean, LongColLessEqualLongColumn(col 1:date, col 0:date) -> 10:boolean, LongColLessLongColumn(col 1:date, col 0:date) -> 11:boolean + projectedOutputColumnNums: [0, 1, 5, 6, 7, 8, 11, 12, 13] + selectExpressions: ScalarNullAndCol(col 4:boolean, val 0:boolean)(children: IsNull(col 0:date) -> 4:boolean) -> 5:boolean, LongColEqualLongColumn(col 0:date, col 1:date) -> 6:boolean, LongColGreaterEqualLongColumn(col 0:date, col 1:date) -> 7:boolean, LongColGreaterLongColumn(col 0:date, col 1:date) -> 8:boolean, ScalarNullAndCol(col 10:boolean, val 0:boolean)(children: IsNull(col 1:date) -> 10:boolean) -> 11:boolean, LongColLessEqualLongColumn(col 1:date, col 0:date) -> 12:boolean, LongColLessLongColumn(col 1:date, col 0:date) -> 13:boolean Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: date) @@ -282,14 +282,14 @@ STAGE PLANS: featureSupportInUse: [DECIMAL_64] inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat allNative: false - usesVectorUDFAdaptor: true + usesVectorUDFAdaptor: false vectorized: true rowBatchContext: dataColumnCount: 2 includeColumns: [0, 1] dataColumns: dt1:date, dt2:date partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true diff --git storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/LongColumnVector.java storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/LongColumnVector.java index 443a076955..bf423674b2 100644 --- storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/LongColumnVector.java +++ storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/LongColumnVector.java @@ -214,11 +214,13 @@ public void fill(long value) { } // Fill the column vector with nulls - public void fillWithNulls() { + public LongColumnVector fillWithNulls() { noNulls = false; isRepeating = true; vector[0] = NULL_VALUE; isNull[0] = true; + + return this; } // Simplify vector by brute-force flattening noNulls and isRepeating