X-czh commented on code in PR #24618:
URL: https://github.com/apache/flink/pull/24618#discussion_r1644417751
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSink.java:
##########
@@ -209,15 +227,28 @@ protected Transformation<Object> createSinkTransformation(
sinkTransform = applyRowKindSetter(sinkTransform,
targetRowKind.get(), config);
}
- return (Transformation<Object>)
- applySinkProvider(
- sinkTransform,
- streamExecEnv,
- runtimeProvider,
- rowtimeFieldIndex,
- sinkParallelism,
- config,
- classLoader);
+ LineageDataset tableLineageDataset =
+ TableLineageUtils.createTableLineageDataset(
+ tableSinkSpec.getContextResolvedTable(),
lineageVertexOpt);
+
+ TableSinkLineageVertex sinkLineageVertex =
+ new TableSinkLineageVertexImpl(
+ Arrays.asList(tableLineageDataset),
+ TableLineageUtils.convert(inputChangelogMode));
+
+ Transformation transformation =
+ (Transformation<Object>)
+ applySinkProvider(
+ sinkTransform,
+ streamExecEnv,
+ runtimeProvider,
+ rowtimeFieldIndex,
+ sinkParallelism,
+ config,
+ classLoader);
+
+ ((TransformationWithLineage<Object>)
transformation).setLineageVertex(sinkLineageVertex);
Review Comment:
The transformation created by `applySinkProvider` may be arbitrary when
using the `TransformationSinkProvider`, and it may not extend
`TransformationWithLineage`
--
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]