Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1181

FetchResponse always return no rows

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: avatica-1.7.1
    • Fix Version/s: 1.8.0
    • Component/s: avatica
    • Labels:
      None
    • Environment:

      HBase 1.1 and Phoenix 4.7.0, HBase 1.1 and Phoenix 4.8.0-SNAPSHOT

      Description

      Assuming I have a table called my_table which is created and seeded like so:

      CREATE TABLE my_table (k BIGINT PRIMARY KEY, v VARCHAR) TRANSACTIONAL=true
      UPSERT INTO my_table VALUES (1,'A')
      UPSERT INTO my_table VALUES (2,'B')
      

      I have 2 rows in the table. If I query the table using SELECT * FROM my_table, and request a maxRowCount of 1, using FetchRequest to request further rows always returns 0 rows.

      For ease of reproduction, I have included CURL commands (avatica will need to have serialization set to JSON):

      curl localhost:8765 -XPOST --data '{"request": "openConnection","connectionId": "my-conn"}'
      
      curl localhost:8765 -XPOST --data '{"request": "createStatement","connectionId": "my-conn"}'
      curl localhost:8765 -XPOST --data '{"request": "prepareAndExecute","connectionId": "my-conn","statementId": 12345,"sql": "SELECT * FROM my_table","maxRowCount": 1}' # update the statementId
      
      curl localhost:8765 -XPOST --data '{"request": "fetch","connectionId": "my-conn","statementId": 12345,"offset": 0,"fetchMaxRowCount": 1}' # update the statementId
      

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              francischuang Francis Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: