http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out 
b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
index 0f958e8..218a5cf 100644
--- a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
@@ -149,8 +149,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [1, 3, 9, 10, 11, 8, 12, 7, 
6, 17, 2]
-                        selectExpressions: VectorUDFAdaptor(CASE WHEN 
((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') 
WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN 
(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 
23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= 
TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE 
('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, 
right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN 
((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN 
((ctimestamp2 < TIME
 STAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN 
TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') 
THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 
23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 5:boolean, TimestampColLessTimestampScalar(col 
3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 8:boolean) -> 10:string, 
VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 
23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 
00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 
00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN (
 'Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) 
THEN (null) ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2000-12-31 23:59:59.999999999) -> 5:boolean, 
TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, 
right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 8:boolean) -> 11:string, IfExprLongColumnLongColumn(col 
5:boolean, col 6:int, col 7:int)(children: TimestampColLessTimestampScalar(col 
1:timestamp, val 1974-10-04 17:21:03.989) -> 5:boolean, 
VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 6:int, 
VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 7:int) -> 8:int, 
VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE 
('2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(co
 l 2:string) -> 5:boolean) -> 12:string, VectorUDFAdaptor(if((ctimestamp1 = 
TIMESTAMP'2021-09-24 03:18:32.413655165'), null, 
minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 
1:timestamp, val 2021-09-24 03:18:32.413655165) -> 5:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, 
VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and 
(ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), 
null))(children: ColAndCol(col 5:boolean, col 6:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 6:boolean) -> 13:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 5:int) -> 6:int, 
IfExprLongColumnLongColumn(col 5:boolean, col 13:date, col 16:date)(children: 
DoubleColGreaterDoubleScalar(col 15:double, val 100.0)(children: DoubleColM
 oduloDoubleScalar(col 14:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 14:double) -> 15:double) -> 
5:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 13:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 16:date) -> 17:date
+                        projectedOutputColumnNums: [1, 3, 9, 14, 19, 23, 25, 
28, 33, 39, 2]
+                        selectExpressions: VectorUDFAdaptor(CASE WHEN 
((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') 
WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN 
(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 
23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= 
TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE 
('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, 
right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN 
((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN 
((ctimestamp2 < TIME
 STAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN 
TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') 
THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 
23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 10:boolean, TimestampColLessTimestampScalar(col 
3:timestamp, val 2006-01-01 00:00:00) -> 11:boolean, TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 12:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 13:boolean) -> 14:string, 
VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 
23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 
00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 
00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') TH
 EN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 
23:59:59.999999999')) THEN (null) ELSE (null) END)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 15:boolean, TimestampColLessTimestampScalar(col 
3:timestamp, val 2006-01-01 00:00:00) -> 16:boolean, TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 17:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 18:boolean) -> 19:string, 
IfExprLongColumnLongColumn(col 20:boolean, col 21:int, col 22:int)(children: 
TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) 
-> 20:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 21:int, 
VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 22:int) -> 23:int, 
VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE 
('2018-03-08 23:04:59') END)(children: SelectStringColLike
 StringScalar(col 2:string) -> 24:boolean) -> 25:string, 
VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), 
null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 
1:timestamp, val 2021-09-24 03:18:32.413655165) -> 26:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 27:int) -> 28:int, 
VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and 
(ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), 
null))(children: ColAndCol(col 29:boolean, col 30:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 29:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 30:boolean) -> 31:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 32:int) -> 33:int, 
IfExprLongColumnLongColumn(col 36:boolean, col 37:date, col 38:date)(children: 
DoubleColGreaterDoubleScalar(col 35:double, val 1
 00.0)(children: DoubleColModuloDoubleScalar(col 34:double, val 
500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 34:double) -> 
35:double) -> 36:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 
37:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 38:date) -> 39:date
                     Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)
@@ -160,7 +160,7 @@ STAGE PLANS:
                           keyColumns: 1:timestamp, 2:string, 3:timestamp
                           native: true
                           nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          valueColumns: 9:string, 10:string, 11:string, 8:int, 
12:string, 7:int, 6:int, 17:date
+                          valueColumns: 9:string, 14:string, 19:string, 
23:int, 25:string, 28:int, 33:int, 39:date
                       Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: int), _col8 (type: int), _col9 (type: date)
             Execution mode: vectorized, llap
@@ -179,7 +179,7 @@ STAGE PLANS:
                     includeColumns: [0, 1, 2, 3]
                     dataColumns: cdate:date, ctimestamp1:timestamp, 
stimestamp1:string, ctimestamp2:timestamp
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, string, bigint, double, double, bigint, bigint]
+                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, 
string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, 
bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, 
bigint]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -438,8 +438,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [1, 3, 10, 12, 13, 14, 11, 
7, 16, 23, 2]
-                        selectExpressions: 
IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 
9:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 
6:boolean, val 1900scol 10:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val 
Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 
9:string) -> 10:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val 
Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2
 000-12-31 23:59:59.999999999) -> 5:boolean, 
IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 
12:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 
7:boolean, val Late 2000scol 11:string)(children: TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 7:boolean, IfExprColumnNull(col 8:boolean, col 9:string, null)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 8:boolean, ConstantVectorExpression(val Early 2010s) -> 
9:string) -> 11:string) -> 12:string) -> 11:string) -> 12:string, 
IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 
11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2000-12-31 23:59:59.999999999) -> 5:boolean, 
IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 
13:string)(children: TimestampCol
 LessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, 
IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
IfExprNullNull(null, null) -> 11:string) -> 13:string) -> 11:string) -> 
13:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 
7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 
7:int) -> 14:int, IfExprStringGroupColumnStringScalar(col 5:boolean, col 
2:string, val 2018-03-08 23:04:59)(children: 
SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 11:string, 
IfExprNullColumn(col 5:boolean, null, col 6)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 
03:18:32.413655165) -> 5:boolean, 
 VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 6:int) -> 7:int, 
IfExprColumnNull(col 17:boolean, col 15:int, null)(children: ColAndCol(col 
15:boolean, col 16:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 16:boolean) -> 17:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 15:int) -> 16:int, 
IfExprLongColumnLongColumn(col 20:boolean, col 21:date, col 22:date)(children: 
DoubleColGreaterDoubleScalar(col 19:double, val 100.0)(children: 
DoubleColModuloDoubleScalar(col 18:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 18:double) -> 19:double) -> 
20:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 21:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 22:date) -> 23:date
+                        projectedOutputColumnNums: [1, 3, 12, 21, 28, 32, 34, 
37, 42, 48, 2]
+                        selectExpressions: 
IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 
11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 
6:boolean, val 1900scol 10:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val 
Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 
11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 13:boolean, 
val Oldcol 20:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, va
 l 2000-12-31 23:59:59.999999999) -> 13:boolean, 
