From 4645f00ea1f77bcf7e78dbea8f43b1459e732e74 Mon Sep 17 00:00:00 2001 From: egor-ryashin Date: Tue, 28 Nov 2023 16:24:58 +0300 Subject: [PATCH] [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 }