lincoln-lil commented on code in PR #23192:
URL: https://github.com/apache/flink/pull/23192#discussion_r1290858921


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/reuse/ReplaceScanWithCalcShuttle.java:
##########
@@ -57,4 +61,12 @@ public RelNode visit(RelNode rel) {
 
         return super.visit(rel);
     }
+
+    private void visitDppSource(RelNode scan) {
+        // If scan is BatchPhysicalDynamicFilteringTableSourceScan,the input 
should be recursive

Review Comment:
   nit:  If scan is `BatchPhysicalDynamicFilteringTableSourceScan`, traverse 
its input first



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/reuse/ReplaceScanWithCalcShuttle.java:
##########
@@ -44,11 +44,15 @@ public RelNode visit(RelNode rel) {
             // if there is already one Calc, we should merge it and new 
projection node.
             Calc calc = (Calc) rel;
             RelNode input = calc.getInput();
+            visitDppSource(input);

Review Comment:
   Looks like this visit won't actually have an impact?



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/reuse/ReplaceScanWithCalcShuttle.java:
##########
@@ -44,11 +44,15 @@ public RelNode visit(RelNode rel) {
             // if there is already one Calc, we should merge it and new 
projection node.
             Calc calc = (Calc) rel;
             RelNode input = calc.getInput();
+            visitDppSource(input);
+
             RelNode newNode = replaceMap.get(input);
             if (newNode instanceof Calc && isMergeable(calc, (Calc) newNode)) {
                 return merge(calc, (Calc) newNode);
             }
         } else if (rel instanceof CommonPhysicalTableSourceScan) {
+            visitDppSource(rel);

Review Comment:
   ditto



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