IfExprStringScalarStringGroupColumn(col 14:boolean, val Early 2000scol 
19:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 14:boolean, IfExprStringScalarStringGroupColumn(col 
15:boolean, val Late 2000scol 18:string)(children: TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 15:boolean, IfExprColumnNull(col 16:boolean, col 17:string, null)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Early 2010s) -> 
17:string) -> 18:string) -> 19:string) -> 20:string) -> 21:string, 
IfExprStringScalarStringGroupColumn(col 22:boolean, val Oldcol 
27:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2000-12-31 23:59:59.999999999) -> 22:boolean, 
IfExprStringScalarStringGroupColumn(col 23:boolean, val Early 2000scol 
26:string)(childre
 n: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) 
-> 23:boolean, IfExprStringScalarStringGroupColumn(col 24:boolean, val Late 
2000scol 25:string)(children: TimestampColumnBetween(col 3:timestamp, left 
2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 24:boolean, 
IfExprNullNull(null, null) -> 25:string) -> 26:string) -> 27:string) -> 
28:string, IfExprLongColumnLongColumn(col 29:boolean, col 30:int, col 
31:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 29:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 30:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 
31:int) -> 32:int, IfExprStringGroupColumnStringScalar(col 33:boolean, col 
2:string, val 2018-03-08 23:04:59)(children: 
SelectStringColLikeStringScalar(col 2:string) -> 33:boolean) -> 34:string, 
IfExprNullColumn(col 35:boolean, null, col 36)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:
 32.413655165) -> 35:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field 
MINUTE) -> 36:int) -> 37:int, IfExprColumnNull(col 40:boolean, col 41:int, 
null)(children: ColAndCol(col 38:boolean, col 39:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 38:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 39:boolean) -> 40:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 41:int) -> 42:int, 
IfExprLongColumnLongColumn(col 45:boolean, col 46:date, col 47:date)(children: 
DoubleColGreaterDoubleScalar(col 44:double, val 100.0)(children: 
DoubleColModuloDoubleScalar(col 43:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 43:double) -> 44:double) -> 
45:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 46:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 47:date) -> 48:date
                     Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)
@@ -449,7 +449,7 @@ STAGE PLANS:
                           keyColumns: 1:timestamp, 2:string, 3:timestamp
                           native: true
                           nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          valueColumns: 10:string, 12:string, 13:string, 
14:int, 11:string, 7:int, 16:int, 23:date
+                          valueColumns: 12:string, 21:string, 28:string, 
32:int, 34:string, 37:int, 42:int, 48:date
                       Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: int), _col8 (type: int), _col9 (type: date)
             Execution mode: vectorized, llap
@@ -468,7 +468,7 @@ STAGE PLANS:
                     includeColumns: [0, 1, 2, 3]
                     dataColumns: cdate:date, ctimestamp1:timestamp, 
stimestamp1:string, ctimestamp2:timestamp
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, string, string, bigint, bigint, bigint, bigint, double, 
double, bigint, bigint, bigint, bigint]
+                    scratchColumnTypeNames: [bigint, bigint, bigint, bigint, 
string, string, string, string, bigint, bigint, bigint, bigint, string, string, 
string, string, string, bigint, bigint, bigint, string, string, string, string, 
bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, 
bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -727,8 +727,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [1, 3, 15, 26, 36, 40, 42, 
44, 46, 53, 2]
-                        selectExpressions: IfExprColumnCondExpr(col 5:boolean, 
col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, 
ConstantVectorExpression(val 1800s or Earlier) -> 6:string, 
IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, 
IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 
2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 
2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 
13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(co
 l 11:boolean, col 16:stringcol 25:string)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 11:boolean, ConstantVectorExpression(val Old) -> 
16:string, IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 
24:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 17:boolean, ConstantVectorExpression(val Early 2000s) 
-> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 
23:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 19:boolean, 
ConstantVectorExpression(val Late 2000s) -> 20:string, IfExprColumnNull(col 
21:boolean, col 22:string, null)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 21:boolean, ConstantVectorExpression(val Early 2010s) -> 
22:string) -> 23:string) -> 24:string) -> 25:string) -> 26:string, 
IfExprColumnCondExpr(col 27:boolean, col 28
 :stringcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2000-12-31 23:59:59.999999999) -> 27:boolean, 
ConstantVectorExpression(val Old) -> 28:string, IfExprColumnCondExpr(col 
29:boolean, col 30:stringcol 34:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
29:boolean, ConstantVectorExpression(val Early 2000s) -> 30:string, 
IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 33:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 31:boolean, ConstantVectorExpression(val Late 
2000s) -> 32:string, IfExprNullNull(null, null) -> 33:string) -> 34:string) -> 
35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 
39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:time
 stamp, field YEAR) -> 39:int) -> 40:int, 
IfExprStringGroupColumnStringScalar(col 41:boolean, col 2:string, val 
2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 
41:boolean) -> 42:string, IfExprNullCondExpr(col 41:boolean, null, col 
43:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 
2021-09-24 03:18:32.413655165) -> 41:boolean, VectorUDFMinuteTimestamp(col 
1:timestamp, field MINUTE) -> 43:int) -> 44:int, IfExprCondExprNull(col 
47:boolean, col 45:int, null)(children: ColAndCol(col 45:boolean, col 
46:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, 
val 5344-10-04 18:40:08.165) -> 45:boolean, TimestampColLessTimestampScalar(col 
3:timestamp, val 6631-11-13 16:31:29.702202248) -> 46:boolean) -> 47:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, 
IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: 
DoubleColGreaterDoubleScalar(col 49:double, val 100.0)(chi
 ldren: DoubleColModuloDoubleScalar(col 48:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 48:double) -> 49:double) -> 
50:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 51:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 52:date) -> 53:date
+                        projectedOutputColumnNums: [1, 3, 15, 27, 37, 41, 43, 
46, 51, 57, 2]
+                        selectExpressions: IfExprColumnCondExpr(col 5:boolean, 
col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, 
ConstantVectorExpression(val 1800s or Earlier) -> 6:string, 
IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, 
IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 
2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 
2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 
13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(co
 l 16:boolean, col 17:stringcol 26:string)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Old) -> 
17:string, IfExprColumnCondExpr(col 18:boolean, col 19:stringcol 
25:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 18:boolean, ConstantVectorExpression(val Early 2000s) 
-> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 
24:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 20:boolean, 
ConstantVectorExpression(val Late 2000s) -> 21:string, IfExprColumnNull(col 
22:boolean, col 23:string, null)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 22:boolean, ConstantVectorExpression(val Early 2010s) -> 
23:string) -> 24:string) -> 25:string) -> 26:string) -> 27:string, 
IfExprColumnCondExpr(col 28:boolean, col 29
 :stringcol 36:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2000-12-31 23:59:59.999999999) -> 28:boolean, 
ConstantVectorExpression(val Old) -> 29:string, IfExprColumnCondExpr(col 
30:boolean, col 31:stringcol 35:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
30:boolean, ConstantVectorExpression(val Early 2000s) -> 31:string, 
IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 34:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 32:boolean, ConstantVectorExpression(val Late 
2000s) -> 33:string, IfExprNullNull(null, null) -> 34:string) -> 35:string) -> 
36:string) -> 37:string, IfExprCondExprCondExpr(col 38:boolean, col 39:intcol 
40:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 38:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 39:int, VectorUDFYearTimestamp(col 3:time
 stamp, field YEAR) -> 40:int) -> 41:int, 
IfExprStringGroupColumnStringScalar(col 42:boolean, col 2:string, val 
2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 
42:boolean) -> 43:string, IfExprNullCondExpr(col 44:boolean, null, col 
45:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 
2021-09-24 03:18:32.413655165) -> 44:boolean, VectorUDFMinuteTimestamp(col 
1:timestamp, field MINUTE) -> 45:int) -> 46:int, IfExprCondExprNull(col 
49:boolean, col 50:int, null)(children: ColAndCol(col 47:boolean, col 
48:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, 
val 5344-10-04 18:40:08.165) -> 47:boolean, TimestampColLessTimestampScalar(col 
3:timestamp, val 6631-11-13 16:31:29.702202248) -> 48:boolean) -> 49:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 50:int) -> 51:int, 
IfExprCondExprCondExpr(col 54:boolean, col 55:datecol 56:date)(children: 
DoubleColGreaterDoubleScalar(col 53:double, val 100.0)(chi
 ldren: DoubleColModuloDoubleScalar(col 52:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 52:double) -> 53:double) -> 
54:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 55:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 56:date) -> 57:date
                     Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)
@@ -738,7 +738,7 @@ STAGE PLANS:
                           keyColumns: 1:timestamp, 2:string, 3:timestamp
                           native: true
                           nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          valueColumns: 15:string, 26:string, 36:string, 
40:int, 42:string, 44:int, 46:int, 53:date
+                          valueColumns: 15:string, 27:string, 37:string, 
41:int, 43:string, 46:int, 51:int, 57:date
                       Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: int), _col8 (type: int), _col9 (type: date)
             Execution mode: vectorized, llap
@@ -757,7 +757,7 @@ STAGE PLANS:
                     includeColumns: [0, 1, 2, 3]
                     dataColumns: cdate:date, ctimestamp1:timestamp, 
