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

 ##########
 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:
   Do we allow null numbers in lists? If so, this'll turn them into `"null"` 
rather than keeping them as `null`. What's the right 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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to