godfreyhe commented on code in PR #20415: URL: https://github.com/apache/flink/pull/20415#discussion_r940143374
########## 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: It is better to emphasize here that this situation will not generate wrong result because it's handled when BatchTableSourceScan is translated to Transformation. The only effect is physical plan and exec node plan have dpp node, but it does not work in runtime. -- 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