lidavidm commented on code in PR #4469:
URL: https://github.com/apache/arrow-adbc/pull/4469#discussion_r3534464998
##########
rust/ffi/src/driver_exporter.rs:
##########
@@ -1728,6 +1728,12 @@ extern "C" fn statement_execute_query<DriverType: Driver
+ 'static>(
let reader = Box::new(reader);
let reader = FFI_ArrowArrayStream::new(reader);
unsafe { std::ptr::write_unaligned(out, reader) };
+ if !rows_affected.is_null() {
+ // A query does not report an affected-row count up front.
ADBC's ExecuteQuery
+ // contract (adbc.h) defines `rows_affected` as the count if
known, else -1;
+ // leaving the out-parameter untouched would surface the
caller's stale value.
Review Comment:
```suggestion
```
--
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]