Repository: hive
Updated Branches:
  refs/heads/master 65f02d2f9 -> edc53cc0d


http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vector_case_when_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_case_when_2.q.out 
b/ql/src/test/results/clientpositive/vector_case_when_2.q.out
index d7bb76a..b1cb3f2 100644
--- a/ql/src/test/results/clientpositive/vector_case_when_2.q.out
+++ b/ql/src/test/results/clientpositive/vector_case_when_2.q.out
@@ -376,7 +376,7 @@ STAGE PLANS:
                   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: VectorUDFAdaptor(ctimestamp2 
BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 
23: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, va
 l 2000-12-31 23:59:59.999999999) -> 5:boolean, 
IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 
12:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 
7:boolean, val Late 2000scol 11:string)(children: VectorUDFAdaptor(ctimestamp2 
BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 
23:59:59.999999999') -> 7:boolean, IfExprColumnNull(col 8:boolean, col 
9:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, 
val 2015-12-31 23:59:59.999999999) -> 8:boolean, ConstantVectorExpression(val 
Early 2010s) -> 9:string) -> 11:string) -> 12:string) -> 11:string) -> 
12:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 
11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2000-12-31 23:59:59.999999999) -> 5:boolean, 
IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 
13:string)(children: 
 TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
11:string)(children: VectorUDFAdaptor(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 
00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') -> 7:boolean, 
IfExprNullNull(null, null) -> 11:string) -> 13:string) -> 11:string) -> 
13:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 
7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 
7:int) -> 14:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN 
(stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: 
SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 11:string, 
IfExprNullColumn(col 5:boolean, null, col 6)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, v
 al 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
+                  selectExpressions: IfExprStringScalarStringGroupColumn(col 
5:boolean, val 1800s or Earliercol 9:string)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) 
-> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 
10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 
7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 
3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) 
-> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, 
val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, 
val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 
9:string) -> 10:string, IfExprStringScalarStringGroupColumn(col 5:boolean, val 
Oldcol 11:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2000-12
 -31 23:59:59.999999999) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 
6:boolean, val Early 2000scol 12:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
IfExprColumnNull(col 8:boolean, col 9:string, null)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 
23:59:59.999999999) -> 8:boolean, ConstantVectorExpression(val Early 2010s) -> 
9:string) -> 11:string) -> 12:string) -> 11:string) -> 12:string, 
IfExprStringScalarStringGroupColumn(col 5:boolean, val Oldcol 
11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2000-12-31 23:59:59.999999999) -> 5:boolean, 
IfExprStringScalarStringGroupColumn(col 6:boolean, val Early 2000scol 
13:string)(children: TimestampColLessTi
 mestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 6:boolean, 
IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 
11:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 
16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, 
IfExprNullNull(null, null) -> 11:string) -> 13:string) -> 11:string) -> 
13:string, IfExprLongColumnLongColumn(col 5:boolean, col 6:int, col 
7:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 5:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 6:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 
7:int) -> 14:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN 
(stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END)(children: 
SelectStringColLikeStringScalar(col 2:string) -> 5:boolean) -> 11:string, 
IfExprNullColumn(col 5:boolean, null, col 6)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.4136
 55165) -> 5:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) 
-> 6:int) -> 7:int, IfExprColumnNull(col 17:boolean, col 15:int, 
null)(children: ColAndCol(col 15:boolean, col 16:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 16:boolean) -> 17:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 15:int) -> 16:int, 
IfExprLongColumnLongColumn(col 20:boolean, col 21:date, col 22:date)(children: 
DoubleColGreaterDoubleScalar(col 19:double, val 100.0)(children: 
DoubleColModuloDoubleScalar(col 18:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 18:double) -> 19:double) -> 
20:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 21:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 22:date) -> 23:date
               Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)
@@ -635,7 +635,7 @@ STAGE PLANS:
                   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: 
VectorUDFAdaptor(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND 
TIMESTAMP'2010-12-31 23:59:59.999999999') -> 9:boolean, 
ConstantVectorExpression(val Late 2000s) -> 10:string, 
IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val 
Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 
2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 
14:string) -> 15:string, IfExprColumnCondExpr
 (col 11:boolean, col 16:stringcol 25:string)(children: 
TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 
23:59:59.999999999) -> 11:boolean, ConstantVectorExpression(val Old) -> 
16:string, IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 
24:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 
2006-01-01 00:00:00) -> 17:boolean, ConstantVectorExpression(val Early 2000s) 
-> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 
23:string)(children: VectorUDFAdaptor(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 
00:00:00' AND TIMESTAMP'2010-12-31 23: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:boo
 lean, 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: VectorUDFAdaptor(ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 
00:00:00' AND TIMESTAMP'2010-12-31 23: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, 
VectorUDFYea
 rTimestamp(col 3:timestamp, field YEAR) -> 39:int) -> 40:int, 
VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE 
(TIMESTAMP'2018-03-08 23:04:59') END)(children: 
SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 42:string, 
IfExprNullCondExpr(col 41:boolean, null, col 43:int)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 
03:18:32.413655165) -> 41:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, 
field MINUTE) -> 43:int) -> 44:int, IfExprCondExprNull(col 47:boolean, col 
45:int, null)(children: ColAndCol(col 45:boolean, col 46:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 45:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 46:boolean) -> 47:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, 
IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: 
DoubleColGr
 eaterDoubleScalar(col 49:double, val 100.0)(children: 
DoubleColModuloDoubleScalar(col 48:double, val 500.0)(children: 
CastTimestampToDouble(col 1:timestamp) -> 48:double) -> 49:double) -> 
50:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 51:date, 
VectorUDFDateAddColScalar(col 0:date, val 365) -> 52:date) -> 53:date
+                  selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 
6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, 
ConstantVectorExpression(val 1800s or Earlier) -> 6:string, 
IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 
7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, 
IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 
2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 
2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 
13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 11:b
 oolean, 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:strin
 gcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 
3:timestamp, val 2000-12-31 23:59:59.999999999) -> 27:boolean, 
ConstantVectorExpression(val Old) -> 28:string, IfExprColumnCondExpr(col 
29:boolean, col 30:stringcol 34:string)(children: 
TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 
29:boolean, ConstantVectorExpression(val Early 2000s) -> 30:string, 
IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 33:string)(children: 
TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 
2010-12-31 15:59:59.999999999) -> 31:boolean, ConstantVectorExpression(val Late 
2000s) -> 32:string, IfExprNullNull(null, null) -> 33:string) -> 34:string) -> 
35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 
39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 
1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, 
field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:timestamp,
  field YEAR) -> 39:int) -> 40:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 
like '%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') 
END)(children: SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 
42:string, IfExprNullCondExpr(col 41:boolean, null, col 43:int)(children: 
TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 
03:18:32.413655165) -> 41:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, 
field MINUTE) -> 43:int) -> 44:int, IfExprCondExprNull(col 47:boolean, col 
45:int, null)(children: ColAndCol(col 45:boolean, col 46:boolean)(children: 
TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 
18:40:08.165) -> 45:boolean, TimestampColLessTimestampScalar(col 3:timestamp, 
val 6631-11-13 16:31:29.702202248) -> 46:boolean) -> 47:boolean, 
VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, 
IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: 
DoubleColGreaterDoubleScalar(col 49:do
 uble, val 100.0)(children: DoubleColModuloDoubleScalar(col 48:double, val 
500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 48:double) -> 
49:double) -> 50:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 
51:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 52:date) -> 53:date
               Statistics: Num rows: 51 Data size: 12300 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vectorization_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorization_10.q.out 
b/ql/src/test/results/clientpositive/vectorization_10.q.out
index 1f43d24..cb7478d 100644
--- a/ql/src/test/results/clientpositive/vectorization_10.q.out
+++ b/ql/src/test/results/clientpositive/vectorization_10.q.out
@@ -79,7 +79,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [5, 8, 0, 10, 6, 13, 17, 16, 
18, 20, 21, 19, 23, 24, 26]
-                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleColAddDoubleColumn(col 5:double, col 16:double)(children: 
CastLongToDouble(col 1:smallint) -> 16:double) -> 17:double, 
DoubleColModuloDoubleScalar(col 18:double, val 33.0)(children: 
DoubleColAddDoubleColumn(col 5:double, col 16:double)(children: 
CastLongToDouble(col 1:smallint) -> 16:double) -> 18:double) -> 16:double, 
DoubleColUnaryMinus(col 5:double) -> 18:double, DoubleColModuloDoubleColumn(col 
19:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 
19:double) -> 20:double, LongColModuloLongColumn(col 0:smallint, col 
1:smallint)(children: col 0:tinyint) -> 21:smallint, DoubleColUnaryMinus(col 
5:double) -> 19:double, LongColMultiplyLongColumn(col 3:bigint, col 
22:bigint)(children: col 22:smallint) -> 23:bigint, 
DoubleScalarSubtractDoubleColumn(val 9763215.5639, col 25:double)(children: 
DoubleColAddDoubleColumn(col 5:double, col 24:double)(children: 
CastLongToDouble(col 1:smal
 lint) -> 24:double) -> 25:double) -> 24:double, DoubleColUnaryMinus(col 
25:double)(children: DoubleColUnaryMinus(col 5:double) -> 25:double) -> 
26:double
+                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleColAddDoubleColumn(col 5:double, col 16:double)(children: 
CastLongToDouble(col 1:smallint) -> 16:double) -> 17:double, 
DoubleColModuloDoubleScalar(col 18:double, val 33.0)(children: 
DoubleColAddDoubleColumn(col 5:double, col 16:double)(children: 
CastLongToDouble(col 1:smallint) -> 16:double) -> 18:double) -> 16:double, 
DoubleColUnaryMinus(col 5:double) -> 18:double, DoubleColModuloDoubleColumn(col 
19:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 
19:double) -> 20:double, LongColModuloLongColumn(col 0:smallint, col 
1:smallint)(children: col 0:tinyint) -> 21:smallint, DoubleColUnaryMinus(col 
5:double) -> 19:double, LongColMultiplyLongColumn(col 3:bigint, col 
22:bigint)(children: LongColModuloLongColumn(col 0:smallint, col 
1:smallint)(children: col 0:tinyint) -> 22:smallint) -> 23:bigint, 
DoubleScalarSubtractDoubleColumn(val 9763215.5639, col 25:double)(children: 
DoubleColAd
 dDoubleColumn(col 5:double, col 24:double)(children: CastLongToDouble(col 
1:smallint) -> 24:double) -> 25:double) -> 24:double, DoubleColUnaryMinus(col 
25:double)(children: DoubleColUnaryMinus(col 5:double) -> 25:double) -> 
26:double
                 Statistics: Num rows: 9557 Data size: 2261694 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vectorization_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorization_7.q.out 
