clintropolis 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_r343958543
########## 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: i think if we just preserved the base type and covert to a list of that instead of converting it all to a list of strings, that it would still function more or less correctly because the values would be translated to strings further down the chain when reading into the row. Alternatively, an output `ValueType` could be specified to determine how to translate the evaluated expression? But I think just converting to a list as is might be better if it works ok. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org