godfreyhe commented on code in PR #20415:
URL: https://github.com/apache/flink/pull/20415#discussion_r941121688


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/physical/batch/DynamicPartitionPruningRule.java:
##########
@@ -189,6 +195,28 @@ protected boolean doMatches(
         return !acceptedFieldIndices.isEmpty();
     }
 
+    /** Returns true if the source is FLIP-27 source, else false. */
+    private static boolean isNewSource(ScanTableSource scanTableSource) {
+        ScanTableSource.ScanRuntimeProvider provider =
+                
scanTableSource.getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE);
+        if (provider instanceof SourceProvider) {
+            return true;
+        } else if (provider instanceof TransformationScanProvider) {
+            Transformation<?> transformation =
+                    ((TransformationScanProvider) provider)
+                            .createTransformation(name -> Optional.empty());
+            return transformation instanceof SourceTransformation;
+        } else if (provider instanceof DataStreamScanProvider) {
+            // Suppose DataStreamScanProvider of sources that support dynamic 
filtering will use new

Review Comment:
   I will update the comments in my local when merging



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to