You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/06/25 19:32:38 UTC

[GitHub] [incubator-druid] clintropolis commented on a change in pull request #7958: expression virtual column selector fix for expressions which produce array types

clintropolis commented on a change in pull request #7958: expression virtual column selector fix for expressions which produce array types
URL: https://github.com/apache/incubator-druid/pull/7958#discussion_r297357745
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/segment/virtual/ExpressionSelectors.java
 ##########
 @@ -108,7 +108,11 @@ public Object getObject()
       {
         // No need for null check on getObject() since baseSelector impls will never return null.
         //noinspection ConstantConditions
-        return baseSelector.getObject().value();
+        ExprEval eval = baseSelector.getObject();
+        if (eval.isArray()) {
+          return Arrays.stream(eval.asArray()).map(String::valueOf).collect(Collectors.toList());
 
 Review comment:
   Oops, probably not `"null"`. There are a few other places are doing this as well, will fix and add some tests around this behavior.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org