Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/345#discussion_r51612792
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
---
@@ -118,13 +133,34 @@ public boolean apply(@Nullable FileStatus status) {
}
}));
- return create(nonDirectories, null, selectionRoot);
+ final FileSelection fileSel = create(nonDirectories, null,
selectionRoot);
--- End diff --
Agreed that it's existing create() call. It seems fine to keep it as is.
This new FileSelection is special, since it has excluded directories by
going through the list of file status recursively. In that sense, it's
hasDirectories = false, checkedForDirectories=true, and the list of files are
already available while going through the file status list. If a FileSelection
always has to call containsDirectory() or getFile() eventually, then it might
be better to store them when they are available. But I guess it's minor thing
to consider.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---