Github user hnfgns commented on a diff in the pull request: https://github.com/apache/drill/pull/307#discussion_r48180127 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java --- @@ -213,14 +214,15 @@ public static FileSelection create(final List<FileStatus> statuses, final List<S if (statuses == null || statuses.isEmpty()) { selectionRoot = commonPathForFiles(files); } else { - if (statuses.size() == 1 && !Strings.isNullOrEmpty(root)) { - final Path rootPath = new Path(root); - final URI uri = statuses.get(0).getPath().toUri(); - final Path path = new Path(uri.getScheme(), uri.getAuthority(), rootPath.toUri().getPath()); - selectionRoot = path.toString(); - } else { - selectionRoot = commonPath(statuses); + assert !Strings.isNullOrEmpty(root); --- End diff -- What is the expected behavior when root is null and assertions are disabled? This throws an NPE, I think we should not.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---