clintropolis commented on code in PR #16128:
URL: https://github.com/apache/druid/pull/16128#discussion_r1536314706


##########
processing/src/main/java/org/apache/druid/math/expr/Function.java:
##########
@@ -241,7 +241,11 @@ public ExpressionType 
getOutputType(Expr.InputBindingInspector inspector, List<E
     @Override
     public boolean canVectorize(Expr.InputBindingInspector inspector, 
List<Expr> args)
     {
-      return inspector.areNumeric(args) && inspector.canVectorize(args);
+      final ExpressionType outputType = args.get(0).getOutputType(inspector);
+      if (outputType == null && NullHandling.replaceWithDefault()) {
+        return false;

Review Comment:
   worth leaving a comment about why this is the case. something about how 
non-vectorized treats null values as `STRING` types, which makes it kind of 
complicated to achieve consistent behavior for vector and non-vector engines



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

To unsubscribe, e-mail: [email protected]

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