Repository: hive
Updated Branches:
  refs/heads/master e2142b206 -> fa36381fa


http://git-wip-us.apache.org/repos/asf/hive/blob/fa36381f/ql/src/test/results/clientpositive/vector_case_when_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_case_when_1.q.out 
b/ql/src/test/results/clientpositive/vector_case_when_1.q.out
index 01fc3ce..88cba90 100644
--- a/ql/src/test/results/clientpositive/vector_case_when_1.q.out
+++ b/ql/src/test/results/clientpositive/vector_case_when_1.q.out
@@ -516,7 +516,7 @@ STAGE PLANS:
                   className: VectorSelectOperator
                   native: true
                   projectedOutputColumnNums: [4, 22, 24, 25, 26, 27, 28, 30, 
31, 32, 33, 34, 36, 40, 42, 45, 46]
-                  selectExpressions: IfExprStringScalarStringGroupColumn(col 
17:boolean, val Singlecol 21:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 
18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, 
val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val 
Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 
21:string) -> 22:string) -> 21:string) -> 22:string, 
IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 
23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
24:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val 
 Somecol 23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
19:boolean, IfExprColumnNull(col 20:boolean, col 21:string, null)(children: 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, 
ConstantVectorExpression(val Many) -> 21:string) -> 23:string) -> 24:string) -> 
23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 17:boolean, 
val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 
23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
IfExprNullNull(null, null) -> 23:string) -> 25:string) -> 23:string) -> 
25:string, IfExprLongColumnLongColumn(col 17:boolean, col 18:date, col 
19:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
17:boolean, VectorUDFDateAddColScalar(co
 l 10:date, val 10) -> 18:date, VectorUDFDateAddColScalar(col 10:date, val 5) 
-> 19:date) -> 26:date, IfExprDoubleColumnLongScalar(col 17:boolean, col 
28:double, val 0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) 
-> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
27:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 
27:double) -> 28:double) -> 27:double, IfExprDoubleColumnDoubleScalar(col 
17:boolean, col 29:double, val 0.0)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 28:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 28:double) -> 29:double) -> 28:double, IfExprNullColumn(col 
17:boolean, null, col 48)(children: StringGroupColEqualStringScalar(col 
23:string, val DELIVER IN PERSON)(children: CastStringGroupToString(col 
13:varchar(20)) -> 23:string) -> 17:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) ->
  48:decimal(10,2)) -> 30:decimal(10,2), IfExprColumnNull(col 18:boolean, col 
49:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 
23:string, val TAKE BACK RETURN)(children: CastStringGroupToString(col 
13:varchar(20)) -> 23:string) -> 18:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 49:decimal(10,2)) -> 31:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 23:string, val DELIVER IN 
PERSON)(children: CastStringGroupToString(col 13:varchar(20)) -> 23:string) -> 
19:boolean) -> 32:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS 
STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: 
StringGroupColEqualStringScalar(col 23:string, val TAKE BACK RETURN)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 23:string) -> 19:boolean) -> 
33:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 19:boolean, 
decimal64Val 0, decimalVal 0, col 7:dec
 imal(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 23:string, 
val DELIVER IN PERSON)(children: CastStringGroupToString(col 13:varchar(20)) -> 
23:string) -> 19:boolean) -> 34:decimal(10,2)/DECIMAL_64, 
IfExprDecimal64ColumnDecimal64Scalar(col 35:boolean, col 
7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: 
StringGroupColEqualStringScalar(col 23:string, val TAKE BACK RETURN)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 23:string) -> 35:boolean) -> 
36:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 37:boolean, col 
38:timestampcol 39:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 
30) -> 37:boolean, CastDateToTimestamp(col 12:date) -> 38:timestamp, 
CastDateToTimestamp(col 11:date) -> 39:timestamp) -> 40:timestamp, 
IfExprColumnNull(col 37:boolean, col 41:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 37:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 41:int) -> 42:int, 
IfExprNullCo
 lumn(col 43:boolean, null, col 44)(children: LongColGreaterLongScalar(col 
2:int, val 10000) -> 43:boolean, VectorUDFDateDiffColCol(col 12:date, col 
11:date) -> 44:int) -> 45:int, IfExprLongScalarLongScalar(col 47:boolean, val 
14245, val 14609)(children: LongColGreaterLongScalar(col 46:int, val 
100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 46:int) -> 
47:boolean) -> 46:date
+                  selectExpressions: IfExprStringScalarStringGroupColumn(col 
17:boolean, val Singlecol 21:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 
18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, 
val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val 
Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 
21:string) -> 22:string) -> 21:string) -> 22:string, 
IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 
23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, 
IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
24:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val 
 Somecol 23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 
19:boolean, IfExprColumnNull(col 20:boolean, col 21:string, null)(children: 
LongColLessLongScalar(col 4:int, val 100) -> 20:boolean, 
ConstantVectorExpression(val Many) -> 21:string) -> 23:string) -> 24:string) -> 
23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 17:boolean, 
val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 
25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, 
IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 
23:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, 
IfExprNullNull(null, null) -> 23:string) -> 25:string) -> 23:string) -> 
25:string, IfExprLongColumnLongColumn(col 17:boolean, col 18:date, col 
19:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
17:boolean, VectorUDFDateAddColScalar(co
 l 10:date, val 10) -> 18:date, VectorUDFDateAddColScalar(col 10:date, val 5) 
-> 19:date) -> 26:date, IfExprDoubleColumnLongScalar(col 17:boolean, col 
28:double, val 0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) 
-> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
27:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 
27:double) -> 28:double) -> 27:double, IfExprDoubleColumnDoubleScalar(col 
17:boolean, col 29:double, val 0.0)(children: StringGroupColEqualCharScalar(col 
8:char(1), val N) -> 17:boolean, DoubleColMultiplyDoubleColumn(col 5:double, 
col 28:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 
6:double) -> 28:double) -> 29:double) -> 28:double, IfExprNullColumn(col 
17:boolean, null, col 48)(children: StringGroupColEqualStringScalar(col 
13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 17:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 48:decimal(10,2)) 
-> 30:decimal(10,2)
 , IfExprColumnNull(col 18:boolean, col 49:decimal(10,2), null)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 18:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 49:decimal(10,2)) -> 31:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 19:boolean) -> 32:decimal(12,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE 
BACK RETURN)(children: col 13:varchar(20)) -> 19:boolean) -> 33:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 19:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 
13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 19:boolean) 
-> 34
 :decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 
35:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 
0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 35:boolean) -> 
36:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 37:boolean, col 
38:timestampcol 39:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 
30) -> 37:boolean, CastDateToTimestamp(col 12:date) -> 38:timestamp, 
CastDateToTimestamp(col 11:date) -> 39:timestamp) -> 40:timestamp, 
IfExprColumnNull(col 37:boolean, col 41:int, null)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 37:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 41:int) -> 42:int, 
IfExprNullColumn(col 43:boolean, null, col 44)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 43:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 44:int) -> 45:int, 
IfExprLongScalarLongScalar(col 47:boolean, val 14
 245, val 14609)(children: LongColGreaterLongScalar(col 46:int, val 
100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 46:int) -> 
47:boolean) -> 46:date
               Statistics: Num rows: 101 Data size: 78500 Basic stats: COMPLETE 
Column stats: NONE
               File Output Operator
                 compressed: false
@@ -844,8 +844,8 @@ STAGE PLANS:
               Select Vectorization:
                   className: VectorSelectOperator
                   native: true
-                  projectedOutputColumnNums: [4, 27, 38, 48, 52, 54, 60, 63, 
65, 67, 68, 69, 71, 75, 78, 81, 82]
-                  selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 
18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, ConstantVectorExpression(val Single) -> 18:string, 
IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, 
ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 
21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 
4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, 
IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 
24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 
23:boolean, col 28:stringcol 37:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 23:boolean, ConstantVectorExpression(val Single) -> 28:string, 
IfExprColumnCondExpr(col 29:boolean, col
  30:stringcol 36:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 
29:boolean, ConstantVectorExpression(val Two) -> 30:string, 
IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 35:string)(children: 
LongColLessLongScalar(col 4:int, val 10) -> 31:boolean, 
ConstantVectorExpression(val Some) -> 32:string, IfExprColumnNull(col 
33:boolean, col 34:string, null)(children: LongColLessLongScalar(col 4:int, val 
100) -> 33:boolean, ConstantVectorExpression(val Many) -> 34:string) -> 
35:string) -> 36:string) -> 37:string) -> 38:string, IfExprColumnCondExpr(col 
39:boolean, col 40:stringcol 47:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 39:boolean, ConstantVectorExpression(val Single) -> 40:string, 
IfExprColumnCondExpr(col 41:boolean, col 42:stringcol 46:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 41:boolean, 
ConstantVectorExpression(val Two) -> 42:string, IfExprColumnCondExpr(col 
43:boolean, col 44:stringcol 45:string)(children: LongColLessLongS
 calar(col 4:int, val 10) -> 43:boolean, ConstantVectorExpression(val Some) -> 
44:string, IfExprNullNull(null, null) -> 45:string) -> 46:string) -> 47:string) 
-> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 
51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, 
IfExprDoubleColumnLongScalar(col 57:boolean, col 58:double, val 0)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 57:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 
58:double) -> 54:double, IfExprCondExprColumn(col 57:boolean, col 59:double, 
col 58:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 
57:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
58:double)(children: DoubleScalarSubtractDoubleC
 olumn(val 1.0, col 6:double) -> 58:double) -> 59:double, 
ConstantVectorExpression(val 0.0) -> 58:double) -> 60:double, 
IfExprNullColumn(col 62:boolean, null, col 84)(children: 
StringGroupColEqualStringScalar(col 61:string, val DELIVER IN PERSON)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 62:boolean, 
ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 84:decimal(10,2)) 
-> 63:decimal(10,2), IfExprColumnNull(col 64:boolean, col 85:decimal(10,2), 
null)(children: StringGroupColEqualStringScalar(col 61:string, val TAKE BACK 
RETURN)(children: CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 
64:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 
85:decimal(10,2)) -> 65:decimal(10,2), VectorUDFAdaptor(if((CAST( 
l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: 
StringGroupColEqualStringScalar(col 61:string, val DELIVER IN PERSON)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 66:boo
 lean) -> 67:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS 
STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: 
StringGroupColEqualStringScalar(col 61:string, val TAKE BACK RETURN)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 66:boolean) -> 
68:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 66:boolean, 
decimal64Val 0, decimalVal 0, col 7:decimal(1,0)/DECIMAL_64)(children: 
StringGroupColEqualStringScalar(col 61:string, val DELIVER IN PERSON)(children: 
CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 66:boolean) -> 
69:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 
70:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 
0)(children: StringGroupColEqualStringScalar(col 61:string, val TAKE BACK 
RETURN)(children: CastStringGroupToString(col 13:varchar(20)) -> 61:string) -> 
70:boolean) -> 71:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 
72:boolean, col 73:timestampcol 74:timestamp)(children:
  LongColGreaterLongScalar(col 1:int, val 30) -> 72:boolean, 
CastDateToTimestamp(col 12:date) -> 73:timestamp, CastDateToTimestamp(col 
11:date) -> 74:timestamp) -> 75:timestamp, IfExprCondExprNull(col 76:boolean, 
col 77:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 
76:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 77:int) -> 
78:int, IfExprNullCondExpr(col 79:boolean, null, col 80:int)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 79:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 80:int) -> 81:int, 
IfExprLongScalarLongScalar(col 83:boolean, val 14245, val 14609)(children: 
LongColGreaterLongScalar(col 82:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 82:int) -> 83:boolean) -> 82:date
+                  projectedOutputColumnNums: [4, 27, 38, 48, 52, 54, 60, 62, 
64, 66, 67, 68, 70, 74, 77, 80, 81]
+                  selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 
18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 
17:boolean, ConstantVectorExpression(val Single) -> 18:string, 
IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, 
ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 
21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 
4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, 
IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge 
number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 
24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 
23:boolean, col 28:stringcol 37:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 23:boolean, ConstantVectorExpression(val Single) -> 28:string, 
IfExprColumnCondExpr(col 29:boolean, col
  30:stringcol 36:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 
29:boolean, ConstantVectorExpression(val Two) -> 30:string, 
IfExprColumnCondExpr(col 31:boolean, col 32:stringcol 35:string)(children: 
LongColLessLongScalar(col 4:int, val 10) -> 31:boolean, 
ConstantVectorExpression(val Some) -> 32:string, IfExprColumnNull(col 
33:boolean, col 34:string, null)(children: LongColLessLongScalar(col 4:int, val 
100) -> 33:boolean, ConstantVectorExpression(val Many) -> 34:string) -> 
35:string) -> 36:string) -> 37:string) -> 38:string, IfExprColumnCondExpr(col 
39:boolean, col 40:stringcol 47:string)(children: LongColEqualLongScalar(col 
4:int, val 1) -> 39:boolean, ConstantVectorExpression(val Single) -> 40:string, 
IfExprColumnCondExpr(col 41:boolean, col 42:stringcol 46:string)(children: 
LongColEqualLongScalar(col 4:int, val 2) -> 41:boolean, 
ConstantVectorExpression(val Two) -> 42:string, IfExprColumnCondExpr(col 
43:boolean, col 44:stringcol 45:string)(children: LongColLessLongS
 calar(col 4:int, val 10) -> 43:boolean, ConstantVectorExpression(val Some) -> 
44:string, IfExprNullNull(null, null) -> 45:string) -> 46:string) -> 47:string) 
-> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 
51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 
49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, 
VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, 
IfExprDoubleColumnLongScalar(col 57:boolean, col 58:double, val 0)(children: 
StringGroupColEqualCharScalar(col 8:char(1), val N) -> 57:boolean, 
DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: 
DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 
58:double) -> 54:double, IfExprCondExprColumn(col 57:boolean, col 59:double, 
col 58:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 
57:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 
58:double)(children: DoubleScalarSubtractDoubleC
 olumn(val 1.0, col 6:double) -> 58:double) -> 59:double, 
ConstantVectorExpression(val 0.0) -> 58:double) -> 60:double, 
IfExprNullColumn(col 61:boolean, null, col 83)(children: 
StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: 
col 13:varchar(20)) -> 61:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 83:decimal(10,2)) -> 62:decimal(10,2), 
IfExprColumnNull(col 63:boolean, col 84:decimal(10,2), null)(children: 
StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: 
col 13:varchar(20)) -> 63:boolean, ConvertDecimal64ToDecimal(col 
7:decimal(10,2)/DECIMAL_64) -> 84:decimal(10,2)) -> 64:decimal(10,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, 
l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN 
PERSON)(children: col 13:varchar(20)) -> 65:boolean) -> 66:decimal(12,2), 
VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), 
l_tax, 0))(
 children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 65:boolean) -> 67:decimal(12,2), 
IfExprDecimal64ScalarDecimal64Column(col 65:boolean, decimal64Val 0, decimalVal 
0, col 7:decimal(1,0)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 
13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 65:boolean) 
-> 68:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 
69:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 
0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK 
RETURN)(children: col 13:varchar(20)) -> 69:boolean) -> 
70:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 71:boolean, col 
72:timestampcol 73:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 
30) -> 71:boolean, CastDateToTimestamp(col 12:date) -> 72:timestamp, 
CastDateToTimestamp(col 11:date) -> 73:timestamp) -> 74:timestamp, 
IfExprCondExprNull(col 75:boolean, col 76:int, null
 )(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 75:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 76:int) -> 77:int, 
IfExprNullCondExpr(col 78:boolean, null, col 79:int)(children: 
LongColGreaterLongScalar(col 2:int, val 10000) -> 78:boolean, 
VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 79:int) -> 80:int, 
IfExprLongScalarLongScalar(col 82:boolean, val 14245, val 14609)(children: 
LongColGreaterLongScalar(col 81:int, val 100)(children: 
LongColModuloLongScalar(col 2:int, val 500) -> 81:int) -> 82:boolean) -> 81:date
               Statistics: Num rows: 101 Data size: 78500 Basic stats: COMPLETE 
Column stats: NONE
               File Output Operator
                 compressed: false
@@ -872,7 +872,7 @@ STAGE PLANS:
               includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14]
               dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, 
l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, 
l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), 
l_shipdate:date, l_commitdate:date, l_receiptdate:date, 
l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string
               partitionColumnCount: 0
-              scratchColumnTypeNames: [bigint, 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, double, double, bigint, bigint, double, double, double, string, 
bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), 
decimal(12,2), decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, 
bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, 
bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)]
+              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, double, double, bigint, bigint, double, double, double, bigint, 
decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), decimal(12,2), 
decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, 
timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, 
bigint, decimal(10,2), decimal(10,2)]
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/fa36381f/ql/src/test/results/clientpositive/vector_char_mapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_char_mapjoin1.q.out 
b/ql/src/test/results/clientpositive/vector_char_mapjoin1.q.out
index 260c159..934a1e7 100644
--- a/ql/src/test/results/clientpositive/vector_char_mapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/vector_char_mapjoin1.q.out
@@ -465,7 +465,7 @@ STAGE PLANS:
                     0 CAST( _col1 AS STRING) (type: string)
                     1 _col1 (type: string)
                   Map Join Vectorization:
