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

Query that returns 0 rows gives alarming error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • None
    • None

    Description

      When I run a query with 'limit 0' I got an error that sounded like an internal protocol error.

      0: jdbc:drill:zk=local> SELECT * FROM cp.`employee.json` limit 0;
      Query failed: Failure while running fragment. The incoming iterator returned a state of NONE on the first batch. There should always be at least one batch output before returning NONE [a7416ee7-1d9c-4591-a927-2664455f3ef1]
      
      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)
      

      Should be more like a user error, since Drill cannot handle queries that return 0 rows. Or maybe (if as I surmise the problem is that Drill just doesn't know the names of the columns) generate a default column 'unknown_result_set_schema' and no rows.

      Attachments

        Activity

          People

            DrillCommitter DrillCommitter
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: