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/26 20:38:34 UTC

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

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

 ##########
 File path: processing/src/main/java/org/apache/druid/segment/virtual/ExpressionSelectors.java
 ##########
 @@ -498,7 +503,7 @@ public void inspectRuntimeShape(RuntimeShapeInspector inspector)
    */
   private static Object coerceListDimToStringArray(List val)
   {
-    Object[] arrayVal = val.stream().map(Object::toString).toArray(String[]::new);
+    Object[] arrayVal = val.stream().map(x -> x != null ? x.toString() : x).toArray(String[]::new);
 
 Review comment:
   nit: `x != null ? x.toString() : null` looks more clear to me.

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