Julian Hyde created CALCITE-523:
-----------------------------------

             Summary: Incremental fetch in remote JDBC driver
                 Key: CALCITE-523
                 URL: https://issues.apache.org/jira/browse/CALCITE-523
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


The remote JDBC driver currently returns all rows in its initial response. It 
should break the result up into batches.

Batch algorithm could be as complex as "fetch 100 rows, or 100K bytes, which is 
larger".

Requests PrepareAndExecuteRequest, ExecuteRequest (not yet created) and 
metadata requests CatalogsRequest etc. all return a ResultSetResponse. 
ResultSetResponse contains a "rows" field. Need to add fields { int 
firstRowOrdinal; int rowCount; boolean mayHaveMoreRows; }, and a new 
FetchRequest { int rowOrdinal; minRowCount; int minByteCount; }

FetchRequest returns a ResultSetResponse whose signature is null.

If mayHaveMoreRows is false, we are definitely done. If it is true, there may 
or may not be more rows. A subsequent fetch might be empty. An empty fetch or 
mayHaveMoreRows = false indicates end of data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to