JingsongLi commented on a change in pull request #17537: URL: https://github.com/apache/flink/pull/17537#discussion_r737114021
########## File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecTableSourceScan.java ########## @@ -97,9 +104,40 @@ public DynamicTableSourceSpec getTableSourceSpec() { return createInputFormatTransformation(env, inputFormat, outputTypeInfo, operatorName); } else if (provider instanceof SourceProvider) { Source<RowData, ?, ?> source = ((SourceProvider) provider).createSource(); - // TODO: Push down watermark strategy to source scan - return env.fromSource( - source, WatermarkStrategy.noWatermarks(), operatorName, outputTypeInfo) + // don't use rowTypes from CatalogTable + // because the rowType number may be reduced by ProjectionPushDown + RowType sourceRowType = outputTypeInfo.toRowType(); + SourceAbilityContext sourceAbilityContext = + new SourceAbilityContext(planner.getFlinkContext(), sourceRowType); + + WatermarkStrategy<RowData> watermarkStrategy = null; + + if (tableSource instanceof SupportsWatermarkPushDown) { Review comment: Can we always push down watermark to new source? Is there a semantic or implementation problem? -- 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