kgyrtkirk commented on a change in pull request #1031:
URL: https://github.com/apache/hive/pull/1031#discussion_r434110907
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/DataSketchesFunctions.java
##########
@@ -235,12 +232,21 @@ public String getFunctionName() {
return Optional.empty();
} else {
JavaTypeFactoryImpl typeFactory = new JavaTypeFactoryImpl(new
HiveTypeSystemImpl());
+ Type type = returnType;
+ if (type instanceof ParameterizedType) {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ if (parameterizedType.getRawType() == List.class) {
+ final RelDataType componentRelType =
typeFactory.createType(parameterizedType.getActualTypeArguments()[0]);
+ return Optional
+
.of(typeFactory.createArrayType(typeFactory.createTypeWithNullability(componentRelType,
true), -1));
+ }
Review comment:
idea was to leave "typeFactory" to handle it - although it will return
something - but it will not work properly
returned `Optional.empty()`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]