CurtHagenlocher commented on code in PR #4133:
URL: https://github.com/apache/arrow-adbc/pull/4133#discussion_r2981822932
##########
csharp/src/Client/AdbcDataReader.cs:
##########
@@ -335,6 +335,11 @@ public override bool Read()
return true;
}
+ // Clear the previous batch before fetching the next one.
+ // If ReadNextRecordBatchAsync throws (e.g. server error
mid-stream),
+ // callers that retry Read() must not re-read stale rows from the
+ // old batch — they must see the exception again immediately.
+ this.recordBatch = null;
Review Comment:
I don't think a caller should call `Read()` again if the previous call
returned an error, but that doesn't mean we can't improve this code. Anyhow, I
see a bunch of other small things that need fixing so I'll check in this change
as-is and submit a followup PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]