b/ql/src/test/results/clientpositive/vectorization_7.q.out
index 52a0b22..008d292 100644
--- a/ql/src/test/results/clientpositive/vectorization_7.q.out
+++ b/ql/src/test/results/clientpositive/vectorization_7.q.out
@@ -85,7 +85,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [10, 3, 1, 0, 8, 6, 14, 15, 16, 
17, 19, 20, 18, 21, 23]
-                    selectExpressions: LongColAddLongColumn(col 3:bigint, col 
3:bigint) -> 14:bigint, LongColModuloLongScalar(col 1:int, val -257)(children: 
col 1:smallint) -> 15:int, LongColUnaryMinus(col 1:smallint) -> 16:smallint, 
LongColUnaryMinus(col 0:tinyint) -> 17:tinyint, LongColAddLongScalar(col 
18:int, val 17)(children: col 18:tinyint) -> 19:int, 
LongColMultiplyLongColumn(col 3:bigint, col 18:bigint)(children: col 
18:smallint) -> 20:bigint, LongColModuloLongColumn(col 2:int, col 
1:int)(children: col 1:smallint) -> 18:int, LongColUnaryMinus(col 0:tinyint) -> 
21:tinyint, LongColModuloLongColumn(col 22:tinyint, col 0:tinyint)(children: 
LongColUnaryMinus(col 0:tinyint) -> 22:tinyint) -> 23:tinyint
+                    selectExpressions: LongColAddLongColumn(col 3:bigint, col 
3:bigint) -> 14:bigint, LongColModuloLongScalar(col 1:int, val -257)(children: 
col 1:smallint) -> 15:int, LongColUnaryMinus(col 1:smallint) -> 16:smallint, 
LongColUnaryMinus(col 0:tinyint) -> 17:tinyint, LongColAddLongScalar(col 
18:int, val 17)(children: LongColUnaryMinus(col 0:tinyint) -> 18:tinyint) -> 
19:int, LongColMultiplyLongColumn(col 3:bigint, col 18:bigint)(children: 
LongColUnaryMinus(col 1:smallint) -> 18:smallint) -> 20:bigint, 
LongColModuloLongColumn(col 2:int, col 1:int)(children: col 1:smallint) -> 
18:int, LongColUnaryMinus(col 0:tinyint) -> 21:tinyint, 
LongColModuloLongColumn(col 22:tinyint, col 0:tinyint)(children: 
LongColUnaryMinus(col 0:tinyint) -> 22:tinyint) -> 23:tinyint
                 Statistics: Num rows: 5461 Data size: 1292362 Basic stats: 
COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: boolean), _col1 (type: 
bigint), _col2 (type: smallint), _col3 (type: tinyint), _col4 (type: 
timestamp), _col5 (type: string), _col6 (type: bigint), _col7 (type: int), 
_col8 (type: smallint), _col9 (type: tinyint), _col10 (type: int), _col11 
(type: bigint), _col12 (type: int), _col13 (type: tinyint), _col14 (type: 
tinyint)
@@ -306,7 +306,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [10, 3, 1, 0, 8, 6, 14, 15, 16, 
17, 19, 20, 18, 21, 23]
-                    selectExpressions: LongColAddLongColumn(col 3:bigint, col 
3:bigint) -> 14:bigint, LongColModuloLongScalar(col 1:int, val -257)(children: 
col 1:smallint) -> 15:int, LongColUnaryMinus(col 1:smallint) -> 16:smallint, 
LongColUnaryMinus(col 0:tinyint) -> 17:tinyint, LongColAddLongScalar(col 
18:int, val 17)(children: col 18:tinyint) -> 19:int, 
LongColMultiplyLongColumn(col 3:bigint, col 18:bigint)(children: col 
18:smallint) -> 20:bigint, LongColModuloLongColumn(col 2:int, col 
1:int)(children: col 1:smallint) -> 18:int, LongColUnaryMinus(col 0:tinyint) -> 
21:tinyint, LongColModuloLongColumn(col 22:tinyint, col 0:tinyint)(children: 
LongColUnaryMinus(col 0:tinyint) -> 22:tinyint) -> 23:tinyint
+                    selectExpressions: LongColAddLongColumn(col 3:bigint, col 
3:bigint) -> 14:bigint, LongColModuloLongScalar(col 1:int, val -257)(children: 
col 1:smallint) -> 15:int, LongColUnaryMinus(col 1:smallint) -> 16:smallint, 
LongColUnaryMinus(col 0:tinyint) -> 17:tinyint, LongColAddLongScalar(col 
18:int, val 17)(children: LongColUnaryMinus(col 0:tinyint) -> 18:tinyint) -> 
19:int, LongColMultiplyLongColumn(col 3:bigint, col 18:bigint)(children: 
LongColUnaryMinus(col 1:smallint) -> 18:smallint) -> 20:bigint, 
LongColModuloLongColumn(col 2:int, col 1:int)(children: col 1:smallint) -> 
18:int, LongColUnaryMinus(col 0:tinyint) -> 21:tinyint, 
LongColModuloLongColumn(col 22:tinyint, col 0:tinyint)(children: 
LongColUnaryMinus(col 0:tinyint) -> 22:tinyint) -> 23:tinyint
                 Statistics: Num rows: 5461 Data size: 1292362 Basic stats: 
COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: boolean), _col1 (type: 
bigint), _col2 (type: smallint), _col3 (type: tinyint), _col4 (type: 
timestamp), _col5 (type: string), _col6 (type: bigint), _col7 (type: int), 
_col8 (type: smallint), _col9 (type: tinyint), _col10 (type: int), _col11 
(type: bigint), _col12 (type: int), _col13 (type: tinyint), _col14 (type: 
tinyint)

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vectorization_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorization_8.q.out 
b/ql/src/test/results/clientpositive/vectorization_8.q.out
index 1b46d49..b9b0c8a 100644
--- a/ql/src/test/results/clientpositive/vectorization_8.q.out
+++ b/ql/src/test/results/clientpositive/vectorization_8.q.out
@@ -81,7 +81,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [8, 5, 10, 6, 4, 13, 14, 15, 
17, 19, 16, 18, 20, 22]
-                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 
14:double, DoubleColMultiplyDoubleScalar(col 5:double, val -257.0) -> 
15:double, DoubleColAddDoubleColumn(col 16:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 16:float) -> 17:float, 
DoubleColAddDoubleColumn(col 16:double, col 18:double)(children: 
DoubleColUnaryMinus(col 5:double) -> 16:double, CastLongToDouble(col 3:bigint) 
-> 18:double) -> 19:double, DoubleColUnaryMinus(col 5:double) -> 16:double, 
DoubleScalarSubtractDoubleColumn(val -1.3890000581741333, col 4:float) -> 
18:float, DoubleColUnaryMinus(col 4:float) -> 20:float, 
DoubleColAddDoubleColumn(col 21:double, col 23:double)(children: 
DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 21:double, col 
23:float) -> 22:double
+                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 
14:double, DoubleColMultiplyDoubleScalar(col 5:double, val -257.0) -> 
15:double, DoubleColAddDoubleColumn(col 16:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 16:float) -> 17:float, 
DoubleColAddDoubleColumn(col 16:double, col 18:double)(children: 
DoubleColUnaryMinus(col 5:double) -> 16:double, CastLongToDouble(col 3:bigint) 
-> 18:double) -> 19:double, DoubleColUnaryMinus(col 5:double) -> 16:double, 
DoubleScalarSubtractDoubleColumn(val -1.3890000581741333, col 4:float) -> 
18:float, DoubleColUnaryMinus(col 4:float) -> 20:float, 
DoubleColAddDoubleColumn(col 21:double, col 23:double)(children: 
DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 21:double, 
DoubleColAddDoubleColumn(col 22:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 22:float) -> 23:float) -> 22:double
                 Statistics: Num rows: 12288 Data size: 2907994 Basic stats: 
COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: timestamp), _col1 (type: 
double), _col2 (type: boolean), _col3 (type: string), _col4 (type: float), 
_col5 (type: double), _col6 (type: double), _col7 (type: double), _col8 (type: 
float), _col9 (type: double), _col10 (type: double), _col11 (type: float), 
_col12 (type: float), _col13 (type: double)
@@ -289,7 +289,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [8, 5, 10, 6, 4, 13, 14, 15, 
17, 19, 16, 18, 20, 22]
-                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 
14:double, DoubleColMultiplyDoubleScalar(col 5:double, val -257.0) -> 
15:double, DoubleColAddDoubleColumn(col 16:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 16:float) -> 17:float, 
DoubleColAddDoubleColumn(col 16:double, col 18:double)(children: 
DoubleColUnaryMinus(col 5:double) -> 16:double, CastLongToDouble(col 3:bigint) 
-> 18:double) -> 19:double, DoubleColUnaryMinus(col 5:double) -> 16:double, 
DoubleScalarSubtractDoubleColumn(val -1.3890000581741333, col 4:float) -> 
18:float, DoubleColUnaryMinus(col 4:float) -> 20:float, 
DoubleColAddDoubleColumn(col 21:double, col 23:double)(children: 
DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 21:double, col 
23:float) -> 22:double
+                    selectExpressions: DoubleColUnaryMinus(col 5:double) -> 
13:double, DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 
14:double, DoubleColMultiplyDoubleScalar(col 5:double, val -257.0) -> 
15:double, DoubleColAddDoubleColumn(col 16:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 16:float) -> 17:float, 
DoubleColAddDoubleColumn(col 16:double, col 18:double)(children: 
DoubleColUnaryMinus(col 5:double) -> 16:double, CastLongToDouble(col 3:bigint) 
-> 18:double) -> 19:double, DoubleColUnaryMinus(col 5:double) -> 16:double, 
DoubleScalarSubtractDoubleColumn(val -1.3890000581741333, col 4:float) -> 
18:float, DoubleColUnaryMinus(col 4:float) -> 20:float, 
DoubleColAddDoubleColumn(col 21:double, col 23:double)(children: 
DoubleScalarSubtractDoubleColumn(val -5638.15, col 5:double) -> 21:double, 
DoubleColAddDoubleColumn(col 22:float, col 4:float)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 22:float) -> 23:float) -> 22:double
                 Statistics: Num rows: 12288 Data size: 2907994 Basic stats: 
COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: timestamp), _col1 (type: 
double), _col2 (type: boolean), _col3 (type: string), _col4 (type: float), 
_col5 (type: double), _col6 (type: double), _col7 (type: double), _col8 (type: 
float), _col9 (type: double), _col10 (type: double), _col11 (type: float), 
_col12 (type: float), _col13 (type: double)

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vectorized_casts.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_casts.q.out 
b/ql/src/test/results/clientpositive/vectorized_casts.q.out
index 99694ad..cf77aee 100644
--- a/ql/src/test/results/clientpositive/vectorized_casts.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_casts.q.out
@@ -181,7 +181,7 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [13, 14, 15, 16, 17, 18, 10, 
20, 19, 21, 0, 1, 2, 3, 22, 23, 10, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 4, 
5, 35, 36, 37, 38, 39, 5, 41, 43, 45, 47, 48, 49, 51, 54, 55, 8, 56, 57, 26, 
58, 59, 60, 61, 62, 63, 64, 65, 6, 67, 68, 69, 70, 66, 73]
-                    selectExpressions: CastLongToBooleanViaLongToLong(col 
0:tinyint) -> 13:boolean, CastLongToBooleanViaLongToLong(col 1:smallint) -> 
14:boolean, CastLongToBooleanViaLongToLong(col 2:int) -> 15:boolean, 
CastLongToBooleanViaLongToLong(col 3:bigint) -> 16:boolean, 
CastDoubleToBooleanViaDoubleToLong(col 4:float) -> 17:boolean, 
CastDoubleToBooleanViaDoubleToLong(col 5:double) -> 18:boolean, 
CastLongToBooleanViaLongToLong(col 19:bigint)(children: 
LongColMultiplyLongScalar(col 3:bigint, val 0) -> 19:bigint) -> 20:boolean, 
CastTimestampToBoolean(col 8:timestamp) -> 19:boolean, CastStringToBoolean(col 
6) -> 21:boolean, CastDoubleToLong(col 4:float) -> 22:int, CastDoubleToLong(col 
5:double) -> 23:int, CastTimestampToLong(col 8:timestamp) -> 24:int, 
CastStringToLong(col 6:string) -> 25:int, CastStringToLong(col 
26:string)(children: StringSubstrColStartLen(col 6:string, start 0, length 1) 
-> 26:string) -> 27:int, CastDoubleToLong(col 4:float) -> 28:tinyint, 
CastDoubleToLong(col
  4:float) -> 29:smallint, CastDoubleToLong(col 4:float) -> 30:bigint, 
CastLongToDouble(col 0:tinyint) -> 31:double, CastLongToDouble(col 1:smallint) 
-> 32:double, CastLongToDouble(col 2:int) -> 33:double, CastLongToDouble(col 
3:bigint) -> 34:double, CastLongToDouble(col 10:boolean) -> 35:double, 
CastTimestampToDouble(col 8:timestamp) -> 36:double, CastStringToDouble(col 
6:string) -> 37:double, CastStringToDouble(col 26:string)(children: 
StringSubstrColStartLen(col 6:string, start 0, length 1) -> 26:string) -> 
38:double, CastLongToFloatViaLongToDouble(col 2:int) -> 39:float, 
CastMillisecondsLongToTimestamp(col 0:tinyint) -> 41:timestamp, 
CastMillisecondsLongToTimestamp(col 1:smallint) -> 43:timestamp, 
CastMillisecondsLongToTimestamp(col 2:int) -> 45:timestamp, 
CastMillisecondsLongToTimestamp(col 3:bigint) -> 47:timestamp, 
CastDoubleToTimestamp(col 4:float) -> 48:timestamp, CastDoubleToTimestamp(col 
5:double) -> 49:timestamp, CastMillisecondsLongToTimestamp(col 10:boolean) -> 
51:times
 tamp, CastMillisecondsLongToTimestamp(col 52:bigint)(children: 
LongColMultiplyLongScalar(col 3:bigint, val 0) -> 52:bigint) -> 54:timestamp, 
CastDateToTimestamp(col 52:date)(children: CastTimestampToDate(col 8:timestamp) 
-> 52:date) -> 55:timestamp, CastStringToTimestamp(col 6:string) -> 
56:timestamp, CastStringToTimestamp(col 26:string)(children: 
StringSubstrColStartLen(col 6:string, start 0, length 1) -> 26:string) -> 
57:timestamp, CastLongToString(col 0:tinyint) -> 26:string, 
CastLongToString(col 1:smallint) -> 58:string, CastLongToString(col 2:int) -> 
59:string, CastLongToString(col 3:bigint) -> 60:string, CastFloatToString(col 
4:float) -> 61:string, CastDoubleToString(col 5:double) -> 62:string, 
CastBooleanToStringViaLongToString(col 10:boolean) -> 63:string, 
CastLongToString(col 52:bigint)(children: LongColMultiplyLongScalar(col 
3:bigint, val 0) -> 52:bigint) -> 64:string, CastTimestampToString(col 
8:timestamp) -> 65:string, CastStringGroupToString(col 66:char(10))(children: C
 astStringGroupToChar(col 6:string, maxLength 10) -> 66:char(10)) -> 67:string, 
CastStringGroupToString(col 66:varchar(10))(children: 
CastStringGroupToVarChar(col 6:string, maxLength 10) -> 66:varchar(10)) -> 
68:string, CastLongToFloatViaLongToDouble(col 52:int)(children: 
CastDoubleToLong(col 4:float) -> 52:int) -> 69:float, CastLongToDouble(col 
52:int)(children: LongColMultiplyLongScalar(col 2:int, val 2) -> 52:int) -> 
70:double, CastDoubleToString(col 71:double)(children: 
FuncSinDoubleToDouble(col 4:float) -> 71:double) -> 66:string, 
DoubleColAddDoubleColumn(col 71:double, col 72:double)(children: col 71:float, 
CastLongToDouble(col 10:boolean) -> 72:double) -> 73:double
+                    selectExpressions: CastLongToBooleanViaLongToLong(col 
0:tinyint) -> 13:boolean, CastLongToBooleanViaLongToLong(col 1:smallint) -> 
14:boolean, CastLongToBooleanViaLongToLong(col 2:int) -> 15:boolean, 
CastLongToBooleanViaLongToLong(col 3:bigint) -> 16:boolean, 
CastDoubleToBooleanViaDoubleToLong(col 4:float) -> 17:boolean, 
CastDoubleToBooleanViaDoubleToLong(col 5:double) -> 18:boolean, 
CastLongToBooleanViaLongToLong(col 19:bigint)(children: 
LongColMultiplyLongScalar(col 3:bigint, val 0) -> 19:bigint) -> 20:boolean, 
CastTimestampToBoolean(col 8:timestamp) -> 19:boolean, CastStringToBoolean(col 
6) -> 21:boolean, CastDoubleToLong(col 4:float) -> 22:int, CastDoubleToLong(col 
5:double) -> 23:int, CastTimestampToLong(col 8:timestamp) -> 24:int, 
CastStringToLong(col 6:string) -> 25:int, CastStringToLong(col 
26:string)(children: StringSubstrColStartLen(col 6:string, start 0, length 1) 
-> 26:string) -> 27:int, CastDoubleToLong(col 4:float) -> 28:tinyint, 
CastDoubleToLong(col
  4:float) -> 29:smallint, CastDoubleToLong(col 4:float) -> 30:bigint, 
CastLongToDouble(col 0:tinyint) -> 31:double, CastLongToDouble(col 1:smallint) 
-> 32:double, CastLongToDouble(col 2:int) -> 33:double, CastLongToDouble(col 
3:bigint) -> 34:double, CastLongToDouble(col 10:boolean) -> 35:double, 
CastTimestampToDouble(col 8:timestamp) -> 36:double, CastStringToDouble(col 
6:string) -> 37:double, CastStringToDouble(col 26:string)(children: 
StringSubstrColStartLen(col 6:string, start 0, length 1) -> 26:string) -> 
38:double, CastLongToFloatViaLongToDouble(col 2:int) -> 39:float, 
CastMillisecondsLongToTimestamp(col 0:tinyint) -> 41:timestamp, 
CastMillisecondsLongToTimestamp(col 1:smallint) -> 43:timestamp, 
CastMillisecondsLongToTimestamp(col 2:int) -> 45:timestamp, 
CastMillisecondsLongToTimestamp(col 3:bigint) -> 47:timestamp, 
CastDoubleToTimestamp(col 4:float) -> 48:timestamp, CastDoubleToTimestamp(col 
5:double) -> 49:timestamp, CastMillisecondsLongToTimestamp(col 10:boolean) -> 
51:times
 tamp, CastMillisecondsLongToTimestamp(col 52:bigint)(children: 
LongColMultiplyLongScalar(col 3:bigint, val 0) -> 52:bigint) -> 54:timestamp, 
CastDateToTimestamp(col 52:date)(children: CastTimestampToDate(col 8:timestamp) 
-> 52:date) -> 55:timestamp, CastStringToTimestamp(col 6:string) -> 
56:timestamp, CastStringToTimestamp(col 26:string)(children: 
StringSubstrColStartLen(col 6:string, start 0, length 1) -> 26:string) -> 
57:timestamp, CastLongToString(col 0:tinyint) -> 26:string, 
CastLongToString(col 1:smallint) -> 58:string, CastLongToString(col 2:int) -> 
59:string, CastLongToString(col 3:bigint) -> 60:string, CastFloatToString(col 
4:float) -> 61:string, CastDoubleToString(col 5:double) -> 62:string, 
CastBooleanToStringViaLongToString(col 10:boolean) -> 63:string, 
CastLongToString(col 52:bigint)(children: LongColMultiplyLongScalar(col 
3:bigint, val 0) -> 52:bigint) -> 64:string, CastTimestampToString(col 
8:timestamp) -> 65:string, CastStringGroupToString(col 66:char(10))(children: C
 astStringGroupToChar(col 6:string, maxLength 10) -> 66:char(10)) -> 67:string, 
CastStringGroupToString(col 66:varchar(10))(children: 
CastStringGroupToVarChar(col 6:string, maxLength 10) -> 66:varchar(10)) -> 
68:string, CastLongToFloatViaLongToDouble(col 52:int)(children: 
CastDoubleToLong(col 4:float) -> 52:int) -> 69:float, CastLongToDouble(col 
52:int)(children: LongColMultiplyLongScalar(col 2:int, val 2) -> 52:int) -> 
70:double, CastDoubleToString(col 71:double)(children: 
FuncSinDoubleToDouble(col 4:float) -> 71:double) -> 66:string, 
DoubleColAddDoubleColumn(col 71:double, col 72:double)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 71:float, CastLongToDouble(col 
10:boolean) -> 72:double) -> 73:double
                 Statistics: Num rows: 6144 Data size: 1453997 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out 
b/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
index a2e0fdd..d857cb0 100644
--- a/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
@@ -555,8 +555,8 @@ STAGE PLANS:
               Select Vectorization:
                   className: VectorSelectOperator
                   native: true
-                  projectedOutputColumnNums: [0, 3, 4, 5, 6, 7, 8, 9, 0, 10, 
11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
-                  selectExpressions: VectorUDFUnixTimeStampDate(col 0) -> 
3:bigint, VectorUDFYearDate(col 0, field YEAR) -> 4:int, VectorUDFMonthDate(col 
0, field MONTH) -> 5:int, VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 
6:int, VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 7:int, 
VectorUDFDayOfWeekDate(col 0, field DAY_OF_WEEK) -> 8:int, 
VectorUDFWeekOfYearDate(col 0, field WEEK_OF_YEAR) -> 9:int, 
VectorUDFDateLong(col 0:date) -> 10:date, VectorUDFDateAddColScalar(col 0:date, 
val 2) -> 11:date, VectorUDFDateSubColScalar(col 0:date, val 2) -> 12:date, 
VectorUDFDateDiffColScalar(col 0:date, val 2000-01-01) -> 13:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 14:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 15:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 16:int, 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 17:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 18:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL
 ) -> 19:int, VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 20:int
+                  projectedOutputColumnNums: [0, 3, 4, 5, 6, 7, 8, 9, 0, 0, 
10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
+                  selectExpressions: VectorUDFUnixTimeStampDate(col 0) -> 
3:bigint, VectorUDFYearDate(col 0, field YEAR) -> 4:int, VectorUDFMonthDate(col 
0, field MONTH) -> 5:int, VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 
6:int, VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 7:int, 
VectorUDFDayOfWeekDate(col 0, field DAY_OF_WEEK) -> 8:int, 
VectorUDFWeekOfYearDate(col 0, field WEEK_OF_YEAR) -> 9:int, 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 10:date, 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 11:date, 
VectorUDFDateDiffColScalar(col 0:date, val 2000-01-01) -> 12:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 13:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 14:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 15:int, 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 16:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 17:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 18:int, 
VectorUDFDateDiffColScalar(co
 l 0:date, val NULL) -> 19:int
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE 
Column stats: NONE
               File Output Operator
                 compressed: false
@@ -847,8 +847,8 @@ STAGE PLANS:
               Select Vectorization:
                   className: VectorSelectOperator
                   native: true
-                  projectedOutputColumnNums: [1, 0, 5, 6, 7, 8, 9, 10, 4, 12, 
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
-                  selectExpressions: LongColEqualLongColumn(col 3:int, col 
4:int)(children: VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 3:int, 
VectorUDFYearDate(col 0, field YEAR) -> 4:int) -> 5:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFMonthTimestamp(col 1:timestamp, field MONTH) -> 3:int, 
VectorUDFMonthDate(col 0, field MONTH) -> 4:int) -> 6:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfMonthTimestamp(col 1:timestamp, field DAY_OF_MONTH) -> 3:int, 
VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 4:int) -> 7:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfMonthTimestamp(col 1:timestamp, field DAY_OF_MONTH) -> 3:int, 
VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 4:int) -> 8:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfWeekTimestamp(col 1:timestamp, field DAY_OF_WEEK) -> 3:int, 
VectorUDFDayOfWeekDate(col 0, field DAY_OF_WEEK) -> 4:int) 
 -> 9:boolean, LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFWeekOfYearTimestamp(col 1:timestamp, field WEEK_OF_YEAR) -> 3:int, 
