You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "imply-cheddar (via GitHub)" <gi...@apache.org> on 2023/03/01 01:59:21 UTC

[GitHub] [druid] imply-cheddar commented on a diff in pull request #13809: move numeric null value coercion out of expression processing engine

imply-cheddar commented on code in PR #13809:
URL: https://github.com/apache/druid/pull/13809#discussion_r1121024997


##########
processing/src/main/java/org/apache/druid/math/expr/vector/VectorProcessors.java:
##########
@@ -778,6 +842,15 @@ public ExprEvalVector<long[]> asEval()
     );
   }
 
+  /**
+   * Creates an {@link ExprVectorProcessor} for the logical 'and' operator, which produces a long typed vector output
+   * with values set by the following rules:
+   *    true/true -> true (1)
+   *    true/null, null/true, null/null -> null
+   *    false/null, null/false -> false (0)

Review Comment:
   Ahhh, I can see the logic there...  it's providing the best answer based on what it can know from the boolean operator.  It would be a lot easier to reason about if it consistently nulled things out, but if this is how SQL is expected to work, so be it.



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