snuyanzin commented on code in PR #28556:
URL: https://github.com/apache/flink/pull/28556#discussion_r3494216189


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/PushFilterInCalcIntoTableSourceScanRule.java:
##########
@@ -94,33 +95,29 @@ private void pushFilterIntoScan(
         RexNode[] convertiblePredicates = extractedPredicates._1;
         RexNode[] unconvertedPredicates = extractedPredicates._2;
         if (convertiblePredicates.length == 0) {
-            // no condition can be translated to expression
             return;
         }
 
-        Tuple2<SupportsFilterPushDown.Result, TableSourceTable> 
pushdownResultWithScan =
-                resolveFiltersAndCreateTableSourceTable(
-                        convertiblePredicates,
-                        relOptTable.unwrap(TableSourceTable.class),
-                        scan,
-                        relBuilder);
+        FilterClassificationResult result =
+                classifyAndPushFilters(convertiblePredicates, 
tableSourceTable, scan, relBuilder);
+        if (result == null) {
+            return;
+        }
 
-        SupportsFilterPushDown.Result result = pushdownResultWithScan._1;
-        TableSourceTable tableSourceTable = pushdownResultWithScan._2;
+        List<RexNode> allRemainingRexNodes = new 
ArrayList<>(result.remainingPredicates);
+        allRemainingRexNodes.addAll(Arrays.asList(unconvertedPredicates));
 
         FlinkLogicalTableSourceScan newScan =
                 FlinkLogicalTableSourceScan.create(
-                        scan.getCluster(), scan.getHints(), tableSourceTable);
+                        scan.getCluster(), scan.getHints(), 
result.updatedTable);
 
         // build new calc program
         RexProgramBuilder programBuilder =
                 RexProgramBuilder.forProgram(originProgram, 
call.builder().getRexBuilder(), true);
         programBuilder.clearCondition();
 
-        if (!result.getRemainingFilters().isEmpty() || 
unconvertedPredicates.length != 0) {
-            RexNode remainingCondition =
-                    createRemainingCondition(

Review Comment:
   is this method still used?



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