clintropolis commented on a change in pull request #12244:
URL: https://github.com/apache/druid/pull/12244#discussion_r802499489



##########
File path: 
processing/src/main/java/org/apache/druid/segment/virtual/ExpressionSelectors.java
##########
@@ -381,8 +383,12 @@ public ExpressionType getType(String name)
         return selector.lookupName(row.get(0));
       } else {
         // column selector factories hate you and use [] and [null] 
interchangeably for nullish data
-        if (row.size() == 0) {
-          return new Object[]{null};
+        if (row.size() == 0 || (row.size() == 1 && selector.getObject() == 
null)) {
+          if (homogenize) {

Review comment:
       eh, it is a hot path, though probably not the worst thing happening in 
non-vectorized expressions, so an extra branch probably doesn't do _that_ much 
heh
   
   that said, I think these input binding suppliers are probably worth thinking 
about either optimizing with additional specialized implementations, or at 
least using as an example of what not to do when we add multi-value string and 
array support for vectorized expressions.




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