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

Order by on a repeated index inside a sub query results in an NPE

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=3e33880

      Data Set :

      {
        "id" : 1,
        "list" : [1,2]
      }
      

      The below query succeeds

      0: jdbc:drill:schema=dfs.drillTestDir> select d.id id from `data.json` d order by d.list[0];
      +------------+
      |     id     |
      +------------+
      | 1          |
      +------------+
      1 row selected (0.12 seconds)
      
      

      However when we use the same query inside a sub-query we get an NPE

      0: jdbc:drill:schema=dfs.drillTestDir> select s.id from (select d.id id from `data.json` d order by d.list[0]) s;
      Query failed: NullPointerException: 
      
      Error: exception while executing query: Failure while executing query. (state=,code=0)
      

      Explain plan also results in the same NPE for the above query

      Attachments

        Activity

          People

            seanhychu Sean Hsuan-Yi Chu
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: