You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/02/25 02:06:50 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #2357: [CALCITE-4446] Implement three-valued logic for SEARCH operator

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



##########
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:
       Very confusing code, does these three flags have priority difference ?




----------------------------------------------------------------
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:
users@infra.apache.org