stimestamp1:string, ctimestamp2:timestamp
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [bigint, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, string, 
bigint, string, bigint, string, string, string, string, string, bigint, bigint, 
bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, double, 
double, bigint, bigint, bigint, bigint]
+                    scratchColumnTypeNames: [bigint, string, bigint, string, 
bigint, string, bigint, string, string, string, string, bigint, string, bigint, 
string, bigint, string, bigint, string, string, string, string, string, bigint, 
string, bigint, string, bigint, string, string, string, string, string, bigint, 
bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, 
bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_cast_constant.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_cast_constant.q.out 
b/ql/src/test/results/clientpositive/llap/vector_cast_constant.q.out
index b4c0ea5..1908b7d 100644
--- a/ql/src/test/results/clientpositive/llap/vector_cast_constant.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_cast_constant.q.out
@@ -219,8 +219,8 @@ STAGE PLANS:
                   Select Vectorization:
                       className: VectorSelectOperator
                       native: true
-                      projectedOutputColumnNums: [0, 8, 7, 11]
-                      selectExpressions: DoubleColDivideLongColumn(col 
7:double, col 2:bigint)(children: CastLongToDouble(col 1:bigint) -> 7:double) 
-> 8:double, DoubleColDivideLongColumn(col 3:double, col 4:bigint) -> 7:double, 
CastDecimalToDecimal(col 10:decimal(32,20))(children: 
DecimalColDivideDecimalColumn(col 5:decimal(12,0), col 
9:decimal(19,0))(children: CastLongToDecimal(col 6:bigint) -> 9:decimal(19,0)) 
-> 10:decimal(32,20)) -> 11:decimal(6,4)
+                      projectedOutputColumnNums: [0, 8, 9, 12]
+                      selectExpressions: DoubleColDivideLongColumn(col 
7:double, col 2:bigint)(children: CastLongToDouble(col 1:bigint) -> 7:double) 
-> 8:double, DoubleColDivideLongColumn(col 3:double, col 4:bigint) -> 9:double, 
CastDecimalToDecimal(col 11:decimal(32,20))(children: 
DecimalColDivideDecimalColumn(col 5:decimal(12,0), col 
10:decimal(19,0))(children: CastLongToDecimal(col 6:bigint) -> 
10:decimal(19,0)) -> 11:decimal(32,20)) -> 12:decimal(6,4)
                   Statistics: Num rows: 257 Data size: 33924 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col0 (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out 
b/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out
index fa1ddcd..39c041c 100644
--- a/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_coalesce.q.out
@@ -151,8 +151,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [5, 2, 18]
-                          selectExpressions: IfExprCondExprCondExpr(col 
16:boolean, col 17:doublecol 14:double)(children: ColAndCol(col 13:boolean, col 
15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 
14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 
15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 
14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 
17:double, ConstantVectorExpression(val 0.0) -> 14:double) -> 18:double
+                          projectedOutputColumnNums: [5, 2, 20]
+                          selectExpressions: IfExprCondExprCondExpr(col 
16:boolean, col 18:doublecol 19:double)(children: ColAndCol(col 13:boolean, col 
15:boolean)(children: IsNotNull(col 5:double) -> 13:boolean, IsNotNull(col 
14:double)(children: FuncLog2LongToDouble(col 2:int) -> 14:double) -> 
15:boolean) -> 16:boolean, DoubleColAddDoubleColumn(col 5:double, col 
17:double)(children: FuncLog2LongToDouble(col 2:int) -> 17:double) -> 
18:double, ConstantVectorExpression(val 0.0) -> 19:double) -> 20:double
                         Reduce Sink Vectorization:
                             className: VectorReduceSinkObjectHashOperator
                             native: true

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out 
b/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
index dbd8fde..e80e70a 100644
--- a/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
@@ -71,13 +71,13 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [1, 3]
-                        selectExpressions: CastStringToLong(col 
4:string)(children: IfExprStringGroupColumnStringScalar(col 3:boolean, col 
0:string, val 0)(children: IsNotNull(col 0:string) -> 3:boolean) -> 4:string) 
-> 3:int
+                        projectedOutputColumnNums: [1, 5]
+                        selectExpressions: CastStringToLong(col 
4:string)(children: IfExprStringGroupColumnStringScalar(col 3:boolean, col 
0:string, val 0)(children: IsNotNull(col 0:string) -> 3:boolean) -> 4:string) 
-> 5:int
                     Statistics: Num rows: 5 Data size: 680 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Group By Operator
                       aggregations: sum(_col1)
                       Group By Vectorization:
-                          aggregators: VectorUDAFSumLong(col 3:int) -> bigint
+                          aggregators: VectorUDAFSumLong(col 5:int) -> bigint
                           className: VectorGroupByOperator
                           groupByMode: HASH
                           keyExpressions: col 1:string
@@ -138,8 +138,8 @@ STAGE PLANS:
                   Select Vectorization:
                       className: VectorSelectOperator
                       native: true
-                      projectedOutputColumnNums: [0, 2]
-                      selectExpressions: RoundWithNumDigitsDoubleToDouble(col 
3, decimalPlaces 2)(children: DoubleColDivideDoubleScalar(col 2:double, val 
60.0)(children: CastLongToDouble(col 1:bigint) -> 2:double) -> 3:double) -> 
2:double
+                      projectedOutputColumnNums: [0, 4]
+                      selectExpressions: RoundWithNumDigitsDoubleToDouble(col 
3, decimalPlaces 2)(children: DoubleColDivideDoubleScalar(col 2:double, val 
60.0)(children: CastLongToDouble(col 1:bigint) -> 2:double) -> 3:double) -> 
4:double
                   Statistics: Num rows: 2 Data size: 186 Basic stats: COMPLETE 
Column stats: COMPLETE
                   File Output Operator
                     compressed: false
@@ -304,13 +304,13 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [1, 3]
-                        selectExpressions: CastStringToLong(col 
4:string)(children: IfExprStringGroupColumnStringScalar(col 3:boolean, col 
0:string, val 0)(children: IsNotNull(col 0:string) -> 3:boolean) -> 4:string) 
-> 3:int
+                        projectedOutputColumnNums: [1, 5]
+                        selectExpressions: CastStringToLong(col 
4:string)(children: IfExprStringGroupColumnStringScalar(col 3:boolean, col 
0:string, val 0)(children: IsNotNull(col 0:string) -> 3:boolean) -> 4:string) 
-> 5:int
                     Statistics: Num rows: 5 Data size: 680 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Group By Operator
                       aggregations: sum(_col1)
                       Group By Vectorization:
-                          aggregators: VectorUDAFSumLong(col 3:int) -> bigint
+                          aggregators: VectorUDAFSumLong(col 5:int) -> bigint
                           className: VectorGroupByOperator
                           groupByMode: HASH
                           keyExpressions: col 1:string
@@ -371,8 +371,8 @@ STAGE PLANS:
                   Select Vectorization:
                       className: VectorSelectOperator
                       native: true
-                      projectedOutputColumnNums: [0, 2]
-                      selectExpressions: RoundWithNumDigitsDoubleToDouble(col 
3, decimalPlaces 2)(children: DoubleColDivideDoubleScalar(col 2:double, val 
60.0)(children: CastLongToDouble(col 1:bigint) -> 2:double) -> 3:double) -> 
2:double
+                      projectedOutputColumnNums: [0, 4]
+                      selectExpressions: RoundWithNumDigitsDoubleToDouble(col 
3, decimalPlaces 2)(children: DoubleColDivideDoubleScalar(col 2:double, val 
60.0)(children: CastLongToDouble(col 1:bigint) -> 2:double) -> 3:double) -> 
4:double
                   Statistics: Num rows: 2 Data size: 186 Basic stats: COMPLETE 
Column stats: COMPLETE
                   File Output Operator
                     compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_complex_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_complex_join.q.out 
b/ql/src/test/results/clientpositive/llap/vector_complex_join.q.out
index ed445b7..c30bd07 100644
--- a/ql/src/test/results/clientpositive/llap/vector_complex_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_complex_join.q.out
@@ -314,8 +314,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [0, 1, 3]
-                          selectExpressions: ListIndexColScalar(col 
0:array<int>, col 1:int) -> 3:int
+                          projectedOutputColumnNums: [0, 1, 4]
+                          selectExpressions: ListIndexColScalar(col 
0:array<int>, col 1:int) -> 4:int
                       Statistics: Num rows: 1 Data size: 124 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col2 (type: int)
@@ -466,8 +466,8 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [0, 1, 3]
-                          selectExpressions: ListIndexColColumn(col 
0:array<int>, col 1:int) -> 3:int
+                          projectedOutputColumnNums: [0, 1, 4]
+                          selectExpressions: ListIndexColColumn(col 
0:array<int>, col 1:int) -> 4:int
                       Statistics: Num rows: 1 Data size: 124 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col2 (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/ql/src/test/results/clientpositive/llap/vector_decimal_aggregate.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_decimal_aggregate.q.out 
b/ql/src/test/results/clientpositive/llap/vector_decimal_aggregate.q.out
index 6704cc3..c585eb1 100644
--- a/ql/src/test/results/clientpositive/llap/vector_decimal_aggregate.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_decimal_aggregate.q.out
@@ -265,13 +265,13 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [3, 1, 2, 5, 8, 6, 10]
-                        selectExpressions: CastDecimalToDouble(col 
1:decimal(20,10)) -> 5:double, DoubleColMultiplyDoubleColumn(col 6:double, col 
7:double)(children: CastDecimalToDouble(col 1:decimal(20,10)) -> 6:double, 
CastDecimalToDouble(col 1:decimal(20,10)) -> 7:double) -> 8:double, 
CastDecimalToDouble(col 2:decimal(23,14)) -> 6:double, 
DoubleColMultiplyDoubleColumn(col 7:double, col 9:double)(children: 
CastDecimalToDouble(col 2:decimal(23,14)) -> 7:double, CastDecimalToDouble(col 
2:decimal(23,14)) -> 9:double) -> 10:double
+                        projectedOutputColumnNums: [3, 1, 2, 5, 8, 9, 12]
+                        selectExpressions: CastDecimalToDouble(col 
1:decimal(20,10)) -> 5:double, DoubleColMultiplyDoubleColumn(col 6:double, col 
7:double)(children: CastDecimalToDouble(col 1:decimal(20,10)) -> 6:double, 
CastDecimalToDouble(col 1:decimal(20,10)) -> 7:double) -> 8:double, 
CastDecimalToDouble(col 2:decimal(23,14)) -> 9:double, 
DoubleColMultiplyDoubleColumn(col 10:double, col 11:double)(children: 
CastDecimalToDouble(col 2:decimal(23,14)) -> 10:double, CastDecimalToDouble(col 
2:decimal(23,14)) -> 11:double) -> 12:double
                     Statistics: Num rows: 12289 Data size: 2662128 Basic 
stats: COMPLETE Column stats: NONE
                     Group By Operator
                       aggregations: count(_col1), max(_col1), min(_col1), 
sum(_col1), sum(_col4), sum(_col3), count(_col2), max(_col2), min(_col2), 
sum(_col2), sum(_col6), sum(_col5), count()
                       Group By Vectorization:
-                          aggregators: VectorUDAFCount(col 1:decimal(20,10)) 
-> bigint, VectorUDAFMaxDecimal(col 1:decimal(20,10)) -> decimal(20,10), 
VectorUDAFMinDecimal(col 1:decimal(20,10)) -> decimal(20,10), 
VectorUDAFSumDecimal(col 1:decimal(20,10)) -> decimal(30,10), 
VectorUDAFSumDouble(col 8:double) -> double, VectorUDAFSumDouble(col 5:double) 
-> double, VectorUDAFCount(col 2:decimal(23,14)) -> bigint, 
VectorUDAFMaxDecimal(col 2:decimal(23,14)) -> decimal(23,14), 
VectorUDAFMinDecimal(col 2:decimal(23,14)) -> decimal(23,14), 
VectorUDAFSumDecimal(col 2:decimal(23,14)) -> decimal(33,14), 
VectorUDAFSumDouble(col 10:double) -> double, VectorUDAFSumDouble(col 6:double) 
-> double, VectorUDAFCountStar(*) -> bigint
+                          aggregators: VectorUDAFCount(col 1:decimal(20,10)) 
-> bigint, VectorUDAFMaxDecimal(col 1:decimal(20,10)) -> decimal(20,10), 
VectorUDAFMinDecimal(col 1:decimal(20,10)) -> decimal(20,10), 
VectorUDAFSumDecimal(col 1:decimal(20,10)) -> decimal(30,10), 
VectorUDAFSumDouble(col 8:double) -> double, VectorUDAFSumDouble(col 5:double) 
-> double, VectorUDAFCount(col 2:decimal(23,14)) -> bigint, 
VectorUDAFMaxDecimal(col 2:decimal(23,14)) -> decimal(23,14), 
VectorUDAFMinDecimal(col 2:decimal(23,14)) -> decimal(23,14), 
VectorUDAFSumDecimal(col 2:decimal(23,14)) -> decimal(33,14), 
VectorUDAFSumDouble(col 12:double) -> double, VectorUDAFSumDouble(col 9:double) 
-> double, VectorUDAFCountStar(*) -> bigint
                           className: VectorGroupByOperator
                           groupByMode: HASH
                           keyExpressions: col 3:int
@@ -310,7 +310,7 @@ STAGE PLANS:
                     includeColumns: [1, 2, 3]
                     dataColumns: cdouble:double, cdecimal1:decimal(20,10), 
cdecimal2:decimal(23,14), cint:int
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [double, double, double, double, 
double, double]
+                    scratchColumnTypeNames: [double, double, double, double, 
double, double, double, double]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -354,8 +354,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [0, 1, 2, 3, 4, 16, 17, 18, 
7, 8, 9, 10, 24, 19, 25]
-                        selectExpressions: DecimalColDivideDecimalColumn(col 
14:decimal(24,14), col 15:decimal(19,0))(children: CastDecimalToDecimal(col 
4:decimal(30,10)) -> 14:decimal(24,14), CastLongToDecimal(col 1:bigint) -> 
15:decimal(19,0)) -> 16:decimal(38,28), FuncPowerDoubleToDouble(col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 17:double) -> 18:double) -> 17:double) -> 18:double) -> 17:double, 
FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 
18:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, 
col 19:double)(children: DoubleColDivideLongColumn(col 18:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 18:double) -> 19:double) -> 18:double, IfEx
 prNullCondExpr(col 20:boolean, null, col 21:bigint)(children: 
LongColEqualLongScalar(col 1:bigint, val 1) -> 20:boolean, 
LongColSubtractLongScalar(col 1:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 
19:double) -> 18:double, DecimalColDivideDecimalColumn(col 23:decimal(27,18), 
col 15:decimal(19,0))(children: CastDecimalToDecimal(col 10:decimal(33,14)) -> 
23:decimal(27,18), CastLongToDecimal(col 7:bigint) -> 15:decimal(19,0)) -> 
24:decimal(38,29), FuncPowerDoubleToDouble(col 25:double)(children: 
DoubleColDivideLongColumn(col 19:double, col 7:bigint)(children: 
DoubleColSubtractDoubleColumn(col 11:double, col 25:double)(children: 
DoubleColDivideLongColumn(col 19:double, col 7:bigint)(children: 
DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) -> 19:double) -> 
25:double) -> 19:double) -> 25:double) -> 19:double, 
FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 
25:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 
11:double, col 26:d
 ouble)(children: DoubleColDivideLongColumn(col 25:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 25:double) -> 26:double) -> 25:double, IfExprNullCondExpr(col 22:boolean, 
null, col 27:bigint)(children: LongColEqualLongScalar(col 7:bigint, val 1) -> 
22:boolean, LongColSubtractLongScalar(col 7:bigint, val 1) -> 27:bigint) -> 
28:bigint) -> 26:double) -> 25:double
+                        projectedOutputColumnNums: [0, 1, 2, 3, 4, 16, 21, 29, 
7, 8, 9, 10, 32, 37, 45]
+                        selectExpressions: DecimalColDivideDecimalColumn(col 
14:decimal(24,14), col 15:decimal(19,0))(children: CastDecimalToDecimal(col 
4:decimal(30,10)) -> 14:decimal(24,14), CastLongToDecimal(col 1:bigint) -> 
15:decimal(19,0)) -> 16:decimal(38,28), FuncPowerDoubleToDouble(col 
20:double)(children: DoubleColDivideLongColumn(col 19:double, col 
1:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 17:double) -> 18:double) -> 19:double) -> 20:double) -> 21:double, 
FuncPowerDoubleToDouble(col 28:double)(children: DoubleColDivideLongColumn(col 
24:double, col 27:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, 
col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 22:double) -> 23:double) -> 24:double, IfEx
 prNullCondExpr(col 25:boolean, null, col 26:bigint)(children: 
LongColEqualLongScalar(col 1:bigint, val 1) -> 25:boolean, 
LongColSubtractLongScalar(col 1:bigint, val 1) -> 26:bigint) -> 27:bigint) -> 
28:double) -> 29:double, DecimalColDivideDecimalColumn(col 30:decimal(27,18), 
col 31:decimal(19,0))(children: CastDecimalToDecimal(col 10:decimal(33,14)) -> 
30:decimal(27,18), CastLongToDecimal(col 7:bigint) -> 31:decimal(19,0)) -> 
32:decimal(38,29), FuncPowerDoubleToDouble(col 36:double)(children: 
DoubleColDivideLongColumn(col 35:double, col 7:bigint)(children: 
DoubleColSubtractDoubleColumn(col 11:double, col 34:double)(children: 
DoubleColDivideLongColumn(col 33:double, col 7:bigint)(children: 
DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) -> 33:double) -> 
34:double) -> 35:double) -> 36:double) -> 37:double, 
FuncPowerDoubleToDouble(col 44:double)(children: DoubleColDivideLongColumn(col 
40:double, col 43:bigint)(children: DoubleColSubtractDoubleColumn(col 
11:double, col 39:d
 ouble)(children: DoubleColDivideLongColumn(col 38:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 38:double) -> 39:double) -> 40:double, IfExprNullCondExpr(col 41:boolean, 
null, col 42:bigint)(children: LongColEqualLongScalar(col 7:bigint, val 1) -> 
41:boolean, LongColSubtractLongScalar(col 7:bigint, val 1) -> 42:bigint) -> 
43:bigint) -> 44:double) -> 45:double
                     Statistics: Num rows: 2048 Data size: 443651 Basic stats: 
COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false
@@ -686,13 +686,13 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [3, 1, 2, 6, 9, 7, 12]
-                        selectExpressions: CastDecimalToDouble(col 
5:decimal(11,5))(children: ConvertDecimal64ToDecimal(col 
1:decimal(11,5)/DECIMAL_64) -> 5:decimal(11,5)) -> 6:double, 
DoubleColMultiplyDoubleColumn(col 7:double, col 8:double)(children: 
CastDecimalToDouble(col 5:decimal(11,5))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(11,5)/DECIMAL_64) -> 5:decimal(11,5)) 
-> 7:double, CastDecimalToDouble(col 5:decimal(11,5))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(11,5)/DECIMAL_64) -> 5:decimal(11,5)) 
-> 8:double) -> 9:double, CastDecimalToDouble(col 10:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(16,0)/DECIMAL_64) -> 10:decimal(16,0)) 
-> 7:double, DoubleColMultiplyDoubleColumn(col 8:double, col 
11:double)(children: CastDecimalToDouble(col 10:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(16,0)/DECIMAL_64) -> 10:decimal(16,0)) 
-> 8:double, CastDecimalToDouble(col 10:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:decima
 l(16,0)/DECIMAL_64) -> 10:decimal(16,0)) -> 11:double) -> 12:double
+                        projectedOutputColumnNums: [3, 1, 2, 6, 11, 13, 18]
+                        selectExpressions: CastDecimalToDouble(col 
5:decimal(11,5))(children: ConvertDecimal64ToDecimal(col 
1:decimal(11,5)/DECIMAL_64) -> 5:decimal(11,5)) -> 6:double, 
DoubleColMultiplyDoubleColumn(col 8:double, col 10:double)(children: 
CastDecimalToDouble(col 7:decimal(11,5))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(11,5)/DECIMAL_64) -> 7:decimal(11,5)) 
-> 8:double, CastDecimalToDouble(col 9:decimal(11,5))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(11,5)/DECIMAL_64) -> 9:decimal(11,5)) 
-> 10:double) -> 11:double, CastDecimalToDouble(col 12:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(16,0)/DECIMAL_64) -> 12:decimal(16,0)) 
-> 13:double, DoubleColMultiplyDoubleColumn(col 15:double, col 
17:double)(children: CastDecimalToDouble(col 14:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(16,0)/DECIMAL_64) -> 14:decimal(16,0)) 
-> 15:double, CastDecimalToDouble(col 16:decimal(16,0))(children: 
ConvertDecimal64ToDecimal(col 2:
 decimal(16,0)/DECIMAL_64) -> 16:decimal(16,0)) -> 17:double) -> 18:double
                     Statistics: Num rows: 12289 Data size: 2662128 Basic 
stats: COMPLETE Column stats: NONE
                     Group By Operator
                       aggregations: count(_col1), max(_col1), min(_col1), 
sum(_col1), sum(_col4), sum(_col3), count(_col2), max(_col2), min(_col2), 
sum(_col2), sum(_col6), sum(_col5), count()
                       Group By Vectorization:
-                          aggregators: VectorUDAFCount(col 
1:decimal(11,5)/DECIMAL_64) -> bigint, VectorUDAFMaxDecimal64(col 
1:decimal(11,5)/DECIMAL_64) -> decimal(11,5)/DECIMAL_64, 
VectorUDAFMinDecimal64(col 1:decimal(11,5)/DECIMAL_64) -> 
decimal(11,5)/DECIMAL_64, VectorUDAFSumDecimal64ToDecimal(col 
1:decimal(11,5)/DECIMAL_64) -> decimal(21,5), VectorUDAFSumDouble(col 9:double) 
-> double, VectorUDAFSumDouble(col 6:double) -> double, VectorUDAFCount(col 
2:decimal(16,0)/DECIMAL_64) -> bigint, VectorUDAFMaxDecimal64(col 
2:decimal(16,0)/DECIMAL_64) -> decimal(16,0)/DECIMAL_64, 
VectorUDAFMinDecimal64(col 2:decimal(16,0)/DECIMAL_64) -> 
decimal(16,0)/DECIMAL_64, VectorUDAFSumDecimal64ToDecimal(col 
2:decimal(16,0)/DECIMAL_64) -> decimal(26,0), VectorUDAFSumDouble(col 
12:double) -> double, VectorUDAFSumDouble(col 7:double) -> double, 
VectorUDAFCountStar(*) -> bigint
+                          aggregators: VectorUDAFCount(col 
1:decimal(11,5)/DECIMAL_64) -> bigint, VectorUDAFMaxDecimal64(col 
1:decimal(11,5)/DECIMAL_64) -> decimal(11,5)/DECIMAL_64, 
VectorUDAFMinDecimal64(col 1:decimal(11,5)/DECIMAL_64) -> 
decimal(11,5)/DECIMAL_64, VectorUDAFSumDecimal64ToDecimal(col 
1:decimal(11,5)/DECIMAL_64) -> decimal(21,5), VectorUDAFSumDouble(col 
11:double) -> double, VectorUDAFSumDouble(col 6:double) -> double, 
VectorUDAFCount(col 2:decimal(16,0)/DECIMAL_64) -> bigint, 
VectorUDAFMaxDecimal64(col 2:decimal(16,0)/DECIMAL_64) -> 
decimal(16,0)/DECIMAL_64, VectorUDAFMinDecimal64(col 
2:decimal(16,0)/DECIMAL_64) -> decimal(16,0)/DECIMAL_64, 
VectorUDAFSumDecimal64ToDecimal(col 2:decimal(16,0)/DECIMAL_64) -> 
decimal(26,0), VectorUDAFSumDouble(col 18:double) -> double, 
VectorUDAFSumDouble(col 13:double) -> double, VectorUDAFCountStar(*) -> bigint
                           className: VectorGroupByOperator
                           groupByMode: HASH
                           keyExpressions: col 3:int
