Hisoka-X commented on code in PR #6009:
URL: https://github.com/apache/seatunnel/pull/6009#discussion_r1432193199
##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:
##########
@@ -89,34 +90,36 @@ boolean checkFileType(String path) {
@Override
public List<String> getFileNamesByPath(String path) throws IOException {
+ ArrayList<String> fileNames = new ArrayList<>();
+ Path basePath = new Path(path);
+ if (readPartitions.isEmpty()) {
+ fileNames.addAll(getFileNamesByPath(basePath));
+ } else {
+ for (String readPartition : readPartitions) {
+ fileNames.addAll(getFileNamesByPath(new Path(basePath,
readPartition)));
+ }
Review Comment:
This way will missed some partition.
eg:
```
readPartition = ["age=11"]
filepath = basePath/location=newyork/age=11
```
Seem like our test case not enough. Could you add some test case to cover
this case?
--
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]