[ 
https://issues.apache.org/jira/browse/DRILL-4192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066925#comment-15066925
 ] 

ASF GitHub Bot commented on DRILL-4192:
---------------------------------------

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.


> Dir0 and Dir1 from drill-1.4 are messed up
> ------------------------------------------
>
>                 Key: DRILL-4192
>                 URL: https://issues.apache.org/jira/browse/DRILL-4192
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.4.0
>            Reporter: Krystal
>            Assignee: Aman Sinha
>            Priority: Blocker
>
> I have the following directories:
> /drill/testdata/temp1/abc/dt=2014-12-30/lineitem.parquet
> /drill/testdata/temp1/abc/dt=2014-12-31/lineitem.parquet
> The following queries returned incorrect data.
> select dir0,dir1 from dfs.`/drill/testdata/temp1` limit 2;
> +----------------+-------+
> |      dir0      | dir1  |
> +----------------+-------+
> | dt=2014-12-30  | null  |
> | dt=2014-12-30  | null  |
> +----------------+-------+
> select dir0 from dfs.`/drill/testdata/temp1` limit 2;
> +----------------+
> |      dir0      |
> +----------------+
> | dt=2014-12-31  |
> | dt=2014-12-31  |
> +----------------+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to