@@ -731,7 +731,7 @@ STAGE PLANS:
                     includeColumns: [1, 2, 3]
                     dataColumns: cdouble:double, 
cdecimal1:decimal(11,5)/DECIMAL_64, cdecimal2:decimal(16,0)/DECIMAL_64, cint:int
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [decimal(11,5), double, double, 
double, double, decimal(16,0), double, double]
+                    scratchColumnTypeNames: [decimal(11,5), double, 
decimal(11,5), double, decimal(11,5), double, double, decimal(16,0), double, 
decimal(16,0), double, decimal(16,0), double, double]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -775,8 +775,8 @@ STAGE PLANS:
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [0, 1, 2, 3, 4, 16, 17, 18, 
7, 8, 9, 10, 23, 19, 25]
-                        selectExpressions: DecimalColDivideDecimalColumn(col 
14:decimal(15,9), col 15:decimal(19,0))(children: CastDecimalToDecimal(col 
4:decimal(21,5)) -> 14:decimal(15,9), CastLongToDecimal(col 1:bigint) -> 
15:decimal(19,0)) -> 16:decimal(35,29), FuncPowerDoubleToDouble(col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 17:double) -> 18:double) -> 17:double) -> 18:double) -> 17:double, 
FuncPowerDoubleToDouble(col 19:double)(children: DoubleColDivideLongColumn(col 
18:double, col 22:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, 
col 19:double)(children: DoubleColDivideLongColumn(col 18:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 18:double) -> 19:double) -> 18:double, IfExprN
 ullCondExpr(col 20:boolean, null, col 21:bigint)(children: 
LongColEqualLongScalar(col 1:bigint, val 1) -> 20:boolean, 
LongColSubtractLongScalar(col 1:bigint, val 1) -> 21:bigint) -> 22:bigint) -> 
19:double) -> 18:double, CastDecimalToDecimal(col 24:decimal(38,22))(children: 
DecimalColDivideDecimalColumn(col 23:decimal(20,4), col 
15:decimal(19,0))(children: CastDecimalToDecimal(col 10:decimal(26,0)) -> 
23:decimal(20,4), CastLongToDecimal(col 7:bigint) -> 15:decimal(19,0)) -> 
24:decimal(38,22)) -> 23:decimal(20,4), FuncPowerDoubleToDouble(col 
25:double)(children: DoubleColDivideLongColumn(col 19:double, col 
7:bigint)(children: DoubleColSubtractDoubleColumn(col 11:double, col 
25:double)(children: DoubleColDivideLongColumn(col 19:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 19:double) -> 25:double) -> 19:double) -> 25:double) -> 19:double, 
FuncPowerDoubleToDouble(col 26:double)(children: DoubleColDivideLongColumn(col 
25:double, col 28:bi
 gint)(children: DoubleColSubtractDoubleColumn(col 11:double, col 
26:double)(children: DoubleColDivideLongColumn(col 25:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 25:double) -> 26:double) -> 25:double, IfExprNullCondExpr(col 22:boolean, 
null, col 27:bigint)(children: LongColEqualLongScalar(col 7:bigint, val 1) -> 
22:boolean, LongColSubtractLongScalar(col 7:bigint, val 1) -> 27:bigint) -> 
28:bigint) -> 26:double) -> 25:double
+                        projectedOutputColumnNums: [0, 1, 2, 3, 4, 16, 21, 29, 
7, 8, 9, 10, 33, 38, 46]
+                        selectExpressions: DecimalColDivideDecimalColumn(col 
14:decimal(15,9), col 15:decimal(19,0))(children: CastDecimalToDecimal(col 
4:decimal(21,5)) -> 14:decimal(15,9), CastLongToDecimal(col 1:bigint) -> 
15:decimal(19,0)) -> 16:decimal(35,29), FuncPowerDoubleToDouble(col 
20:double)(children: DoubleColDivideLongColumn(col 19:double, col 
1:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 
18:double)(children: DoubleColDivideLongColumn(col 17:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 17:double) -> 18:double) -> 19:double) -> 20:double) -> 21:double, 
FuncPowerDoubleToDouble(col 28:double)(children: DoubleColDivideLongColumn(col 
24:double, col 27:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, 
col 23:double)(children: DoubleColDivideLongColumn(col 22:double, col 
1:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) 
-> 22:double) -> 23:double) -> 24:double, IfExprN
 ullCondExpr(col 25:boolean, null, col 26:bigint)(children: 
LongColEqualLongScalar(col 1:bigint, val 1) -> 25:boolean, 
LongColSubtractLongScalar(col 1:bigint, val 1) -> 26:bigint) -> 27:bigint) -> 
28:double) -> 29:double, CastDecimalToDecimal(col 32:decimal(38,22))(children: 
DecimalColDivideDecimalColumn(col 30:decimal(20,4), col 
31:decimal(19,0))(children: CastDecimalToDecimal(col 10:decimal(26,0)) -> 
30:decimal(20,4), CastLongToDecimal(col 7:bigint) -> 31:decimal(19,0)) -> 
32:decimal(38,22)) -> 33:decimal(20,4), FuncPowerDoubleToDouble(col 
37:double)(children: DoubleColDivideLongColumn(col 36:double, col 
7:bigint)(children: DoubleColSubtractDoubleColumn(col 11:double, col 
35:double)(children: DoubleColDivideLongColumn(col 34:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 34:double) -> 35:double) -> 36:double) -> 37:double) -> 38:double, 
FuncPowerDoubleToDouble(col 45:double)(children: DoubleColDivideLongColumn(col 
41:double, col 44:bi
 gint)(children: DoubleColSubtractDoubleColumn(col 11:double, col 
40:double)(children: DoubleColDivideLongColumn(col 39:double, col 
7:bigint)(children: DoubleColMultiplyDoubleColumn(col 12:double, col 12:double) 
-> 39:double) -> 40:double) -> 41:double, IfExprNullCondExpr(col 42:boolean, 
null, col 43:bigint)(children: LongColEqualLongScalar(col 7:bigint, val 1) -> 
42:boolean, LongColSubtractLongScalar(col 7:bigint, val 1) -> 43:bigint) -> 
44:bigint) -> 45:double) -> 46:double
                     Statistics: Num rows: 2048 Data size: 443651 Basic stats: 
COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/8b968c7e/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 36f8f93..1236d69 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
@@ -257,15 +257,15 @@ STAGE PLANS:
                       Select Vectorization:
                           className: VectorSelectOperator
                           native: true
