You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by mm...@apache.org on 2017/10/29 20:39:56 UTC
[17/51] [partial] hive git commit: HIVE-17433: Vectorization: Support
Decimal64 in Hive Query Engine (Matt McCline, reviewed by Teddy Choi)
http://git-wip-us.apache.org/repos/asf/hive/blob/e63ebccc/ql/src/test/results/clientpositive/llap/vector_decimal_expressions.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_decimal_expressions.q.out b/ql/src/test/results/clientpositive/llap/vector_decimal_expressions.q.out
index c644c84..d63eeb7 100644
--- a/ql/src/test/results/clientpositive/llap/vector_decimal_expressions.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_decimal_expressions.q.out
@@ -11,11 +11,13 @@ POSTHOOK: Output: default@decimal_test
POSTHOOK: Lineage: decimal_test.cdecimal1 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
POSTHOOK: Lineage: decimal_test.cdecimal2 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
POSTHOOK: Lineage: decimal_test.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
+SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
LIMIT 10
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
+SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
LIMIT 10
POSTHOOK: type: QUERY
@@ -42,12 +44,12 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 2708600 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
- projectedOutputColumns: [0, 1, 2]
+ vectorizationSchemaColumns: [0:cdouble:double, 1:cdecimal1:decimal(20,10), 2:cdecimal2:decimal(23,14), 3:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
native: true
- predicateExpression: FilterExprAndExpr(children: FilterDecimalColGreaterDecimalScalar(col 1, val 0) -> boolean, FilterDecimalColLessDecimalScalar(col 1, val 12345.5678) -> boolean, FilterDecimalColNotEqualDecimalScalar(col 2, val 0) -> boolean, FilterDecimalColGreaterDecimalScalar(col 2, val 1000) -> boolean, SelectColumnIsNotNull(col 0) -> boolean) -> boolean
+ predicateExpression: FilterExprAndExpr(children: FilterDecimalColGreaterDecimalScalar(col 1:decimal(20,10), val 0), FilterDecimalColLessDecimalScalar(col 1:decimal(20,10), val 12345.5678), FilterDecimalColNotEqualDecimalScalar(col 2:decimal(23,14), val 0), FilterDecimalColGreaterDecimalScalar(col 2:decimal(23,14), val 1000), SelectColumnIsNotNull(col 0:double))
predicate: ((cdecimal1 < 12345.5678) and (cdecimal1 > 0) and (cdecimal2 <> 0) and (cdecimal2 > 1000) and cdouble is not null) (type: boolean)
Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
Select Operator
@@ -56,16 +58,18 @@ STAGE PLANS:
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumns: [3, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
- selectExpressions: DecimalColAddDecimalColumn(col 1, col 2) -> 3:decimal(25,14), DecimalColSubtractDecimalColumn(col 1, col 4)(children: DecimalScalarMultiplyDecimalColumn(val 2, col 2) -> 4:decimal(25,14)) -> 5:decimal(26,14), DecimalColDivideDecimalColumn(col 6, col 2)(children: DecimalColAddDecimalScalar(col 1, val 2.34) -> 6:decimal(21,10)) -> 7:decimal(38,13), DecimalColMultiplyDecimalColumn(col 1, col 8)(children: DecimalColDivideDecimalScalar(col 2, val 3.4) -> 8:decimal(27,17)) -> 9:decimal(38,17), DecimalColModuloDecimalScalar(col 1, val 10) -> 10:decimal(12,10), CastDecimalToLong(col 1) -> 11:int, CastDecimalToLong(col 2) -> 12:smallint, CastDecimalToLong(col 2) -> 13:tinyint, CastDecimalToLong(col 1) -> 14:bigint, CastDecimalToBoolean(col 1) -> 15:Boolean, CastDecimalToDouble(col 2) -> 16:double, CastDecimalToDouble(col 1) -> 17:double, CastDecimalToString(col 2) -> 18:String, CastDecimalToTimestamp(col 1) -> 19:timestamp
+ projectedOutputColumnNums: [4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
+ selectExpressions: DecimalColAddDecimalColumn(col 1:decimal(20,10), col 2:decimal(23,14)) -> 4:decimal(25,14), DecimalColSubtractDecimalColumn(col 1:decimal(20,10), col 5:decimal(25,14))(children: DecimalScalarMultiplyDecimalColumn(val 2, col 2:decimal(23,14)) -> 5:decimal(25,14)) -> 6:decimal(26,14), DecimalColDivideDecimalColumn(col 7:decimal(21,10), col 2:decimal(23,14))(children: DecimalColAddDecimalScalar(col 1:decimal(20,10), val 2.34) -> 7:decimal(21,10)) -> 8:decimal(38,13), DecimalColMultiplyDecimalColumn(col 1:decimal(20,10), col 9:decimal(27,17))(children: DecimalColDivideDecimalScalar(col 2:decimal(23,14), val 3.4) -> 9:decimal(27,17)) -> 10:decimal(38,17), DecimalColModuloDecimalScalar(col 1:decimal(20,10), val 10) -> 11:decimal(12,10), CastDecimalToLong(col 1:decimal(20,10)) -> 12:int, CastDecimalToLong(col 2:decimal(23,14)) -> 13:smallint, CastDecimalToLong(col 2:decimal(23,14)) -> 14:tinyint, CastDecimalToLong(col 1:decimal(20,10)) -> 15:big
int, CastDecimalToBoolean(col 1:decimal(20,10)) -> 16:boolean, CastDecimalToDouble(col 2:decimal(23,14)) -> 17:double, CastDecimalToDouble(col 1:decimal(20,10)) -> 18:float, CastDecimalToString(col 2:decimal(23,14)) -> 19:string, CastDecimalToTimestamp(col 1:decimal(20,10)) -> 20:timestamp
Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: decimal(25,14)), _col1 (type: decimal(26,14)), _col2 (type: decimal(38,13)), _col3 (type: decimal(38,17)), _col4 (type: decimal(12,10)), _col5 (type: int), _col6 (type: smallint), _col7 (type: tinyint), _col8 (type: bigint), _col9 (type: boolean), _col10 (type: double), _col11 (type: float), _col12 (type: string), _col13 (type: timestamp)
sort order: ++++++++++++++
Reduce Sink Vectorization:
className: VectorReduceSinkObjectHashOperator
+ keyColumnNums: [4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
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
+ valueColumnNums: []
Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
TopN Hash Memory Usage: 0.1
Execution mode: vectorized, llap
@@ -73,20 +77,33 @@ STAGE PLANS:
Map Vectorization:
enabled: true
enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
- groupByVectorOutput: true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
allNative: true
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 3
+ includeColumns: [0, 1, 2]
+ dataColumns: cdouble:double, cdecimal1:decimal(20,10), cdecimal2:decimal(23,14)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [decimal(25,14), decimal(25,14), decimal(26,14), decimal(21,10), decimal(38,13), decimal(27,17), decimal(38,17), decimal(12,10), bigint, bigint, bigint, bigint, bigint, double, double, string, timestamp]
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
- groupByVectorOutput: true
+ reduceColumnNullOrder: aaaaaaaaaaaaaa
+ reduceColumnSortOrder: ++++++++++++++
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 14
+ dataColumns: KEY.reducesinkkey0:decimal(25,14), KEY.reducesinkkey1:decimal(26,14), KEY.reducesinkkey2:decimal(38,13), KEY.reducesinkkey3:decimal(38,17), KEY.reducesinkkey4:decimal(12,10), KEY.reducesinkkey5:int, KEY.reducesinkkey6:smallint, KEY.reducesinkkey7:tinyint, KEY.reducesinkkey8:bigint, KEY.reducesinkkey9:boolean, KEY.reducesinkkey10:double, KEY.reducesinkkey11:float, KEY.reducesinkkey12:string, KEY.reducesinkkey13:timestamp
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
Reduce Operator Tree:
Select Operator
expressions: KEY.reducesinkkey0 (type: decimal(25,14)), KEY.reducesinkkey1 (type: decimal(26,14)), KEY.reducesinkkey2 (type: decimal(38,13)), KEY.reducesinkkey3 (type: decimal(38,17)), KEY.reducesinkkey4 (type: decimal(12,10)), KEY.reducesinkkey5 (type: int), KEY.reducesinkkey6 (type: smallint), KEY.reducesinkkey7 (type: tinyint), KEY.reducesinkkey8 (type: bigint), KEY.reducesinkkey9 (type: boolean), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: float), KEY.reducesinkkey12 (type: string), KEY.reducesinkkey13 (type: timestamp)
@@ -94,7 +111,7 @@ STAGE PLANS:
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
+ projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
Limit
Number of rows: 10
@@ -141,3 +158,163 @@ POSTHOOK: Input: default@decimal_test
1895.51268191268460 -1203.53347193346920 0.8371969190171 262050.87567567649292835 2.4972972973 862 1033 NULL 862 true 1033.0153846153846 862.4973 1033.0153846153846 1969-12-31 16:14:22.497297297
1909.95218295221550 -1212.70166320163100 0.8371797936946 266058.54729730725574014 9.0675675676 869 1040 NULL 869 true 1040.8846153846155 869.06757 1040.8846153846155 1969-12-31 16:14:29.067567567
1913.89022869026920 -1215.20207900203840 0.8371751679996 267156.82702703945592392 0.8594594595 870 1043 NULL 870 true 1043.0307692307692 870.85944 1043.0307692307692 1969-12-31 16:14:30.859459459
+PREHOOK: query: CREATE TABLE decimal_test_small STORED AS ORC AS SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(10,3)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(7,2)) AS cdecimal2 FROM alltypesorc
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@alltypesorc
+PREHOOK: Output: database:default
+PREHOOK: Output: default@decimal_test_small
+POSTHOOK: query: CREATE TABLE decimal_test_small STORED AS ORC AS SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(10,3)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(7,2)) AS cdecimal2 FROM alltypesorc
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@alltypesorc
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@decimal_test_small
+POSTHOOK: Lineage: decimal_test_small.cdecimal1 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: decimal_test_small.cdecimal2 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: decimal_test_small.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
+SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test_small WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
+LIMIT 10
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
+SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test_small WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
+LIMIT 10
+POSTHOOK: type: QUERY
+PLAN VECTORIZATION:
+ enabled: true
+ enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+ Stage: Stage-1
+ Tez
+#### 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: decimal_test_small
+ Statistics: Num rows: 12288 Data size: 2708600 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
+ vectorizationSchemaColumns: [0:cdouble:double, 1:cdecimal1:decimal(10,3), 2:cdecimal2:decimal(7,2), 3:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
+ Filter Operator
+ Filter Vectorization:
+ className: VectorFilterOperator
+ native: true
+ predicateExpression: FilterExprAndExpr(children: FilterDecimalColGreaterDecimalScalar(col 1:decimal(10,3), val 0), FilterDecimalColLessDecimalScalar(col 1:decimal(10,3), val 12345.5678), FilterDecimalColNotEqualDecimalScalar(col 2:decimal(7,2), val 0), FilterDecimalColGreaterDecimalScalar(col 2:decimal(7,2), val 1000), SelectColumnIsNotNull(col 0:double))
+ predicate: ((cdecimal1 < 12345.5678) and (cdecimal1 > 0) and (cdecimal2 <> 0) and (cdecimal2 > 1000) and cdouble is not null) (type: boolean)
+ Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
+ Select Operator
+ expressions: (cdecimal1 + cdecimal2) (type: decimal(11,3)), (cdecimal1 - (2 * cdecimal2)) (type: decimal(11,3)), ((cdecimal1 + 2.34) / cdecimal2) (type: decimal(21,11)), (cdecimal1 * (cdecimal2 / 3.4)) (type: decimal(23,9)), (cdecimal1 % 10) (type: decimal(5,3)), UDFToInteger(cdecimal1) (type: int), UDFToShort(cdecimal2) (type: smallint), UDFToByte(cdecimal2) (type: tinyint), UDFToLong(cdecimal1) (type: bigint), UDFToBoolean(cdecimal1) (type: boolean), UDFToDouble(cdecimal2) (type: double), UDFToFloat(cdecimal1) (type: float), UDFToString(cdecimal2) (type: string), CAST( cdecimal1 AS TIMESTAMP) (type: timestamp)
+ outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
+ selectExpressions: DecimalColAddDecimalColumn(col 1:decimal(10,3), col 2:decimal(7,2)) -> 4:decimal(11,3), DecimalColSubtractDecimalColumn(col 1:decimal(10,3), col 5:decimal(9,2))(children: DecimalScalarMultiplyDecimalColumn(val 2, col 2:decimal(7,2)) -> 5:decimal(9,2)) -> 6:decimal(11,3), DecimalColDivideDecimalColumn(col 7:decimal(11,3), col 2:decimal(7,2))(children: DecimalColAddDecimalScalar(col 1:decimal(10,3), val 2.34) -> 7:decimal(11,3)) -> 8:decimal(21,11), DecimalColMultiplyDecimalColumn(col 1:decimal(10,3), col 9:decimal(12,6))(children: DecimalColDivideDecimalScalar(col 2:decimal(7,2), val 3.4) -> 9:decimal(12,6)) -> 10:decimal(23,9), DecimalColModuloDecimalScalar(col 1:decimal(10,3), val 10) -> 11:decimal(5,3), CastDecimalToLong(col 1:decimal(10,3)) -> 12:int, CastDecimalToLong(col 2:decimal(7,2)) -> 13:smallint, CastDecimalToLong(col 2:decimal(7,2)) -> 14:tinyint, CastDecimalToLong(col 1:decimal(10,3)) -> 15:bigint, CastDecimalToBoolean(col 1:
decimal(10,3)) -> 16:boolean, CastDecimalToDouble(col 2:decimal(7,2)) -> 17:double, CastDecimalToDouble(col 1:decimal(10,3)) -> 18:float, CastDecimalToString(col 2:decimal(7,2)) -> 19:string, CastDecimalToTimestamp(col 1:decimal(10,3)) -> 20:timestamp
+ Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
+ Reduce Output Operator
+ key expressions: _col0 (type: decimal(11,3)), _col1 (type: decimal(11,3)), _col2 (type: decimal(21,11)), _col3 (type: decimal(23,9)), _col4 (type: decimal(5,3)), _col5 (type: int), _col6 (type: smallint), _col7 (type: tinyint), _col8 (type: bigint), _col9 (type: boolean), _col10 (type: double), _col11 (type: float), _col12 (type: string), _col13 (type: timestamp)
+ sort order: ++++++++++++++
+ Reduce Sink Vectorization:
+ className: VectorReduceSinkObjectHashOperator
+ keyColumnNums: [4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
+ 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
+ valueColumnNums: []
+ Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
+ TopN Hash Memory Usage: 0.1
+ Execution mode: vectorized, llap
+ LLAP IO: all inputs
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: true
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ rowBatchContext:
+ dataColumnCount: 3
+ includeColumns: [0, 1, 2]
+ dataColumns: cdouble:double, cdecimal1:decimal(10,3), cdecimal2:decimal(7,2)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [decimal(11,3), decimal(9,2), decimal(11,3), decimal(11,3), decimal(21,11), decimal(12,6), decimal(23,9), decimal(5,3), bigint, bigint, bigint, bigint, bigint, double, double, string, timestamp]
+ 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: aaaaaaaaaaaaaa
+ reduceColumnSortOrder: ++++++++++++++
+ allNative: false
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ rowBatchContext:
+ dataColumnCount: 14
+ dataColumns: KEY.reducesinkkey0:decimal(11,3), KEY.reducesinkkey1:decimal(11,3), KEY.reducesinkkey2:decimal(21,11), KEY.reducesinkkey3:decimal(23,9), KEY.reducesinkkey4:decimal(5,3), KEY.reducesinkkey5:int, KEY.reducesinkkey6:smallint, KEY.reducesinkkey7:tinyint, KEY.reducesinkkey8:bigint, KEY.reducesinkkey9:boolean, KEY.reducesinkkey10:double, KEY.reducesinkkey11:float, KEY.reducesinkkey12:string, KEY.reducesinkkey13:timestamp
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
+ Reduce Operator Tree:
+ Select Operator
+ expressions: KEY.reducesinkkey0 (type: decimal(11,3)), KEY.reducesinkkey1 (type: decimal(11,3)), KEY.reducesinkkey2 (type: decimal(21,11)), KEY.reducesinkkey3 (type: decimal(23,9)), KEY.reducesinkkey4 (type: decimal(5,3)), KEY.reducesinkkey5 (type: int), KEY.reducesinkkey6 (type: smallint), KEY.reducesinkkey7 (type: tinyint), KEY.reducesinkkey8 (type: bigint), KEY.reducesinkkey9 (type: boolean), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: float), KEY.reducesinkkey12 (type: string), KEY.reducesinkkey13 (type: timestamp)
+ outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
+ Statistics: Num rows: 455 Data size: 100294 Basic stats: COMPLETE Column stats: NONE
+ Limit
+ Number of rows: 10
+ Limit Vectorization:
+ className: VectorLimitOperator
+ native: true
+ Statistics: Num rows: 10 Data size: 2200 Basic stats: COMPLETE Column stats: NONE
+ File Output Operator
+ compressed: false
+ File Sink Vectorization:
+ className: VectorFileSinkOperator
+ native: false
+ Statistics: Num rows: 10 Data size: 2200 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: 10
+ Processor Tree:
+ ListSink
+
+PREHOOK: query: SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test_small WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
+LIMIT 10
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_test_small
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT cdecimal1 + cdecimal2 as c1, cdecimal1 - (2*cdecimal2) as c2, ((cdecimal1+2.34)/cdecimal2) as c3, (cdecimal1 * (cdecimal2/3.4)) as c4, cdecimal1 % 10 as c5, CAST(cdecimal1 AS INT) as c6, CAST(cdecimal2 AS SMALLINT) as c7, CAST(cdecimal2 AS TINYINT) as c8, CAST(cdecimal1 AS BIGINT) as c9, CAST (cdecimal1 AS BOOLEAN) as c10, CAST(cdecimal2 AS DOUBLE) as c11, CAST(cdecimal1 AS FLOAT) as c12, CAST(cdecimal2 AS STRING) as c13, CAST(cdecimal1 AS TIMESTAMP) as c14 FROM decimal_test_small WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL
+ORDER BY c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
+LIMIT 10
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_test_small
+#### A masked pattern was here ####
+1836.439 -1166.021 0.83727243660 245971.826152056 5.619 835 1000 NULL 835 true 1000.82 835.619 1000.82 1969-12-31 16:13:55.619
+1856.128 -1178.522 0.83724778805 251274.375364068 4.578 844 1011 NULL 844 true 1011.55 844.578 1011.55 1969-12-31 16:14:04.578
+1858.753 -1180.187 0.83724555273 251985.627412262 5.773 845 1012 NULL 845 true 1012.98 845.773 1012.98 1969-12-31 16:14:05.773
+1862.695 -1182.695 0.83723759518 253055.487729555 7.565 847 1015 NULL 847 true 1015.13 847.565 1015.13 1969-12-31 16:14:07.565
+1883.702 -1196.038 0.83720898517 258795.383063868 7.122 857 1026 NULL 857 true 1026.58 857.122 1026.58 1969-12-31 16:14:17.122
+1886.326 -1197.704 0.83720586376 259516.891214712 8.316 858 1028 NULL 858 true 1028.01 858.316 1028.01 1969-12-31 16:14:18.316
+1887.634 -1198.526 0.83720934754 259877.061889284 8.914 858 1028 NULL 858 true 1028.72 858.914 1028.72 1969-12-31 16:14:18.914
+1895.517 -1203.543 0.83719289075 262051.956361764 2.497 862 1033 NULL 862 true 1033.02 862.497 1033.02 1969-12-31 16:14:22.497
+1909.948 -1212.692 0.83718392130 266057.499543968 9.068 869 1040 NULL 869 true 1040.88 869.068 1040.88 1969-12-31 16:14:29.068
+1913.889 -1215.201 0.83717534491 267156.488691411 0.859 870 1043 NULL 870 true 1043.03 870.859 1043.03 1969-12-31 16:14:30.859
http://git-wip-us.apache.org/repos/asf/hive/blob/e63ebccc/ql/src/test/results/clientpositive/llap/vector_decimal_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_decimal_mapjoin.q.out b/ql/src/test/results/clientpositive/llap/vector_decimal_mapjoin.q.out
index 286b8b4..3c302b6 100644
--- a/ql/src/test/results/clientpositive/llap/vector_decimal_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_decimal_mapjoin.q.out
@@ -7,7 +7,7 @@ PREHOOK: query: CREATE TABLE over1k(t tinyint,
bo boolean,
s string,
ts timestamp,
- `dec` decimal(4,2),
+ `dec` decimal(20,2),
bin binary)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
STORED AS TEXTFILE
@@ -23,7 +23,7 @@ POSTHOOK: query: CREATE TABLE over1k(t tinyint,
bo boolean,
s string,
ts timestamp,
- `dec` decimal(4,2),
+ `dec` decimal(20,2),
bin binary)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
STORED AS TEXTFILE
@@ -38,11 +38,11 @@ POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/over1k' OVERWRITE INTO
POSTHOOK: type: LOAD
#### A masked pattern was here ####
POSTHOOK: Output: default@over1k
-PREHOOK: query: CREATE TABLE t1(`dec` decimal(4,2)) STORED AS ORC
+PREHOOK: query: CREATE TABLE t1(`dec` decimal(22,2)) STORED AS ORC
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@t1
-POSTHOOK: query: CREATE TABLE t1(`dec` decimal(4,2)) STORED AS ORC
+POSTHOOK: query: CREATE TABLE t1(`dec` decimal(22,2)) STORED AS ORC
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@t1
@@ -54,12 +54,12 @@ POSTHOOK: query: INSERT INTO TABLE t1 select `dec` from over1k
POSTHOOK: type: QUERY
POSTHOOK: Input: default@over1k
POSTHOOK: Output: default@t1
-POSTHOOK: Lineage: t1.dec SIMPLE [(over1k)over1k.FieldSchema(name:dec, type:decimal(4,2), comment:null), ]
-PREHOOK: query: CREATE TABLE t2(`dec` decimal(4,0)) STORED AS ORC
+POSTHOOK: Lineage: t1.dec EXPRESSION [(over1k)over1k.FieldSchema(name:dec, type:decimal(20,2), comment:null), ]
+PREHOOK: query: CREATE TABLE t2(`dec` decimal(24,0)) STORED AS ORC
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@t2
-POSTHOOK: query: CREATE TABLE t2(`dec` decimal(4,0)) STORED AS ORC
+POSTHOOK: query: CREATE TABLE t2(`dec` decimal(24,0)) STORED AS ORC
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@t2
@@ -71,11 +71,11 @@ POSTHOOK: query: INSERT INTO TABLE t2 select `dec` from over1k
POSTHOOK: type: QUERY
POSTHOOK: Input: default@over1k
POSTHOOK: Output: default@t2
-POSTHOOK: Lineage: t2.dec EXPRESSION [(over1k)over1k.FieldSchema(name:dec, type:decimal(4,2), comment:null), ]
-PREHOOK: query: explain vectorization expression
+POSTHOOK: Lineage: t2.dec EXPRESSION [(over1k)over1k.FieldSchema(name:dec, type:decimal(20,2), comment:null), ]
+PREHOOK: query: explain vectorization detail
select t1.`dec`, t2.`dec` from t1 join t2 on (t1.`dec`=t2.`dec`)
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select t1.`dec`, t2.`dec` from t1 join t2 on (t1.`dec`=t2.`dec`)
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -101,28 +101,28 @@ STAGE PLANS:
Statistics: Num rows: 1049 Data size: 111776 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
- projectedOutputColumns: [0]
+ vectorizationSchemaColumns: [0:dec:decimal(22,2), 1:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
native: true
- predicateExpression: SelectColumnIsNotNull(col 0) -> boolean
+ predicateExpression: SelectColumnIsNotNull(col 0:decimal(22,2))
predicate: dec is not null (type: boolean)
Statistics: Num rows: 997 Data size: 106235 Basic stats: COMPLETE Column stats: NONE
Select Operator
- expressions: dec (type: decimal(4,2))
+ expressions: dec (type: decimal(22,2))
outputColumnNames: _col0
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumns: [0]
+ projectedOutputColumnNums: [0]
Statistics: Num rows: 997 Data size: 106235 Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
keys:
- 0 _col0 (type: decimal(6,2))
- 1 _col0 (type: decimal(6,2))
+ 0 _col0 (type: decimal(26,2))
+ 1 _col0 (type: decimal(26,2))
Map Join Vectorization:
className: VectorMapJoinOperator
native: false
@@ -148,11 +148,18 @@ STAGE PLANS:
Map Vectorization:
enabled: true
enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
- groupByVectorOutput: true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 1
+ includeColumns: [0]
+ dataColumns: dec:decimal(22,2)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
Map 2
Map Operator Tree:
TableScan
@@ -160,41 +167,50 @@ STAGE PLANS:
Statistics: Num rows: 1049 Data size: 111776 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
- projectedOutputColumns: [0]
+ vectorizationSchemaColumns: [0:dec:decimal(24,0), 1:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
native: true
- predicateExpression: SelectColumnIsNotNull(col 0) -> boolean
+ predicateExpression: SelectColumnIsNotNull(col 0:decimal(24,0))
predicate: dec is not null (type: boolean)
Statistics: Num rows: 997 Data size: 106235 Basic stats: COMPLETE Column stats: NONE
Select Operator
- expressions: dec (type: decimal(4,0))
+ expressions: dec (type: decimal(24,0))
outputColumnNames: _col0
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumns: [0]
+ projectedOutputColumnNums: [0]
Statistics: Num rows: 997 Data size: 106235 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
- key expressions: _col0 (type: decimal(6,2))
+ key expressions: _col0 (type: decimal(26,2))
sort order: +
- Map-reduce partition columns: _col0 (type: decimal(6,2))
+ Map-reduce partition columns: _col0 (type: decimal(26,2))
Reduce Sink Vectorization:
className: VectorReduceSinkMultiKeyOperator
+ keyColumnNums: [0]
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
+ valueColumnNums: []
Statistics: Num rows: 997 Data size: 106235 Basic stats: COMPLETE Column stats: NONE
Execution mode: vectorized, llap
LLAP IO: all inputs
Map Vectorization:
enabled: true
enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
- groupByVectorOutput: true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
allNative: true
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 1
+ includeColumns: [0]
+ dataColumns: dec:decimal(24,0)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
Stage: Stage-0
Fetch Operator
@@ -318,3 +334,233 @@ POSTHOOK: Input: default@t2
9.00 9
9.00 9
9.00 9
+PREHOOK: query: CREATE TABLE over1k_small(t tinyint,
+ si smallint,
+ i int,
+ b bigint,
+ f float,
+ d double,
+ bo boolean,
+ s string,
+ ts timestamp,
+ `dec` decimal(4,2),
+ bin binary)
+ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@over1k_small
+POSTHOOK: query: CREATE TABLE over1k_small(t tinyint,
+ si smallint,
+ i int,
+ b bigint,
+ f float,
+ d double,
+ bo boolean,
+ s string,
+ ts timestamp,
+ `dec` decimal(4,2),
+ bin binary)
+ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@over1k_small
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/over1k' OVERWRITE INTO TABLE over1k_small
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@over1k_small
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/over1k' OVERWRITE INTO TABLE over1k_small
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@over1k_small
+PREHOOK: query: CREATE TABLE t1_small(`dec` decimal(4,2)) STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t1_small
+POSTHOOK: query: CREATE TABLE t1_small(`dec` decimal(4,2)) STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t1_small
+PREHOOK: query: INSERT INTO TABLE t1 select `dec` from over1k_small
+PREHOOK: type: QUERY
+PREHOOK: Input: default@over1k_small
+PREHOOK: Output: default@t1
+POSTHOOK: query: INSERT INTO TABLE t1 select `dec` from over1k_small
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@over1k_small
+POSTHOOK: Output: default@t1
+POSTHOOK: Lineage: t1.dec EXPRESSION [(over1k_small)over1k_small.FieldSchema(name:dec, type:decimal(4,2), comment:null), ]
+PREHOOK: query: CREATE TABLE t2_small(`dec` decimal(4,0)) STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t2_small
+POSTHOOK: query: CREATE TABLE t2_small(`dec` decimal(4,0)) STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t2_small
+PREHOOK: query: INSERT INTO TABLE t2 select `dec` from over1k_small
+PREHOOK: type: QUERY
+PREHOOK: Input: default@over1k_small
+PREHOOK: Output: default@t2
+POSTHOOK: query: INSERT INTO TABLE t2 select `dec` from over1k_small
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@over1k_small
+POSTHOOK: Output: default@t2
+POSTHOOK: Lineage: t2.dec EXPRESSION [(over1k_small)over1k_small.FieldSchema(name:dec, type:decimal(4,2), comment:null), ]
+PREHOOK: query: explain vectorization detail
+select t1_small.`dec`, t2_small.`dec` from t1_small join t2_small on (t1_small.`dec`=t2_small.`dec`)
+PREHOOK: type: QUERY
+POSTHOOK: query: explain vectorization detail
+select t1_small.`dec`, t2_small.`dec` from t1_small join t2_small on (t1_small.`dec`=t2_small.`dec`)
+POSTHOOK: type: QUERY
+PLAN VECTORIZATION:
+ enabled: true
+ enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+ Stage: Stage-1
+ Tez
+#### A masked pattern was here ####
+ Edges:
+ Map 1 <- Map 2 (BROADCAST_EDGE)
+#### A masked pattern was here ####
+ Vertices:
+ Map 1
+ Map Operator Tree:
+ TableScan
+ alias: t1_small
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
+ vectorizationSchemaColumns: [0:dec:decimal(4,2), 1:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
+ Filter Operator
+ Filter Vectorization:
+ className: VectorFilterOperator
+ native: true
+ predicateExpression: SelectColumnIsNotNull(col 0:decimal(4,2))
+ predicate: dec is not null (type: boolean)
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Select Operator
+ expressions: dec (type: decimal(4,2))
+ outputColumnNames: _col0
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [0]
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Map Join Operator
+ condition map:
+ Inner Join 0 to 1
+ keys:
+ 0 _col0 (type: decimal(6,2))
+ 1 _col0 (type: decimal(6,2))
+ Map Join Vectorization:
+ className: VectorMapJoinOperator
+ native: false
+ nativeConditionsMet: hive.mapjoin.optimized.hashtable IS true, hive.vectorized.execution.mapjoin.native.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, One MapJoin Condition IS true, No nullsafe IS true, Small table vectorizes IS true
+ nativeConditionsNotMet: Optimized Table and Supports Key Types IS false
+ nativeNotSupportedKeyTypes: DECIMAL
+ outputColumnNames: _col0, _col1
+ input vertices:
+ 1 Map 2
+ Statistics: Num rows: 1 Data size: 123 Basic stats: COMPLETE Column stats: NONE
+ File Output Operator
+ compressed: false
+ File Sink Vectorization:
+ className: VectorFileSinkOperator
+ native: false
+ Statistics: Num rows: 1 Data size: 123 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
+ Execution mode: vectorized, llap
+ LLAP IO: all inputs
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: false
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ rowBatchContext:
+ dataColumnCount: 1
+ includeColumns: [0]
+ dataColumns: dec:decimal(4,2)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
+ Map 2
+ Map Operator Tree:
+ TableScan
+ alias: t2_small
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
+ vectorizationSchemaColumns: [0:dec:decimal(4,0), 1:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
+ Filter Operator
+ Filter Vectorization:
+ className: VectorFilterOperator
+ native: true
+ predicateExpression: SelectColumnIsNotNull(col 0:decimal(4,0))
+ predicate: dec is not null (type: boolean)
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Select Operator
+ expressions: dec (type: decimal(4,0))
+ outputColumnNames: _col0
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [0]
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Reduce Output Operator
+ key expressions: _col0 (type: decimal(6,2))
+ sort order: +
+ Map-reduce partition columns: _col0 (type: decimal(6,2))
+ Reduce Sink Vectorization:
+ className: VectorReduceSinkMultiKeyOperator
+ keyColumnNums: [0]
+ 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
+ valueColumnNums: []
+ Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Execution mode: vectorized, llap
+ LLAP IO: all inputs
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: true
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ rowBatchContext:
+ dataColumnCount: 1
+ includeColumns: [0]
+ dataColumns: dec:decimal(4,0)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+ Processor Tree:
+ ListSink
+
+PREHOOK: query: select t1_small.`dec`, t2_small.`dec` from t1_small join t2_small on (t1_small.`dec`=t2_small.`dec`)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_small
+PREHOOK: Input: default@t2_small
+#### A masked pattern was here ####
+POSTHOOK: query: select t1_small.`dec`, t2_small.`dec` from t1_small join t2_small on (t1_small.`dec`=t2_small.`dec`)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_small
+POSTHOOK: Input: default@t2_small
+#### A masked pattern was here ####
http://git-wip-us.apache.org/repos/asf/hive/blob/e63ebccc/ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out b/ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out
index f3fe7f2..270b634 100644
--- a/ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out
@@ -12,7 +12,7 @@ POSTHOOK: Lineage: decimal_test.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSc
POSTHOOK: Lineage: decimal_test.cdecimal1 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
POSTHOOK: Lineage: decimal_test.cdecimal2 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
POSTHOOK: Lineage: decimal_test.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-PREHOOK: query: explain vectorization expression
+PREHOOK: query: explain vectorization detail
select
cdecimal1
,Round(cdecimal1, 2)
@@ -49,7 +49,7 @@ where cbigint % 500 = 0
and sin(cdecimal1) >= -1.0
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select
cdecimal1
,Round(cdecimal1, 2)
@@ -106,12 +106,12 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 1401000 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
- projectedOutputColumns: [0, 1, 2, 3]
+ vectorizationSchemaColumns: [0:cbigint:bigint, 1:cdouble:double, 2:cdecimal1:decimal(20,10), 3:cdecimal2:decimal(23,14), 4:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
native: true
- predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 4, val 0)(children: LongColModuloLongScalar(col 0, val 500) -> 4:long) -> boolean, FilterDoubleColGreaterEqualDoubleScalar(col 6, val -1.0)(children: FuncSinDoubleToDouble(col 5)(children: CastDecimalToDouble(col 2) -> 5:double) -> 6:double) -> boolean) -> boolean
+ predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 7:double, val -1.0)(children: FuncSinDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 6:double) -> 7:double))
predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0)) (type: boolean)
Statistics: Num rows: 2048 Data size: 233500 Basic stats: COMPLETE Column stats: NONE
Select Operator
@@ -120,8 +120,8 @@ STAGE PLANS:
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumns: [2, 7, 8, 9, 10, 5, 11, 12, 13, 15, 16, 6, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 2, 28, 4, 29]
- selectExpressions: FuncRoundWithNumDigitsDecimalToDecimal(col 2, decimalPlaces 2) -> 7:decimal(13,2), FuncRoundDecimalToDecimal(col 2) -> 8:decimal(11,0), FuncFloorDecimalToDecimal(col 2) -> 9:decimal(11,0), FuncCeilDecimalToDecimal(col 2) -> 10:decimal(11,0), RoundWithNumDigitsDoubleToDouble(col 6, decimalPlaces 58)(children: FuncExpDoubleToDouble(col 5)(children: CastDecimalToDouble(col 2) -> 5:double) -> 6:double) -> 5:double, FuncLnDoubleToDouble(col 6)(children: CastDecimalToDouble(col 2) -> 6:double) -> 11:double, FuncLog10DoubleToDouble(col 6)(children: CastDecimalToDouble(col 2) -> 6:double) -> 12:double, FuncLog2DoubleToDouble(col 6)(children: CastDecimalToDouble(col 2) -> 6:double) -> 13:double, FuncLog2DoubleToDouble(col 6)(children: CastDecimalToDouble(col 14)(children: DecimalColSubtractDecimalScalar(col 2, val 15601) -> 14:decimal(21,10)) -> 6:double) -> 15:double, FuncLogWithBaseDoubleToDouble(col 6)(children: CastDecimalToDouble(col 2) -> 6:
double) -> 16:double, FuncPowerDoubleToDouble(col 17)(children: FuncLog2DoubleToDouble(col 6)(children: CastDecimalToDouble(col 2) -> 6:double) -> 17:double) -> 6:double, FuncPowerDoubleToDouble(col 18)(children: FuncLog2DoubleToDouble(col 17)(children: CastDecimalToDouble(col 2) -> 17:double) -> 18:double) -> 17:double, FuncSqrtDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 19:double, FuncAbsDecimalToDecimal(col 2) -> 20:decimal(20,10), FuncSinDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 21:double, FuncASinDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 22:double, FuncCosDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 23:double, FuncACosDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 24:double, FuncATanDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 25:double, FuncDegreesDoubleToDouble(col 18)(children: Cas
tDecimalToDouble(col 2) -> 18:double) -> 26:double, FuncRadiansDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 27:double, FuncNegateDecimalToDecimal(col 2) -> 28:decimal(20,10), FuncSignDecimalToLong(col 2) -> 4:int, FuncCosDoubleToDouble(col 18)(children: DoubleColAddDoubleScalar(col 29, val 3.14159)(children: DoubleColUnaryMinus(col 18)(children: FuncSinDoubleToDouble(col 29)(children: FuncLnDoubleToDouble(col 18)(children: CastDecimalToDouble(col 2) -> 18:double) -> 29:double) -> 18:double) -> 29:double) -> 18:double) -> 29:double
+ projectedOutputColumnNums: [2, 8, 9, 10, 11, 6, 12, 13, 14, 16, 17, 7, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 2, 29, 5, 30]
+ selectExpressions: FuncRoundWithNumDigitsDecimalToDecimal(col 2:decimal(20,10), decimalPlaces 2) -> 8:decimal(13,2), FuncRoundDecimalToDecimal(col 2:decimal(20,10)) -> 9:decimal(11,0), FuncFloorDecimalToDecimal(col 2:decimal(20,10)) -> 10:decimal(11,0), FuncCeilDecimalToDecimal(col 2:decimal(20,10)) -> 11:decimal(11,0), RoundWithNumDigitsDoubleToDouble(col 7, decimalPlaces 58)(children: FuncExpDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 6:double) -> 7:double) -> 6:double, FuncLnDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 7:double) -> 12:double, FuncLog10DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 7:double) -> 13:double, FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 7:double) -> 14:double, FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 15:decimal(21,10))(children: Decimal
ColSubtractDecimalScalar(col 2:decimal(20,10), val 15601) -> 15:decimal(21,10)) -> 7:double) -> 16:double, FuncLogWithBaseDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 7:double) -> 17:double, FuncPowerDoubleToDouble(col 18:double)(children: FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 7:double) -> 18:double) -> 7:double, FuncPowerDoubleToDouble(col 19:double)(children: FuncLog2DoubleToDouble(col 18:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 18:double) -> 19:double) -> 18:double, FuncSqrtDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 20:double, FuncAbsDecimalToDecimal(col 2:decimal(20,10)) -> 21:decimal(20,10), FuncSinDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 22:double, FuncASinDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -
> 23:double, FuncCosDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 24:double, FuncACosDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 25:double, FuncATanDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 26:double, FuncDegreesDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 27:double, FuncRadiansDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 19:double) -> 28:double, FuncNegateDecimalToDecimal(col 2:decimal(20,10)) -> 29:decimal(20,10), FuncSignDecimalToLong(col 2:decimal(20,10)) -> 5:int, FuncCosDoubleToDouble(col 19:double)(children: DoubleColAddDoubleScalar(col 30:double, val 3.14159)(children: DoubleColUnaryMinus(col 19:double)(children: FuncSinDoubleToDouble(col 30:double)(children: FuncLnDoubleToDouble(col 19:double)(children: CastDecimalToDou
ble(col 2:decimal(20,10)) -> 19:double) -> 30:double) -> 19:double) -> 30:double) -> 19:double) -> 30:double
Statistics: Num rows: 2048 Data size: 233500 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
@@ -138,11 +138,18 @@ STAGE PLANS:
Map Vectorization:
enabled: true
enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
- groupByVectorOutput: true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 4
+ includeColumns: [0, 2]
+ dataColumns: cbigint:bigint, cdouble:double, cdecimal1:decimal(20,10), cdecimal2:decimal(23,14)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, double, double, decimal(13,2), decimal(11,0), decimal(11,0), decimal(11,0), double, double, double, decimal(21,10), double, double, double, double, double, decimal(20,10), double, double, double, double, double, double, double, decimal(20,10), double]
Stage: Stage-0
Fetch Operator
@@ -157,7 +164,7 @@ PREHOOK: query: select
,Floor(cdecimal1)
,Ceil(cdecimal1)
,round(Exp(cdecimal1), 58)
- ,Ln(cdecimal1)
+ ,Ln(cdecimal1)
,Log10(cdecimal1)
-- Use log2 as a representative function to test all input types.
,Log2(cdecimal1)
@@ -195,7 +202,7 @@ POSTHOOK: query: select
,Floor(cdecimal1)
,Ceil(cdecimal1)
,round(Exp(cdecimal1), 58)
- ,Ln(cdecimal1)
+ ,Ln(cdecimal1)
,Log10(cdecimal1)
-- Use log2 as a representative function to test all input types.
,Log2(cdecimal1)
@@ -237,3 +244,249 @@ POSTHOOK: Input: default@decimal_test
-4298.1513513514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1513513514 -0.43730633941118113 NULL 0.899312607223313 NULL -1.5705636686355597 -246265.93214088667 -75.01689283012556 -4298.1513513514 4298.1513513514 -1 NULL
-4298.1513513514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1513513514 -0.43730633941118113 NULL 0.899312607223313 NULL -1.5705636686355597 -246265.93214088667 -75.01689283012556 -4298.1513513514 4298.1513513514 -1 NULL
-4298.1513513514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1513513514 -0.43730633941118113 NULL 0.899312607223313 NULL -1.5705636686355597 -246265.93214088667 -75.01689283012556 -4298.1513513514 4298.1513513514 -1 NULL
+PREHOOK: query: CREATE TABLE decimal_test_small STORED AS ORC AS SELECT cbigint, cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(12,4)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(14,8)) AS cdecimal2 FROM alltypesorc
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@alltypesorc
+PREHOOK: Output: database:default
+PREHOOK: Output: default@decimal_test_small
+POSTHOOK: query: CREATE TABLE decimal_test_small STORED AS ORC AS SELECT cbigint, cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(12,4)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(14,8)) AS cdecimal2 FROM alltypesorc
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@alltypesorc
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@decimal_test_small
+POSTHOOK: Lineage: decimal_test_small.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: decimal_test_small.cdecimal1 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: decimal_test_small.cdecimal2 EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: decimal_test_small.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+PREHOOK: query: explain vectorization detail
+select
+ cdecimal1
+ ,Round(cdecimal1, 2)
+ ,Round(cdecimal1)
+ ,Floor(cdecimal1)
+ ,Ceil(cdecimal1)
+ ,round(Exp(cdecimal1), 58)
+ ,Ln(cdecimal1)
+ ,Log10(cdecimal1)
+ -- Use log2 as a representative function to test all input types.
+ ,Log2(cdecimal1)
+ -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+ ,Log2(cdecimal1 - 15601.0)
+ ,Log(2.0, cdecimal1)
+ ,Pow(log2(cdecimal1), 2.0)
+ ,Power(log2(cdecimal1), 2.0)
+ ,Sqrt(cdecimal1)
+ ,Abs(cdecimal1)
+ ,Sin(cdecimal1)
+ ,Asin(cdecimal1)
+ ,Cos(cdecimal1)
+ ,ACos(cdecimal1)
+ ,Atan(cdecimal1)
+ ,Degrees(cdecimal1)
+ ,Radians(cdecimal1)
+ ,Positive(cdecimal1)
+ ,Negative(cdecimal1)
+ ,Sign(cdecimal1)
+ -- Test nesting
+ ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test_small
+
+where cbigint % 500 = 0
+
+and sin(cdecimal1) >= -1.0
+PREHOOK: type: QUERY
+POSTHOOK: query: explain vectorization detail
+select
+ cdecimal1
+ ,Round(cdecimal1, 2)
+ ,Round(cdecimal1)
+ ,Floor(cdecimal1)
+ ,Ceil(cdecimal1)
+ ,round(Exp(cdecimal1), 58)
+ ,Ln(cdecimal1)
+ ,Log10(cdecimal1)
+ -- Use log2 as a representative function to test all input types.
+ ,Log2(cdecimal1)
+ -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+ ,Log2(cdecimal1 - 15601.0)
+ ,Log(2.0, cdecimal1)
+ ,Pow(log2(cdecimal1), 2.0)
+ ,Power(log2(cdecimal1), 2.0)
+ ,Sqrt(cdecimal1)
+ ,Abs(cdecimal1)
+ ,Sin(cdecimal1)
+ ,Asin(cdecimal1)
+ ,Cos(cdecimal1)
+ ,ACos(cdecimal1)
+ ,Atan(cdecimal1)
+ ,Degrees(cdecimal1)
+ ,Radians(cdecimal1)
+ ,Positive(cdecimal1)
+ ,Negative(cdecimal1)
+ ,Sign(cdecimal1)
+ -- Test nesting
+ ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test_small
+
+where cbigint % 500 = 0
+
+and sin(cdecimal1) >= -1.0
+POSTHOOK: type: QUERY
+PLAN VECTORIZATION:
+ enabled: true
+ enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+ Stage: Stage-1
+ Tez
+#### A masked pattern was here ####
+ Vertices:
+ Map 1
+ Map Operator Tree:
+ TableScan
+ alias: decimal_test_small
+ Statistics: Num rows: 12288 Data size: 1401000 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
+ vectorizationSchemaColumns: [0:cbigint:bigint, 1:cdouble:double, 2:cdecimal1:decimal(12,4), 3:cdecimal2:decimal(14,8), 4:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
+ Filter Operator
+ Filter Vectorization:
+ className: VectorFilterOperator
+ native: true
+ predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 7:double, val -1.0)(children: FuncSinDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 6:double) -> 7:double))
+ predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0)) (type: boolean)
+ Statistics: Num rows: 2048 Data size: 233500 Basic stats: COMPLETE Column stats: NONE
+ Select Operator
+ expressions: cdecimal1 (type: decimal(12,4)), round(cdecimal1, 2) (type: decimal(11,2)), round(cdecimal1) (type: decimal(9,0)), floor(cdecimal1) (type: decimal(9,0)), ceil(cdecimal1) (type: decimal(9,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601)) (type: double), log(2, cdecimal1) (type: double), power(log2(cdecimal1), 2) (type: double), power(log2(cdecimal1), 2) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(12,4)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(12,4)), (- cdecimal1) (type: decimal(12,4)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159)) (type: double)
+ 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
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [2, 8, 9, 10, 11, 6, 12, 13, 14, 16, 17, 7, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 2, 29, 5, 30]
+ selectExpressions: FuncRoundWithNumDigitsDecimalToDecimal(col 2:decimal(12,4), decimalPlaces 2) -> 8:decimal(11,2), FuncRoundDecimalToDecimal(col 2:decimal(12,4)) -> 9:decimal(9,0), FuncFloorDecimalToDecimal(col 2:decimal(12,4)) -> 10:decimal(9,0), FuncCeilDecimalToDecimal(col 2:decimal(12,4)) -> 11:decimal(9,0), RoundWithNumDigitsDoubleToDouble(col 7, decimalPlaces 58)(children: FuncExpDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 6:double) -> 7:double) -> 6:double, FuncLnDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 7:double) -> 12:double, FuncLog10DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 7:double) -> 13:double, FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 7:double) -> 14:double, FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 15:decimal(13,4))(children: DecimalColSubtractD
ecimalScalar(col 2:decimal(12,4), val 15601) -> 15:decimal(13,4)) -> 7:double) -> 16:double, FuncLogWithBaseDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 7:double) -> 17:double, FuncPowerDoubleToDouble(col 18:double)(children: FuncLog2DoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 7:double) -> 18:double) -> 7:double, FuncPowerDoubleToDouble(col 19:double)(children: FuncLog2DoubleToDouble(col 18:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 18:double) -> 19:double) -> 18:double, FuncSqrtDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 20:double, FuncAbsDecimalToDecimal(col 2:decimal(12,4)) -> 21:decimal(12,4), FuncSinDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 22:double, FuncASinDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 23:double, FuncCosDo
ubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 24:double, FuncACosDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 25:double, FuncATanDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 26:double, FuncDegreesDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 27:double, FuncRadiansDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19:double) -> 28:double, FuncNegateDecimalToDecimal(col 2:decimal(12,4)) -> 29:decimal(12,4), FuncSignDecimalToLong(col 2:decimal(12,4)) -> 5:int, FuncCosDoubleToDouble(col 19:double)(children: DoubleColAddDoubleScalar(col 30:double, val 3.14159)(children: DoubleColUnaryMinus(col 19:double)(children: FuncSinDoubleToDouble(col 30:double)(children: FuncLnDoubleToDouble(col 19:double)(children: CastDecimalToDouble(col 2:decimal(12,4)) -> 19
:double) -> 30:double) -> 19:double) -> 30:double) -> 19:double) -> 30:double
+ Statistics: Num rows: 2048 Data size: 233500 Basic stats: COMPLETE Column stats: NONE
+ File Output Operator
+ compressed: false
+ File Sink Vectorization:
+ className: VectorFileSinkOperator
+ native: false
+ Statistics: Num rows: 2048 Data size: 233500 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
+ Execution mode: vectorized, llap
+ LLAP IO: all inputs
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: false
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ rowBatchContext:
+ dataColumnCount: 4
+ includeColumns: [0, 2]
+ dataColumns: cbigint:bigint, cdouble:double, cdecimal1:decimal(12,4), cdecimal2:decimal(14,8)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, double, double, decimal(11,2), decimal(9,0), decimal(9,0), decimal(9,0), double, double, double, decimal(13,4), double, double, double, double, double, decimal(12,4), double, double, double, double, double, double, double, decimal(12,4), double]
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+ Processor Tree:
+ ListSink
+
+PREHOOK: query: select
+ cdecimal1
+ ,Round(cdecimal1, 2)
+ ,Round(cdecimal1)
+ ,Floor(cdecimal1)
+ ,Ceil(cdecimal1)
+ ,round(Exp(cdecimal1), 58)
+ ,Ln(cdecimal1)
+ ,Log10(cdecimal1)
+ -- Use log2 as a representative function to test all input types.
+ ,Log2(cdecimal1)
+ -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+ ,Log2(cdecimal1 - 15601.0)
+ ,Log(2.0, cdecimal1)
+ ,Pow(log2(cdecimal1), 2.0)
+ ,Power(log2(cdecimal1), 2.0)
+ ,Sqrt(cdecimal1)
+ ,Abs(cdecimal1)
+ ,Sin(cdecimal1)
+ ,Asin(cdecimal1)
+ ,Cos(cdecimal1)
+ ,ACos(cdecimal1)
+ ,Atan(cdecimal1)
+ ,Degrees(cdecimal1)
+ ,Radians(cdecimal1)
+ ,Positive(cdecimal1)
+ ,Negative(cdecimal1)
+ ,Sign(cdecimal1)
+ -- Test nesting
+ ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test_small
+
+where cbigint % 500 = 0
+
+and sin(cdecimal1) >= -1.0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_test_small
+#### A masked pattern was here ####
+POSTHOOK: query: select
+ cdecimal1
+ ,Round(cdecimal1, 2)
+ ,Round(cdecimal1)
+ ,Floor(cdecimal1)
+ ,Ceil(cdecimal1)
+ ,round(Exp(cdecimal1), 58)
+ ,Ln(cdecimal1)
+ ,Log10(cdecimal1)
+ -- Use log2 as a representative function to test all input types.
+ ,Log2(cdecimal1)
+ -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+ ,Log2(cdecimal1 - 15601.0)
+ ,Log(2.0, cdecimal1)
+ ,Pow(log2(cdecimal1), 2.0)
+ ,Power(log2(cdecimal1), 2.0)
+ ,Sqrt(cdecimal1)
+ ,Abs(cdecimal1)
+ ,Sin(cdecimal1)
+ ,Asin(cdecimal1)
+ ,Cos(cdecimal1)
+ ,ACos(cdecimal1)
+ ,Atan(cdecimal1)
+ ,Degrees(cdecimal1)
+ ,Radians(cdecimal1)
+ ,Positive(cdecimal1)
+ ,Negative(cdecimal1)
+ ,Sign(cdecimal1)
+ -- Test nesting
+ ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test_small
+
+where cbigint % 500 = 0
+
+and sin(cdecimal1) >= -1.0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_test_small
+#### A masked pattern was here ####
+-119.4595 -119.46 -119 -120 -119 1.316432E-52 NULL NULL NULL NULL NULL NULL NULL NULL 119.4595 -0.07889708102860798 NULL 0.9968827667309558 NULL -1.562425484435015 -6844.525172743059 -2.084961597786166 -119.4595 119.4595 -1 NULL
+9318.4351 9318.44 9318 9318 9319 Infinity 9.139749985856234 3.9693429848326867 13.185871979559764 NULL 13.185871979559764 173.86721986133932 173.86721986133932 96.5320418306792 9318.4351 0.4540355436693385 NULL 0.8909835717255892 NULL 1.5706890126390936 533907.0028965673 162.63737362840706 9318.4351 -9318.4351 1 -0.9607267407188516
+9318.4351 9318.44 9318 9318 9319 Infinity 9.139749985856234 3.9693429848326867 13.185871979559764 NULL 13.185871979559764 173.86721986133932 173.86721986133932 96.5320418306792 9318.4351 0.4540355436693385 NULL 0.8909835717255892 NULL 1.5706890126390936 533907.0028965673 162.63737362840706 9318.4351 -9318.4351 1 -0.9607267407188516
+9318.4351 9318.44 9318 9318 9319 Infinity 9.139749985856234 3.9693429848326867 13.185871979559764 NULL 13.185871979559764 173.86721986133932 173.86721986133932 96.5320418306792 9318.4351 0.4540355436693385 NULL 0.8909835717255892 NULL 1.5706890126390936 533907.0028965673 162.63737362840706 9318.4351 -9318.4351 1 -0.9607267407188516
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL
+-4298.1514 -4298.15 -4298 -4299 -4298 0.0 NULL NULL NULL NULL NULL NULL NULL NULL 4298.1514 -0.4373500891926774 NULL 0.8992913318180917 NULL -1.5705636686381932 -246265.9349282461 -75.01689367920379 -4298.1514 4298.1514 -1 NULL