lsyldliu commented on code in PR #23216:
URL: https://github.com/apache/flink/pull/23216#discussion_r1299723742


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/optimize/program/FlinkRuntimeFilterProgramTest.java:
##########
@@ -202,6 +202,64 @@ public void testBuildSideIsJoinWithoutExchange() throws 
Exception {
         util.verifyPlan(query);
     }
 
+    @Test
+    public void testBuildSideIsJoinWithTwoAggInputs() throws Exception {

Review Comment:
   ping again.



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/program/FlinkRuntimeFilterProgram.java:
##########
@@ -492,11 +503,18 @@ private static RelNode 
tryPushDownProbeAndInjectRuntimeFilter(
             // we may find more cases later
         }
 
-        return createNewProbeWithRuntimeFilter(
-                ignoreExchange(buildSideInfo.buildSide),
-                ignoreExchange(rel),
-                buildSideInfo.buildIndices,
-                probeIndices);
+        if (filterHasBenefit) {
+            return createNewProbeWithRuntimeFilter(
+                    ignoreExchange(buildSideInfo.buildSide),
+                    ignoreExchange(rel),
+                    buildSideInfo.buildIndices,
+                    probeIndices);
+        } else {
+            // If the probe side is a direct table source, or only simple 
Calc, no other operations,

Review Comment:
   Do you add some tests to cover this change?



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/program/FlinkRuntimeFilterProgram.java:
##########
@@ -492,11 +503,18 @@ private static RelNode 
tryPushDownProbeAndInjectRuntimeFilter(
             // we may find more cases later
         }
 
-        return createNewProbeWithRuntimeFilter(
-                ignoreExchange(buildSideInfo.buildSide),
-                ignoreExchange(rel),
-                buildSideInfo.buildIndices,
-                probeIndices);

Review Comment:
   Please also add java docs for this variable.



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/optimize/program/FlinkRuntimeFilterProgramTest.java:
##########
@@ -202,6 +202,64 @@ public void testBuildSideIsJoinWithoutExchange() throws 
Exception {
         util.verifyPlan(query);
     }
 
+    @Test
+    public void testBuildSideIsJoinWithTwoAggInputs() throws Exception {

Review Comment:
   ping again.



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