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

Flatten together with order by on a list within a list is causing an error

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=3e33880

      Data Set :

      {
        "uid" : 1,
        "lst_lst" : [[1,2,3,4,5],[2,3,4,5,6]]
      }
      

      The below query fails

      select flatten(lst) from (select uid, flatten(d.lst_lst) lst from `temp4.json` d) s1 order by s1.lst[3];
      

      When we remove the top level flatten the below query works

      select uid from (select uid, flatten(d.lst_lst) lst from `temp4.json` d) s1 order by s1.lst[3];
      

      Attached the error log

      Attachments

        1. error.log
          5 kB
          Rahul Kumar Challapalli
        2. DRILL-2106.patch
          6 kB
          Mehant Baid

        Issue Links

          Activity

            People

              mehant Mehant Baid
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: