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 2020/11/16 11:20:52 UTC

[GitHub] [calcite] xy2953396112 commented on a change in pull request #1983: [CALCITE-4005] Support Calc and SetOp operator in RelMdAllPredicates

xy2953396112 commented on a change in pull request #1983:
URL: https://github.com/apache/calcite/pull/1983#discussion_r524145966



##########
File path: core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java
##########
@@ -120,12 +124,35 @@ public RelOptPredicateList getAllPredicates(Project project, RelMetadataQuery mq
   }
 
   /**
-   * Add the Filter condition to the list obtained from the input.
+   * Extract predicates for a Filter.
    */
   public RelOptPredicateList getAllPredicates(Filter filter, RelMetadataQuery mq) {
-    final RelNode input = filter.getInput();
-    final RexBuilder rexBuilder = filter.getCluster().getRexBuilder();
-    final RexNode pred = filter.getCondition();
+    return getAllFilterPredicates(filter, mq, filter.getCondition());
+  }
+
+  /**
+   * Extract predicates for a Calc.
+   */
+  public RelOptPredicateList getAllPredicates(Calc calc, RelMetadataQuery mq) {
+    final RexProgram rexProgram = calc.getProgram();
+    List<RexNode> condition = new ArrayList<>();

Review comment:
       ok




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