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

Throw proper error message when flatten is used within an 'order by' or 'group by'

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=c54bd6a

      Flatten can be used within a group by or order by statement when the output of flatten is a scalar. However drill currently does not support using flatten with the above operators when its output is not a scalar. In such cases we should show a more appropriate error, possibly indicating how to correct the query as well

      Currently this is what we get. This is obscure and does not pinpoint the issue

      select * from `data1.json` order by flatten(events);
      Query failed: RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.NullableIntVector cannot be cast to org.apache.drill.exec.vector.RepeatedVector [ c3d85d23-7ea0-43ea-bbd3-ac18a0aa2de3 on qa-node191.qa.lab:31010 ]
      [ c3d85d23-7ea0-43ea-bbd3-ac18a0aa2de3 on qa-node191.qa.lab:31010 ]
      
      
      Error: exception while executing query: Failure while executing query. (state=,code=0)
      

      Attachments

        1. DRILL-2181.1.patch
          7 kB
          Sean Hsuan-Yi Chu

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: