julianhyde commented on a change in pull request #2357:
URL: https://github.com/apache/calcite/pull/2357#discussion_r583132710



##########
File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
##########
@@ -2850,11 +2839,16 @@ static RexNode fix(RexBuilder rexBuilder, RexNode term) 
{
 
     @SuppressWarnings({"rawtypes", "unchecked", "UnstableApiUsage"})
     <C extends Comparable<C>> Sarg<C> build(boolean negate) {
+      final RexUnknownAs unknownAs =
+          nullAsTrueCount > 0 ? TRUE
+              : nullAsUnknownCount > 0 ? UNKNOWN
+                  : nullAsFalseCount > 0 ? FALSE

Review comment:
       The priority difference is inherent in how three-valued logic works. 
Consider: TRUE OR UNKNOWN OR FALSE returns TRUE; UNKNOWN OR FALSE returns 
UNKNOWN.




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


Reply via email to