-                          projectedOutputColumnNums: [6, 8, 10, 12, 13, 14, 
15, 16, 17, 18, 19, 20, 21, 22]
-                          selectExpressions: DecimalColAddDecimalColumn(col 
4:decimal(10,3), col 5:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3), ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 6:decimal(11,3), 
DecimalColSubtractDecimalColumn(col 4:decimal(10,3), col 
7:decimal(9,2))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3), 
DecimalScalarMultiplyDecimalColumn(val 2, col 5:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 
7:decimal(9,2)) -> 8:decimal(11,3), DecimalColDivideDecimalColumn(col 
23:decimal(11,3), col 5:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
9:decimal(11,3)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 
1:decimal(10,3)/DECIMAL_64, decimal64Val 2340, decimalVal 2.34) -> 
9:decimal(11,3)/DECIMAL_64) -> 23:decimal(11,3), ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMA
 L_64) -> 5:decimal(7,2)) -> 10:decimal(21,11), 
DecimalColMultiplyDecimalColumn(col 4:decimal(10,3), col 
11:decimal(12,6))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3), 
DecimalColDivideDecimalScalar(col 5:decimal(7,2), val 3.4)(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 
11:decimal(12,6)) -> 12:decimal(23,9), DecimalColModuloDecimalScalar(col 
4:decimal(10,3), val 10)(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) -> 13:decimal(5,3), 
CastDecimalToLong(col 4:decimal(10,3))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) -> 14:int, 
CastDecimalToLong(col 5:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 15:smallint, 
CastDecimalToLong(col 5:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 16:tinyint, CastDecimalToLon
 g(col 4:decimal(10,3))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) -> 17:bigint, 
CastDecimalToBoolean(col 4:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) 
-> 18:boolean, CastDecimalToDouble(col 5:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 
19:double, CastDecimalToFloat(col 4:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) 
-> 20:float, CastDecimalToString(col 5:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 5:decimal(7,2)) -> 
21:string, CastDecimalToTimestamp(col 4:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 4:decimal(10,3)) 
-> 22:timestamp
+                          projectedOutputColumnNums: [7, 11, 14, 18, 20, 22, 
24, 26, 28, 30, 32, 34, 36, 38]
+                          selectExpressions: DecimalColAddDecimalColumn(col 
5:decimal(10,3), col 6:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 5:decimal(10,3), ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 6:decimal(7,2)) -> 7:decimal(11,3), 
DecimalColSubtractDecimalColumn(col 8:decimal(10,3), col 
10:decimal(9,2))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 8:decimal(10,3), 
DecimalScalarMultiplyDecimalColumn(val 2, col 9:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 9:decimal(7,2)) -> 
10:decimal(9,2)) -> 11:decimal(11,3), DecimalColDivideDecimalColumn(col 
39:decimal(11,3), col 13:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
12:decimal(11,3)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col 
1:decimal(10,3)/DECIMAL_64, decimal64Val 2340, decimalVal 2.34) -> 
12:decimal(11,3)/DECIMAL_64) -> 39:decimal(11,3), ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/
 DECIMAL_64) -> 13:decimal(7,2)) -> 14:decimal(21,11), 
DecimalColMultiplyDecimalColumn(col 15:decimal(10,3), col 
17:decimal(12,6))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 15:decimal(10,3), 
DecimalColDivideDecimalScalar(col 16:decimal(7,2), val 3.4)(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 16:decimal(7,2)) -> 
17:decimal(12,6)) -> 18:decimal(23,9), DecimalColModuloDecimalScalar(col 
19:decimal(10,3), val 10)(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 19:decimal(10,3)) -> 20:decimal(5,3), 
CastDecimalToLong(col 21:decimal(10,3))(children: ConvertDecimal64ToDecimal(col 
1:decimal(10,3)/DECIMAL_64) -> 21:decimal(10,3)) -> 22:int, 
CastDecimalToLong(col 23:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 23:decimal(7,2)) -> 24:smallint, 
CastDecimalToLong(col 25:decimal(7,2))(children: ConvertDecimal64ToDecimal(col 
2:decimal(7,2)/DECIMAL_64) -> 25:decimal(7,2)) -> 26:tinyin
 t, CastDecimalToLong(col 27:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 27:decimal(10,3)) 
-> 28:bigint, CastDecimalToBoolean(col 29:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 29:decimal(10,3)) 
-> 30:boolean, CastDecimalToDouble(col 31:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 31:decimal(7,2)) -> 
32:double, CastDecimalToFloat(col 33:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 33:decimal(10,3)) 
-> 34:float, CastDecimalToString(col 35:decimal(7,2))(children: 
ConvertDecimal64ToDecimal(col 2:decimal(7,2)/DECIMAL_64) -> 35:decimal(7,2)) -> 
36:string, CastDecimalToTimestamp(col 37:decimal(10,3))(children: 
ConvertDecimal64ToDecimal(col 1:decimal(10,3)/DECIMAL_64) -> 37:decimal(10,3)) 
-> 38: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
-                            keyColumns: 6:decimal(11,3), 8:decimal(11,3), 
10:decimal(21,11), 12:decimal(23,9), 13:decimal(5,3), 14:int, 15:smallint, 
16:tinyint, 17:bigint, 18:boolean, 19:double, 20:float, 21:string, 22:timestamp
+                            keyColumns: 7:decimal(11,3), 11:decimal(11,3), 
14:decimal(21,11), 18:decimal(23,9), 20:decimal(5,3), 22:int, 24:smallint, 
26:tinyint, 28:bigint, 30:boolean, 32:double, 34:float, 36:string, 38:timestamp
                             native: true
                             nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                         Statistics: Num rows: 455 Data size: 100294 Basic 
stats: COMPLETE Column stats: NONE
@@ -286,7 +286,7 @@ STAGE PLANS:
                     includeColumns: [0, 1, 2]
                     dataColumns: cdouble:double, 
cdecimal1:decimal(10,3)/DECIMAL_64, cdecimal2:decimal(7,2)/DECIMAL_64
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [decimal(10,3), decimal(7,2), 
decimal(11,3), decimal(9,2), decimal(11,3), decimal(11,3)/DECIMAL_64, 
decimal(21,11), decimal(12,6), decimal(23,9), decimal(5,3), bigint, bigint, 
bigint, bigint, bigint, double, double, string, timestamp, decimal(11,3)]
+                    scratchColumnTypeNames: [decimal(10,3), decimal(10,3), 
decimal(7,2), decimal(11,3), decimal(10,3), decimal(7,2), decimal(9,2), 
decimal(11,3), decimal(11,3)/DECIMAL_64, decimal(7,2), decimal(21,11), 
decimal(10,3), decimal(7,2), decimal(12,6), decimal(23,9), decimal(10,3), 
decimal(5,3), decimal(10,3), bigint, decimal(7,2), bigint, decimal(7,2), 
bigint, decimal(10,3), bigint, decimal(10,3), bigint, decimal(7,2), double, 
decimal(10,3), double, decimal(7,2), string, decimal(10,3), timestamp, 
decimal(11,3)]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:

Reply via email to