lidavidm commented on code in PR #964:
URL: https://github.com/apache/arrow-adbc/pull/964#discussion_r1286411888
##########
c/driver/postgresql/statement.cc:
##########
@@ -662,9 +668,6 @@ int TupleReader::GetNext(struct ArrowArray* out) {
struct ArrowArray tmp;
NANOARROW_RETURN_NOT_OK(BuildOutput(&tmp, &error));
- // Clear the copy reader to mark this reader as finished
- copy_reader_.reset();
-
Review Comment:
We should set is_finished_ here
##########
c/driver/postgresql/statement.cc:
##########
@@ -518,6 +518,12 @@ struct BindStream {
} // namespace
int TupleReader::GetSchema(struct ArrowSchema* out) {
+ if (copy_reader_ == nullptr) {
+ StringBuilderAppend(&error_builder_,
+ "[libpq] Copy reader not initialized before calling
GetSchema");
Review Comment:
This should probably be an assert
--
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]