davidradl commented on code in PR #27294:
URL: https://github.com/apache/flink/pull/27294#discussion_r2580421049
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecTableSourceScan.java:
##########
@@ -179,22 +177,26 @@ protected Transformation<RowData> translateToPlanInternal(
env.fromSource(
source,
WatermarkStrategy.noWatermarks(),
- meta.getName(),
+ metadata.getName(),
outputTypeInfo)
.getTransformation();
- meta.fill(sourceTransform);
+ metadata.fill(sourceTransform);
} else if (provider instanceof DataStreamScanProvider) {
sourceTransform =
((DataStreamScanProvider) provider)
- .produceDataStream(createProviderContext(config),
env)
+ .produceDataStream(createProviderContext(metadata,
config), env)
.getTransformation();
- meta.fill(sourceTransform);
+ if (legacyUidsEnabled) {
+ metadata.fill(sourceTransform);
+ }
sourceTransform.setOutputType(outputTypeInfo);
} else if (provider instanceof TransformationScanProvider) {
sourceTransform =
((TransformationScanProvider) provider)
-
.createTransformation(createProviderContext(config));
- meta.fill(sourceTransform);
+
.createTransformation(createProviderContext(metadata, config));
+ if (legacyUidsEnabled) {
Review Comment:
nit: this is purely an observation - no need to change. I see
```
if (legacyUidsEnabled) {
metadata.fill(sourceTransform);
}
sourceTransform.setOutputType(outputTypeInfo);
```
duplicated - I wonder if we could refactor this logic out so there i not a
duplication.
--
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]