You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "dataders (via GitHub)" <gi...@apache.org> on 2026/05/11 01:15:06 UTC
[PR] fix(go): align buffers before C Data export [arrow-adbc]
dataders opened a new pull request, #4309:
URL: https://github.com/apache/arrow-adbc/pull/4309
### What changed
This adds an internal Go helper that prepares record batches for Arrow C Data export by copying only buffers whose base pointer is not aligned to 64 bytes.
The c-shared driver template now runs record batches through that helper before calling `cdata.ExportArrowRecordBatch`, and the generated c-shared driver packages have been regenerated from the template.
### Why
Some consumers of Arrow C Data import primitive buffers as typed native buffers and require the pointer to satisfy the scalar type alignment. Decimal128 is backed by 16-byte values, so a Decimal128 value buffer exported through C Data with an 8-byte-aligned pointer can fail in strict consumers.
The Go drivers can receive Arrow IPC-backed buffers whose byte storage is usable inside Go but not suitable to hand out unchanged across the C Data FFI boundary. The c-shared driver owns that boundary, so it should ensure the buffers it exports are aligned.
### Validation
- `go test ./pkg/internal/cdataalign -count=1`
- `go test -tags driverlib ./pkg/flightsql ./pkg/panicdummy ./pkg/snowflake ./pkg/bigquery ./pkg/databricks ./pkg/salesforce -count=1`
- Built the Snowflake c-shared driver locally with a forced-misaligned allocator repro setup.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(go): align buffers before C Data export [arrow-adbc]
Posted by "dataders (via GitHub)" <gi...@apache.org>.
dataders commented on PR #4309:
URL: https://github.com/apache/arrow-adbc/pull/4309#issuecomment-4416928784
Closing this because it targeted apache/main, which no longer contains the Go Snowflake driver. This patch belongs on the fork/maintenance line that still carries the Go c-shared drivers.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(go): align buffers before C Data export [arrow-adbc]
Posted by "dataders (via GitHub)" <gi...@apache.org>.
dataders closed pull request #4309: fix(go): align buffers before C Data export
URL: https://github.com/apache/arrow-adbc/pull/4309
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org