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/04/15 08:47:32 UTC

[GitHub] [calcite] Aaaaaaron commented on a change in pull request #2398: [CALCITE-2338] Make simplification API more conservative in "RelBuilder#filter" (Jiatao Tao)

Aaaaaaron commented on a change in pull request #2398:
URL: https://github.com/apache/calcite/pull/2398#discussion_r613876737



##########
File path: core/src/main/java/org/apache/calcite/tools/RelBuilder.java
##########
@@ -1334,22 +1334,27 @@ public RelBuilder filter(Iterable<CorrelationId> variablesSet,
    *
    * <p>The predicates are combined using AND,
    * and optimized in a similar way to the {@link #and} method.
-   * If the result is TRUE no filter is created. */
+   * If simplification is on and the result is TRUE, no filter is created. */
   public RelBuilder filter(Iterable<CorrelationId> variablesSet,
       Iterable<? extends RexNode> predicates) {
-    final RexNode simplifiedPredicates =
-        simplifier.simplifyFilterPredicates(predicates);
-    if (simplifiedPredicates == null) {
-      return empty();
-    }
+    RexNode conjunctionPredicates =

Review comment:
       Sure, Revised, the original intention was to streamline the code.




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