fornwall opened a new pull request, #4475: URL: https://github.com/apache/arrow-adbc/pull/4475
…ed operations The driver exporter exported result readers via arrow-rs's FFI_ArrowArrayStream::new, whose error mapping is hardcoded to the ArrowError variant (ENOSYS/ENOMEM/EIO/EINVAL). Rust drivers surface their adbc_core::error::Error through ArrowError::ExternalError, which lands in the catch-all EINVAL — so a driver whose in-flight query was cancelled could not report ECANCELED through the C stream, which the ADBC spec (and the C++ validation suite's SqlQueryCancel) expect after AdbcStatementCancel. Replace the export with the same machinery (adapted from arrow-rs's ffi_stream.rs, Apache-2.0), differing only in the error-code mapping: the error source chain is searched for an adbc_core::error::Error, and Status::Cancelled maps to the platform's ECANCELED; everything else keeps the arrow-rs variant mapping, so behaviour is unchanged for non-cancelled errors. Unit tests drive the exported stream through the raw C callbacks: end-of-stream, ECANCELED for a Cancelled ADBC error (direct and nested in a source chain), unchanged fallback codes, message preservation via get_last_error, and schema round-trip. -- 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]
