You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/08/19 02:34:28 UTC

[GitHub] [incubator-seatunnel] ashulin commented on a diff in pull request #2465: [Feature][Connector-V2] Local file json support

ashulin commented on code in PR #2465:
URL: https://github.com/apache/incubator-seatunnel/pull/2465#discussion_r949747555


##########
seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/LocalFileSource.java:
##########
@@ -56,10 +57,19 @@ public void prepare(Config pluginConfig) throws PrepareFailException {
         } catch (IOException e) {
             throw new PrepareFailException(getPluginName(), PluginType.SOURCE, "Check file path fail.");
         }
-        try {
-            rowType = readStrategy.getSeaTunnelRowTypeInfo(hadoopConf, filePaths.get(0));
-        } catch (FilePluginException e) {
-            throw new PrepareFailException(getPluginName(), PluginType.SOURCE, "Read file schema error.", e);
+        // support user-defined schema
+        if (pluginConfig.hasPath(LocalSourceConfig.SCHEMA)) {

Review Comment:
   Can `LocalSourceConfig.SCHEMA` be moved in `SeatunnelSchema`?



-- 
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-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org