wfrong commented on code in PR #3959:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3959#discussion_r1105258398


##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/IcebergSource.java:
##########
@@ -105,9 +105,15 @@ private SeaTunnelRowType loadSeaTunnelRowType(Schema 
tableSchema, Config pluginC
                         columnDataTypes.toArray(new SeaTunnelDataType[0]));
 
         CheckResult checkResult =
-                CheckConfigUtil.checkAllExists(pluginConfig, 
CommonConfig.KEY_FIELDS.key());
+                CheckConfigUtil.checkAtLeastOneExists(
+                        pluginConfig, CommonConfig.KEY_FIELDS.key(), 
SeaTunnelSchema.SCHEMA.key());
+
         if (checkResult.isSuccess()) {
-            SeaTunnelSchema configSchema = 
SeaTunnelSchema.buildWithConfig(pluginConfig);
+            Config config =
+                    pluginConfig.hasPath(SeaTunnelSchema.SCHEMA.key())
+                            ? 
pluginConfig.getConfig(SeaTunnelSchema.SCHEMA.key())
+                            : pluginConfig;

Review Comment:
   I mean if user use  `schema`  in config file , we use 
`pluginConfig.getConfig(SeaTunnelSchema.SCHEMA.key())`.  And to support some 
old tasks which only use `fields` we just use orginal config.



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