LiebingYu commented on code in PR #2972:
URL: https://github.com/apache/fluss/pull/2972#discussion_r3027715983


##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/source/FlinkTableSource.java:
##########
@@ -373,7 +383,25 @@ public boolean isBounded() {
                 }
             };
         } else {
-            return SourceProvider.of(source);
+            return new DataStreamScanProvider() {
+                @Override
+                public DataStream<RowData> produceDataStream(
+                        ProviderContext providerContext, 
StreamExecutionEnvironment execEnv) {
+                    WatermarkStrategy<RowData> strategy =
+                            watermarkStrategy != null
+                                    ? watermarkStrategy
+                                    : WatermarkStrategy.noWatermarks();
+                    DataStreamSource<RowData> sourceStream =
+                            execEnv.fromSource(source, strategy, 
"FlussSource-" + tablePath);
+                    
providerContext.generateUid(FLUSS_TRANSFORMATION).ifPresent(sourceStream::uid);

Review Comment:
   I think this uid is important for Flink state management. Flink Kafka 
connector also set this uid: 
https://github.com/apache/flink-connector-kafka/blob/bd2fd2b2c8a48b7d2a05387fc4fda61e878c902f/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java#L265



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