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 2022/02/09 09:47:04 UTC

[GitHub] [druid] abhishekagarwal87 commented on a change in pull request #12244: fix bugs with multi-value string array expression handling

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



##########
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:
       maybe I am overthinking but does it make sense to take out this branch and return a different supplier itself? Might be unnecessary if this method is not very hot. 




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org