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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to