Skip to content

Commit f3a8123

Browse files
committed
HIVE-29568: Vectorized PTF is throwing RuntimeException
1 parent 423fc83 commit f3a8123

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,10 @@ private static TypeInfo columnVectorTypeToTypeInfo(Type type) {
578578
return TypeInfoUtils.getTypeInfoFromTypeString(serdeConstants.TIMESTAMP_TYPE_NAME);
579579
case LONG:
580580
return TypeInfoUtils.getTypeInfoFromTypeString(serdeConstants.INT_TYPE_NAME);
581+
case INTERVAL_DAY_TIME:
582+
return TypeInfoUtils.getTypeInfoFromTypeString(serdeConstants.INTERVAL_DAY_TIME_TYPE_NAME);
583+
case VOID:
584+
return TypeInfoUtils.getTypeInfoFromTypeString(serdeConstants.VOID_TYPE_NAME);
581585
default:
582586
throw new RuntimeException("Cannot convert column vector type: '" + type + "' to TypeInfo");
583587
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
create table vectptf(age int, name string) stored as orc;
2+
select cast(row_number() over(order by NULL) as STRING) from vectptf;
3+
select cast(rank() over(order by INTERVAL '1' DAY) as STRING) from vectptf;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
PREHOOK: query: create table vectptf(age int, name string) stored as orc
2+
PREHOOK: type: CREATETABLE
3+
PREHOOK: Output: database:default
4+
PREHOOK: Output: default@vectptf
5+
POSTHOOK: query: create table vectptf(age int, name string) stored as orc
6+
POSTHOOK: type: CREATETABLE
7+
POSTHOOK: Output: database:default
8+
POSTHOOK: Output: default@vectptf
9+
PREHOOK: query: select cast(row_number() over(order by NULL) as STRING) from vectptf
10+
PREHOOK: type: QUERY
11+
PREHOOK: Input: default@vectptf
12+
#### A masked pattern was here ####
13+
POSTHOOK: query: select cast(row_number() over(order by NULL) as STRING) from vectptf
14+
POSTHOOK: type: QUERY
15+
POSTHOOK: Input: default@vectptf
16+
#### A masked pattern was here ####
17+
PREHOOK: query: select cast(rank() over(order by INTERVAL '1' DAY) as STRING) from vectptf
18+
PREHOOK: type: QUERY
19+
PREHOOK: Input: default@vectptf
20+
#### A masked pattern was here ####
21+
POSTHOOK: query: select cast(rank() over(order by INTERVAL '1' DAY) as STRING) from vectptf
22+
POSTHOOK: type: QUERY
23+
POSTHOOK: Input: default@vectptf
24+
#### A masked pattern was here ####

0 commit comments

Comments
 (0)