EricJoy2048 commented on code in PR #5427:
URL: https://github.com/apache/seatunnel/pull/5427#discussion_r1316806844


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:
##########
@@ -153,15 +151,10 @@ public List<String> getFileNamesByPath(HadoopConf 
hadoopConf, String path) throw
                 }
             }
         }
-
-        if (fileNames.isEmpty()) {
-            throw new FileConnectorException(
-                    FileConnectorErrorCode.FILE_LIST_EMPTY,
-                    "The target file list is empty,"
-                            + "SeaTunnel will not be able to sync empty table, 
"
-                            + "please check the configuration parameters such 
as: [file_filter_pattern]");
+        if (this.fileNames.isEmpty()) {
+            log.error("The current directory is empty " + path);
+            this.fileNames.add(path);

Review Comment:
   This place looks strange. If there are no files in the directory, is it more 
appropriate to return an empty file list? I think the reader of the file list 
should handle the empty file list.



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