-                      bigTableKeyExpressions: CastStringGroupToString(col 
1:char(10)) -> 3:string
+                      bigTableKeyExpressions: col 1:char(10)
                       bigTableValueExpressions: col 0:int, col 1:char(10)
                       className: VectorMapJoinOperator
                       native: false

http://git-wip-us.apache.org/repos/asf/hive/blob/fa36381f/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 cf77aee..cfe2391 100644
--- a/ql/src/test/results/clientpositive/vectorized_casts.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_casts.q.out
@@ -180,8 +180,8 @@ STAGE PLANS:
                 Select Vectorization:
                     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: 
CastLongToFloatViaLongToDouble(col 2:int) -> 71:float, CastLongToDouble(col 
10:boolean) -> 72:double) -> 73:double
+                    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, 66, 67, 68, 69, 71, 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, CastStringGroupToChar(col 6:string, maxLength 10) ->
  66:char(10), CastStringGroupToVarChar(col 6:string, maxLength 10) -> 
67:varchar(10), CastLongToFloatViaLongToDouble(col 52:int)(children: 
CastDoubleToLong(col 4:float) -> 52:int) -> 68:float, CastLongToDouble(col 
52:int)(children: LongColMultiplyLongScalar(col 2:int, val 2) -> 52:int) -> 
69:double, CastDoubleToString(col 70:double)(children: 
FuncSinDoubleToDouble(col 4:float) -> 70:double) -> 71:string, 
DoubleColAddDoubleColumn(col 70:double, col 72:double)(children: 
CastLongToFloatViaLongToDouble(col 2:int) -> 70: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
@@ -208,7 +208,7 @@ STAGE PLANS:
               includeColumns: [0, 1, 2, 3, 4, 5, 6, 8, 10]
               dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, 
cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, 
ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, 
cboolean2:boolean
               partitionColumnCount: 0
-              scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, 
bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, string, bigint, 
bigint, bigint, bigint, double, double, double, double, double, double, double, 
double, double, timestamp, timestamp, timestamp, timestamp, timestamp, 
timestamp, timestamp, timestamp, timestamp, timestamp, timestamp, timestamp, 
bigint, timestamp, timestamp, timestamp, timestamp, timestamp, string, string, 
string, string, string, string, string, string, string, string, string, double, 
double, double, double, double]
+              scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint, 
bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, string, bigint, 
bigint, bigint, bigint, double, double, double, double, double, double, double, 
double, double, timestamp, timestamp, timestamp, timestamp, timestamp, 
timestamp, timestamp, timestamp, timestamp, timestamp, timestamp, timestamp, 
bigint, timestamp, timestamp, timestamp, timestamp, timestamp, string, string, 
string, string, string, string, string, string, string, string, double, double, 
double, string, double, double]
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/fa36381f/serde/src/java/org/apache/hadoop/hive/serde2/RandomTypeUtil.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/RandomTypeUtil.java 
b/serde/src/java/org/apache/hadoop/hive/serde2/RandomTypeUtil.java
index 9360509..3720b68 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/RandomTypeUtil.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/RandomTypeUtil.java
@@ -57,6 +57,35 @@ public class RandomTypeUtil {
     return bytes;
   }
 
+  public static String getRandUnicodeString(Random r) {
+    return getRandUnicodeString(r, r.nextInt(10));
+  }
+
+  // Skip lower ASCII to avoid punctuation that might mess up serialization, 
etc...
+  private static int MIN_RANDOM_CODEPOINT = 256;
+  private static int RANGE_RANDOM_CODEPOINT = Character.MAX_CODE_POINT + 1 - 
MIN_RANDOM_CODEPOINT;
+
+  public static String getRandUnicodeString(Random r, int length) {
+    StringBuilder sb = new StringBuilder();
+    for (int i = 0; i < length; i++) {
+      char ch;
+      while (true) {
+        int codePoint = MIN_RANDOM_CODEPOINT + 
r.nextInt(RANGE_RANDOM_CODEPOINT);
+        if (!Character.isDefined(codePoint) ||
+            Character.getType(codePoint) == Character.PRIVATE_USE) {
+          continue;
+        }
+        ch = (char) codePoint;
+        if (Character.isSurrogate(ch)) {
+          continue;
+        }
+        break;
+      }
+      sb.append(ch);
+    }
+    return sb.toString();
+  }
+
   private static final String DECIMAL_CHARS = "0123456789";
 
   public static HiveDecimal getRandHiveDecimal(Random r) {

Reply via email to