VectorUDFWeekOfYearDate(col 0, field WEEK_OF_YEAR) -> 4:int) -> 10:boolean, 
LongColEqualLongColumn(col 3:date, col 0:date)(children: 
CastTimestampToDate(col 1:timestamp) -> 3:date) -> 4:boolean, 
LongColEqualLongColumn(col 3:date, col 11:date)(children: 
VectorUDFDateTimestamp(col 1:timestamp) -> 3:date, VectorUDFDateLong(col 
0:date) -> 11:date) -> 12:boolean, LongColEqualLongColumn(col 3:date, col 
11:date)(children: VectorUDFDateAddColScalar(col 1:timestamp, val 2) -> 3:date, 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 11:date) -> 13:boolean, 
LongColEqualLongColumn(col 3:date, col 11:date)(children: 
VectorUDFDateSubColScalar(col 1:timestamp, val 2) -> 3:date, 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 11:date) -> 14:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val 2000-
 01-01) -> 3:int, VectorUDFDateDiffColScalar(col 0:date, val 2000-01-01) -> 
11:int) -> 15:boolean, LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 16:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 17:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 18:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val 2007-03-14) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 11:int) -> 
19:boolean, LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NUL
 L) -> 3:int, VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 
20:boolean, LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 21:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 22:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 0:date, val 2000-01-01) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 23:boolean, 
LongColEqualLongColumn(col 3:int, col 11:int)(children: 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 11:int) -> 24:boolean
+                  projectedOutputColumnNums: [1, 0, 5, 6, 7, 8, 9, 10, 4, 11, 
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
+                  selectExpressions: LongColEqualLongColumn(col 3:int, col 
4:int)(children: VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 3:int, 
VectorUDFYearDate(col 0, field YEAR) -> 4:int) -> 5:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFMonthTimestamp(col 1:timestamp, field MONTH) -> 3:int, 
VectorUDFMonthDate(col 0, field MONTH) -> 4:int) -> 6:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfMonthTimestamp(col 1:timestamp, field DAY_OF_MONTH) -> 3:int, 
VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 4:int) -> 7:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfMonthTimestamp(col 1:timestamp, field DAY_OF_MONTH) -> 3:int, 
VectorUDFDayOfMonthDate(col 0, field DAY_OF_MONTH) -> 4:int) -> 8:boolean, 
LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFDayOfWeekTimestamp(col 1:timestamp, field DAY_OF_WEEK) -> 3:int, 
VectorUDFDayOfWeekDate(col 0, field DAY_OF_WEEK) -> 4:int) 
 -> 9:boolean, LongColEqualLongColumn(col 3:int, col 4:int)(children: 
VectorUDFWeekOfYearTimestamp(col 1:timestamp, field WEEK_OF_YEAR) -> 3:int, 
VectorUDFWeekOfYearDate(col 0, field WEEK_OF_YEAR) -> 4:int) -> 10:boolean, 
LongColEqualLongColumn(col 3:date, col 0:date)(children: 
CastTimestampToDate(col 1:timestamp) -> 3:date) -> 4:boolean, 
LongColEqualLongColumn(col 3:date, col 0:date)(children: 
VectorUDFDateTimestamp(col 1:timestamp) -> 3:date, col 0:date) -> 11:boolean, 
LongColEqualLongColumn(col 3:date, col 12:date)(children: 
VectorUDFDateAddColScalar(col 1:timestamp, val 2) -> 3:date, 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 12:date) -> 13:boolean, 
LongColEqualLongColumn(col 3:date, col 12:date)(children: 
VectorUDFDateSubColScalar(col 1:timestamp, val 2) -> 3:date, 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 12:date) -> 14:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val 2000-01-01) -> 3:int, 
VectorUDFDateD
 iffColScalar(col 0:date, val 2000-01-01) -> 12:int) -> 15:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 16:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 17:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 18:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val 2007-03-14) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 12:int) -> 
19:boolean, LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffC
 olScalar(col 0:date, val NULL) -> 12:int) -> 20:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 21:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 1:timestamp, val NULL) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 22:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 0:date, val 2000-01-01) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 23:boolean, 
LongColEqualLongColumn(col 3:int, col 12:int)(children: 
VectorUDFDateDiffColScalar(col 0:date, val 2007-03-14) -> 3:int, 
VectorUDFDateDiffColScalar(col 0:date, val NULL) -> 12:int) -> 24:boolean
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE 
Column stats: NONE
               File Output Operator
                 compressed: false
@@ -1111,8 +1111,8 @@ STAGE PLANS:
               Select Vectorization:
                   className: VectorSelectOperator
                   native: true
-                  projectedOutputColumnNums: [0, 4, 5, 6, 7, 9]
-                  selectExpressions: VectorUDFDateLong(col 3:date)(children: 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 3:date) -> 4:date, 
VectorUDFDateLong(col 3:date)(children: VectorUDFDateSubColScalar(col 0:date, 
val 2) -> 3:date) -> 5:date, VectorUDFDateDiffColCol(col 0:date, col 
3:date)(children: VectorUDFDateAddColScalar(col 0:date, val 2) -> 3:date) -> 
6:int, VectorUDFDateDiffColCol(col 0:date, col 3:date)(children: 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 3:date) -> 7:int, 
VectorUDFDateDiffColCol(col 3:date, col 8:date)(children: 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 3:date, 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 8:date) -> 9:int
+                  projectedOutputColumnNums: [0, 3, 4, 6, 7, 9]
+                  selectExpressions: VectorUDFDateAddColScalar(col 0:date, val 
2) -> 3:date, VectorUDFDateSubColScalar(col 0:date, val 2) -> 4:date, 
VectorUDFDateDiffColCol(col 0:date, col 5:date)(children: 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 5:date) -> 6:int, 
VectorUDFDateDiffColCol(col 0:date, col 5:date)(children: 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 5:date) -> 7:int, 
VectorUDFDateDiffColCol(col 5:date, col 8:date)(children: 
VectorUDFDateAddColScalar(col 0:date, val 2) -> 5:date, 
VectorUDFDateSubColScalar(col 0:date, val 2) -> 8:date) -> 9:int
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE 
Column stats: NONE
               Limit
                 Number of rows: 10

http://git-wip-us.apache.org/repos/asf/hive/blob/edc53cc0/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java
----------------------------------------------------------------------
diff --git 
a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java 
b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java
index 666572a..0e147be 100644
--- a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java
+++ b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java
@@ -940,6 +940,29 @@ public class GenVectorCode extends Task {
       {"FilterColumnBetweenDynamicValue", "date", ""},
       {"FilterColumnBetweenDynamicValue", "timestamp", ""},
 
+      {"ColumnBetween", "long", ""},
+      {"ColumnBetween", "double", ""},
+      {"ColumnBetween", "long", "!"},
+      {"ColumnBetween", "double", "!"},
+
+      {"StringColumnBetween", "string", ""},
+      {"StringColumnBetween", "string", "!"},
+
+      {"TruncStringColumnBetween", "char", ""},
+      {"TruncStringColumnBetween", "char", "!"},
+
+      {"TruncStringColumnBetween", "varchar", ""},
+      {"TruncStringColumnBetween", "varchar", "!"},
+
+      {"TimestampColumnBetween", "timestamp", ""},
+      {"TimestampColumnBetween", "timestamp", "!"},
+
+      {"DecimalColumnBetween", "decimal", ""},
+      {"DecimalColumnBetween", "decimal", "!"},
+
+      {"Decimal64ColumnBetween", ""},
+      {"Decimal64ColumnBetween", "!"},
+
       {"ColumnCompareColumn", "Equal", "long", "long", "=="},
       {"ColumnCompareColumn", "Equal", "long", "double", "=="},
       {"ColumnCompareColumn", "Equal", "double", "double", "=="},
@@ -1368,6 +1391,15 @@ public class GenVectorCode extends Task {
         generateFilterColumnBetween(tdesc);
       } else if (tdesc[0].equals("FilterColumnBetweenDynamicValue")) {
         generateFilterColumnBetweenDynamicValue(tdesc);
+      } else if (tdesc[0].equals("ColumnBetween") ||
+                 tdesc[0].equals("StringColumnBetween") ||
+                 tdesc[0].equals("TimestampColumnBetween") ||
+                 tdesc[0].equals("DecimalColumnBetween")) {
+        generateColumnBetween(tdesc);
+      } else if (tdesc[0].equals("TruncStringColumnBetween")) {
+        generateTruncStringColumnBetween(tdesc);
+      } else if (tdesc[0].equals("Decimal64ColumnBetween")) {
+        generateDecimal64ColumnBetween(tdesc);
       } else if (tdesc[0].equals("ScalarArithmeticColumn") || 
tdesc[0].equals("ScalarDivideColumn")) {
         generateScalarArithmeticColumn(tdesc);
       } else if (tdesc[0].equals("FilterColumnCompareColumn")) {
@@ -1693,6 +1725,63 @@ public class GenVectorCode extends Task {
         className, templateString);
   }
 
+  private void generateColumnBetween(String[] tdesc) throws Exception {
+    String operandType = tdesc[1];
+    String optionalNot = tdesc[2];
+
+    String className = getCamelCaseType(operandType) + "Column" +
+      (optionalNot.equals("!") ? "Not" : "") + "Between";
+    String inputColumnVectorType = getColumnVectorType(operandType);
+
+    // Read the template into a string, expand it, and write it.
+    File templateFile = new File(joinPath(this.expressionTemplateDirectory, 
tdesc[0] + ".txt"));
+    String templateString = readFile(templateFile);
+    templateString = templateString.replaceAll("<ClassName>", className);
+    templateString = templateString.replaceAll("<InputColumnVectorType>", 
inputColumnVectorType);
+    templateString = templateString.replaceAll("<OperandType>", operandType);
+    templateString = templateString.replaceAll("<OptionalNot>", optionalNot);
+
+    writeFile(templateFile.lastModified(), expressionOutputDirectory, 
expressionClassesDirectory,
+        className, templateString);
+  }
+
+  private void generateTruncStringColumnBetween(String[] tdesc) throws 
Exception {
+    String operandType = tdesc[1];
+    String optionalNot = tdesc[2];
+
+    String className = getCamelCaseType(operandType) + "Column" +
+      (optionalNot.equals("!") ? "Not" : "") + "Between";
+    String baseClassName = "StringColumn" +
+        (optionalNot.equals("!") ? "Not" : "") + "Between";
+
+    // Read the template into a string, expand it, and write it.
+    File templateFile = new File(joinPath(this.expressionTemplateDirectory, 
tdesc[0] + ".txt"));
+    String templateString = readFile(templateFile);
+    templateString = templateString.replaceAll("<ClassName>", className);
+    templateString = templateString.replaceAll("<BaseClassName>", 
baseClassName);
+
+    writeFile(templateFile.lastModified(), expressionOutputDirectory, 
expressionClassesDirectory,
+        className, templateString);
+  }
+
+  private void generateDecimal64ColumnBetween(String[] tdesc) throws Exception 
{
+    String optionalNot = tdesc[1];
+
+    String className = "Decimal64Column" +
+      (optionalNot.equals("!") ? "Not" : "") + "Between";
+    String baseClassName = "LongColumn" +
+        (optionalNot.equals("!") ? "Not" : "") + "Between";
+
+    // Read the template into a string, expand it, and write it.
+    File templateFile = new File(joinPath(this.expressionTemplateDirectory, 
tdesc[0] + ".txt"));
+    String templateString = readFile(templateFile);
+    templateString = templateString.replaceAll("<ClassName>", className);
+    templateString = templateString.replaceAll("<BaseClassName>", 
baseClassName);
+
+    writeFile(templateFile.lastModified(), expressionOutputDirectory, 
expressionClassesDirectory,
+        className, templateString);
+  }
+
   private void generateColumnCompareColumn(String[] tdesc) throws Exception {
     String operatorName = tdesc[1];
     String operandType1 = tdesc[2];

Reply via email to