xiedeyantu commented on code in PR #4634:
URL: https://github.com/apache/calcite/pull/4634#discussion_r2529883159


##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -1930,8 +1930,13 @@ public RelBuilder filter(Iterable<CorrelationId> 
variablesSet,
     if (config.simplify()) {
       conjunctionPredicates = simplifier.simplifyFilterPredicates(predicates);
     } else {
+      List<RexNode> simplified = new ArrayList<>();
+      for (RexNode predicate : predicates) {
+        RexNode simple = RexSimplify.simplifyComparisonWithNull(predicate, 
getRexBuilder());

Review Comment:
   When `config.simplify()` returns false, `simplifyComparisonWithNull` is 
still called. Does `simplifyComparisonWithNull` count as a simplification 
process? If it does, the logic seems very odd. If it doesn't, it appears that 
`simplifyComparisonWithNull` might return `False` under certain conditions. 
Additionally, a List variable named "simplified" is created here, which doesn't 
seem easy to understand.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to