julianhyde commented on a change in pull request #973: [CALCITE-2742] Update 
USER and SYSTEM_USER to use DataContext for value
URL: https://github.com/apache/calcite/pull/973#discussion_r287167448
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java
 ##########
 @@ -485,50 +557,43 @@ protected ReduceExpressionsRule(Class<? extends RelNode> 
clazz,
    * @param predicates Constraints known to hold on input expressions
    * @return whether reduction found something to change, and succeeded
    */
+  @Deprecated // to be removed before 2.0
   protected static boolean reduceExpressions(RelNode rel, List<RexNode> 
expList,
       RelOptPredicateList predicates) {
-    return reduceExpressions(rel, expList, predicates, false, true);
+    return reduceExpressions(rel, expList, predicates,
+        DEFAULT_OPTIONS.matchNullability(true).unknownAsFalse(false));
   }
 
   @Deprecated // to be removed before 2.0
   protected static boolean reduceExpressions(RelNode rel, List<RexNode> 
expList,
       RelOptPredicateList predicates, boolean unknownAsFalse) {
-    return reduceExpressions(rel, expList, predicates, unknownAsFalse, true);
+    return reduceExpressions(rel, expList, predicates,
+        DEFAULT_OPTIONS.matchNullability(true).unknownAsFalse(unknownAsFalse));
+  }
+
+  @Deprecated
+  protected static boolean reduceExpressions(RelNode rel, List<RexNode> 
expList,
+      RelOptPredicateList predicates, boolean unknownAsFalse,
+      boolean matchNullability) {
+    return reduceExpressions(rel, expList, predicates,
+        DEFAULT_OPTIONS.matchNullability(matchNullability)
+          .treatDynamicCallsAsNonConstant(true)
+          .matchNullability(matchNullability)
+        );
 
 Review comment:
   House style is for ')' to be on the same line, not preceded by space. Please 
fix. I think I saw some other occurrences.

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


With regards,
Apache Git Services

Reply via email to