Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4484

NPE when querying empty directory

    XMLWordPrintableJSON

Details

    Description

      0: jdbc:drill:drillbit=localhost> select count(*) from dfs.`/drill/xyz/201604*`;
      Error: VALIDATION ERROR: null
      SQL Query null
      
      
      0: jdbc:drill:drillbit=localhost> select count(*) from dfs.`/drill/xyz/20160401`;
      Error: VALIDATION ERROR: null
      SQL Query null
      [Error Id: 87366a2d-fc90-42f3-a076-aed5efdd27cb on atsqa4-133.qa.lab:31010] (state=,code=0)
      
      
      0: jdbc:drill:drillbit=localhost> select count(*) from dfs.`/drill/xyz/20160401/`;
      Error: VALIDATION ERROR: null
      SQL Query null
      [Error Id: ac122243-488e-4fb8-b89f-dc01c7e5c63a on atsqa4-133.qa.lab:31010] (state=,code=0)
      
      [Mon Mar 07 15:00:19 root@/drill/xyz ] # ls -lR
      .:
      total 5
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      drwxr-xr-x 2 root root   2 Feb 26 16:31 20160101
      drwxr-xr-x 2 root root   2 Feb 26 16:31 20160102
      drwxr-xr-x 2 root root   2 Feb 26 16:31 20160103
      drwxr-xr-x 2 root root   2 Feb 26 16:31 20160104
      drwxr-xr-x 2 root root   2 Feb 26 16:31 20160105
      drwxr-xr-x 2 root root   1 Feb 26 16:31 20160201
      drwxr-xr-x 2 root root   3 Feb 26 16:31 20160202
      drwxr-xr-x 2 root root   4 Feb 26 16:31 20160301
      drwxr-xr-x 2 root root   0 Feb 26 16:31 20160401
      
      ./20160101:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      
      ./20160102:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      
      ./20160103:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      
      ./20160104:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      
      ./20160105:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      
      ./20160201:
      total 0
      
      ./20160202:
      total 1
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      -rw-r--r-- 1 root root 395 Feb 26 16:31 1_0_0.parquet
      
      ./20160301:
      total 2
      -rw-r--r-- 1 root root 395 Feb 26 16:31 0_0_0.parquet
      -rw-r--r-- 1 root root 395 Feb 26 16:31 1_0_0.parquet
      -rw-r--r-- 1 root root 395 Feb 26 16:31 2_0_0.parquet
      
      ./20160401:
      total 0
      

      Hakim's analysis:

      More details about the NPE, actually it's an IllegalArgumentException: what happens is that during planing no file meets the wildcard selection and the query should fail during planing with a "Table not found" message, instead execution starts and the scanner fail because no file was assigned to them
      

      Drill version:

      #Generated by Git-Commit-Id-Plugin
      #Mon Mar 07 19:38:24 UTC 2016
      git.commit.id.abbrev=a2fec78
      git.commit.user.email=adeneche@gmail.com
      git.commit.message.full=DRILL-4457\: Difference in results returned by window function over BIGINT data\n\nthis closes \#410\n
      git.commit.id=a2fec78695df979e240231cb9d32c7f18274a333
      git.commit.message.short=DRILL-4457\: Difference in results returned by window function over BIGINT data
      git.commit.user.name=adeneche
      git.build.user.name=Unknown
      git.commit.id.describe=0.9.0-625-ga2fec78-dirty
      git.build.user.email=Unknown
      git.branch=master
      git.commit.time=07.03.2016 @ 17\:38\:42 UTC
      git.build.time=07.03.2016 @ 19\:38\:24 UTC
      git.remote.origin.url=https\://github.com/apache/drill
      

      Attachments

        Issue Links

          Activity

            People

              adeneche Abdel Hakim Deneche
              vicky Victoria Markman
              Krystal Krystal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: