zhuangchong commented on code in PR #2345:
URL: https://github.com/apache/incubator-paimon/pull/2345#discussion_r1410045607


##########
paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/SyncTableActionBase.java:
##########
@@ -214,17 +211,6 @@ public void build() throws Exception {
         sinkBuilder.build();
     }
 
-    protected DataStreamSource<String> buildDataStreamSource(Object source) {
-        if (source instanceof Source) {
-            return env.fromSource(
-                    (Source<String, ?, ?>) source, 
WatermarkStrategy.noWatermarks(), sourceName());
-        }
-        if (source instanceof SourceFunction) {
-            return env.addSource((SourceFunction<String>) source, 
sourceName());
-        }
-        throw new UnsupportedOperationException("Unrecognized source type");
-    }
-

Review Comment:
   I think this part of the code is best written in each implementation class. 
When a table action is added later, env.addSource() or env.fromSource() or 
others can be used directly and explicitly.
   
   
https://github.com/apache/incubator-paimon/blob/1571f8f33ff74bcc9a8a0b6301da349c1780dae2/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncTableAction.java#L119-L125



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