Hisoka-X commented on code in PR #9121: URL: https://github.com/apache/seatunnel/pull/9121#discussion_r2034861384
########## seatunnel-connectors-v2/connector-file/connector-file-cos/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/cos/source/CosFileSourceFactory.java: ########## @@ -97,4 +102,14 @@ public OptionRule optionRule() { public Class<? extends SeaTunnelSource> getSourceClass() { return CosFileSource.class; } + + @Override + public <T, SplitT extends SourceSplit, StateT extends Serializable> + TableSource<T, SplitT, StateT> createSource(TableSourceFactoryContext context) { + return () -> + (SeaTunnelSource<T, SplitT, StateT>) + new CosFileSource( + context.getOptions(), + CatalogTableUtil.buildWithConfig(context.getOptions())); Review Comment: -1. We should build catalogtable with file sometimes. Please refer https://github.com/apache/seatunnel/pull/9121/files#diff-1f7ebddd2239c9ee909ee66c8f67c119b92f05324519ea5ce40d5aeab98da984L124 ########## seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSink.java: ########## @@ -75,12 +75,6 @@ public void setJobContext(JobContext jobContext) { preCheckConfig(); } - @Override - public void setTypeInfo(SeaTunnelRowType seaTunnelRowType) { - this.seaTunnelRowType = seaTunnelRowType; - this.fileSinkConfig = new FileSinkConfig(pluginConfig, seaTunnelRowType); - } Review Comment: Why delete this? We still have some sink should invoke it like `OssFileSink`, `HdfsFileSink` etc. ########## seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSource.java: ########## @@ -72,4 +67,9 @@ public SourceSplitEnumerator<FileSourceSplit, FileSourceState> restoreEnumerator throws Exception { return new FileSourceSplitEnumerator(enumeratorContext, filePaths, checkpointState); } + + @Override + public List<CatalogTable> getProducedCatalogTables() { + return SeaTunnelSource.super.getProducedCatalogTables(); + } Review Comment: We should return catalog table in here to replace `getProducedType` method. -- 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: commits-unsubscr...@seatunnel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org