You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/06/02 19:02:39 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #1031: HIVE-23462 rewrite cume_dist

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org