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/12/30 08:49:18 UTC

[GitHub] [calcite] DonnyZone commented on a change in pull request #2667: [CALCITE-3627] New Row Null Policy

DonnyZone commented on a change in pull request #2667:
URL: https://github.com/apache/calcite/pull/2667#discussion_r776625148



##########
File path: core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -3107,7 +3107,13 @@ Expression getCondition(final List<Expression> argIsNullList) {
       if (nullPolicy == NullPolicy.ARG0) {
         return argIsNullList.get(0);
       }

Review comment:
       It can be simplified as
   ```
   if (nullPolicy == NullPolicy.ALL) {
       // Condition for NullPolicy.ALL: v0 == null && v1 == null
       return Expressions.foldAnd(argIsNullList);
   }
   // Condition for regular cases: v0 == null || v1 == null
   return Expressions.foldOr(argIsNullList);
   ```




-- 
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@calcite.apache.org

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