jihoonson commented on a change in pull request #11270:
URL: https://github.com/apache/druid/pull/11270#discussion_r635548194



##########
File path: core/src/main/java/org/apache/druid/math/expr/ExprEval.java
##########
@@ -378,7 +378,7 @@ public static Object coerceListToArray(@Nullable List<?> 
val, boolean homogenize
       return new String[]{null};
     } else {
       if (val != null) {
-        return val.toArray();
+        return new String[0];

Review comment:
       nit: we can cache the instance of an empty array. A similar technique 
can be applied for the single element array of null above. I think we can do 
this as a follow-up.




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



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

Reply via email to