[
https://issues.apache.org/jira/browse/DRILL-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15015115#comment-15015115
]
ASF GitHub Bot commented on DRILL-2618:
---------------------------------------
Github user adeneche commented on a diff in the pull request:
https://github.com/apache/drill/pull/270#discussion_r45432185
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
---
@@ -102,77 +92,33 @@ public boolean containsDirectories(DrillFileSystem fs)
throws IOException {
}
public FileSelection minusDirectories(DrillFileSystem fs) throws
IOException {
- Stopwatch timer = new Stopwatch();
- timer.start();
- init(fs);
- List<FileStatus> newList = Lists.newArrayList();
- for (FileStatus p : statuses) {
- if (p.isDirectory()) {
- List<FileStatus> statuses = fs.list(true, p.getPath());
- for (FileStatus s : statuses) {
- newList.add(s);
- }
- } else {
- newList.add(p);
- }
- }
- logger.info("FileSelection.minusDirectories() took {} ms, numFiles:
{}",
--- End diff --
@amansinha100 do we still need this log information ?
> BasicFormatMatcher calls getFirstPath(...) without checking # of paths is not
> zero
> ----------------------------------------------------------------------------------
>
> Key: DRILL-2618
> URL: https://issues.apache.org/jira/browse/DRILL-2618
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Other
> Reporter: Daniel Barclay (Drill)
> Assignee: Hanifi Gunes
> Fix For: 1.4.0
>
>
> {{BasicFormatMatcher.isReadable(...)}} calls {{getFirstPath(...)}} without
> checking that there is at least one path. This can cause an
> IndexOutOfBoundsException.
> To reproduce, create an empty directory {{/tmp/CaseInsensitiveColumnNames}}
> and run
> {{exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)