This is an automated email from the ASF dual-hosted git repository.
francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git
The following commit(s) were added to refs/heads/main by this push:
new 4645f00 [CALCITE-6139] Avatica-Go sends the same offset for the
FetchRequest
4645f00 is described below
commit 4645f00ea1f77bcf7e78dbea8f43b1459e732e74
Author: egor-ryashin <[email protected]>
AuthorDate: Tue Nov 28 16:24:58 2023 +0300
[CALCITE-6139] Avatica-Go sends the same offset for the FetchRequest
---
rows.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rows.go b/rows.go
index dd0cac4..3bc6a7b 100644
--- a/rows.go
+++ b/rows.go
@@ -99,7 +99,7 @@ func (r *rows) Next(dest []driver.Value) error {
res, err := r.conn.httpClient.post(context.Background(),
&message.FetchRequest{
ConnectionId: r.conn.connectionId,
StatementId: r.statementID,
- Offset: resultSet.offset,
+ Offset: resultSet.offset +
uint64(len(resultSet.data)),
FrameMaxSize: r.conn.config.frameMaxSize,
})
@@ -130,6 +130,7 @@ func (r *rows) Next(dest []driver.Value) error {
resultSet.done = frame.Done
resultSet.data = data
resultSet.currentRow = 0
+ resultSet.offset = frame.Offset
}