apache / apache/arrow-adbc

`abdc_ffi`: Cancelled in-flight queries cannot report `ECANCELED`

Open
#4,474 1 comment 0 reactions 1 assignee Claimed by @fornwall View on GitHub
Type: bug
Dominant language
C#
Stars
627
Forks
217
Avg merge
17h
Merged PRs (30d)
57

Description

The rust `abdc_ffi` driver exporter exports result readers via arrow-rs's `FFI_ArrowArrayStream::new`, whose error→errno mapping is hardcoded to the `ArrowError` **variant**: `NotYetImplemented`→`ENOSYS`, `MemoryError`→`ENOMEM`, `IoError`→`EIO`, everything else→`EINVAL`.

Rust ADBC drivers surface their `adbc_core::error::Error` through `ArrowError::ExternalError`, which lands in the `EINVAL` catch-all — so a driver whose in-flight query was cancelled has **no way** to report `ECANCELED` through the C stream, even though the ADBC spec (and the C++ validation suite's `SqlQueryCancel`) expect exactly that errno after `AdbcStatementCancel`.

### Environment/Setup
`adbc_ffi` 0.23.0 (also present in current `main`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.