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/11/06 22:12:20 UTC

[GitHub] [incubator-druid] gianm commented on a change in pull request #8744: support for array expressions in TransformSpec with ExpressionTransform

gianm commented on a change in pull request #8744: support for array expressions in TransformSpec with ExpressionTransform
URL: https://github.com/apache/incubator-druid/pull/8744#discussion_r343355536
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/segment/virtual/ExpressionSelectors.java
 ##########
 @@ -518,6 +513,20 @@ private static Object coerceListDimToStringArray(List val)
     return new String[]{null};
   }
 
+  /**
+   * Coerces {@link ExprEval} value back to selector friendly {@link List} if the evaluated expression result is an
+   * array type
+   */
+  public static Object coerceEvalToSelectorObject(ExprEval eval)
+  {
+    if (eval.isArray()) {
 
 Review comment:
   Is it fair to cast all arrays to lists of strings?
   
   Do we still get the behavior we want if we cast them to lists of whatever they really are? (I'm thinking this could make us more future-proof to situations where we support numeric arrays at the storage layer.)

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