jsinghkukreja commented on code in PR #27727:
URL: https://github.com/apache/flink/pull/27727#discussion_r4644530690


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecTableSourceScan.java:
##########
@@ -218,6 +219,18 @@ protected Transformation<RowData> translateToPlanInternal(
         if (sourceTransform instanceof TransformationWithLineage) {
             ((TransformationWithLineage<RowData>) sourceTransform)
                     .setLineageVertex(sourceLineageVertex);
+        } else {
+            // When DataStreamScanProvider returns a multi-operator pipeline, 
the outermost
+            // transformation may not implement TransformationWithLineage. 
Search the transitive
+            // predecessors to find a SourceTransformation or 
LegacySourceTransformation that does.
+            for (Transformation<?> predecessor : 
sourceTransform.getTransitivePredecessors()) {
+                if (predecessor != sourceTransform
+                        && predecessor instanceof TransformationWithLineage) {
+                    ((TransformationWithLineage<?>) predecessor)
+                            .setLineageVertex(sourceLineageVertex);
+                    break;

Review Comment:
   Fixed, logic only runs for one source



-- 
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]

Reply via email to