Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4335

fetch calls may now produce empty row batches

    XMLWordPrintableJSON

Details

    Description

      After recent changes (likely IMPALA-2905), Impala may return empty row batches on fetch() calls. This shouldn't be a breaking issue for well written clients, but misbehaving clients may break. (e.g. Impyla isn't handling this correctly, I have a patch for it.)

      Also this results in extra, unnecessary RPCs. We should make sure the server is skipping empty row batches.

      I'm marking this as 'distributed exec' rather than 'client' because I think it's related to the recent coordinator fragment changes.

      This is easy to reproduce with a simple query. Executed through impyla results in 0 rows because the first row batch is empty.

      #!/usr/bin/env impala-python
      
      import impala.dbapi
      with impala.dbapi.connect(host='127.0.0.1', port=21050) as conn:
        with conn.cursor() as cursor:
          cursor.execute('select * from tpch_kudu.region')
          kudu_results = cursor.fetchall()
          for row in kudu_results:
            print row
      

      Attachments

        Activity

          People

            henryr Henry Robinson
            mjacobs Matthew Jacobs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: