zeroshade opened a new pull request, #1550:
URL: https://github.com/apache/arrow-go/pull/1550
### Rationale for this change
`NullType.Layout()` declares one always-null buffer, and `array.NewNull` /
`NullBuilder` build null data with `[]*memory.Buffer{nil}`. The IPC reader
(`loadNull`) and the C Data importer built null data with **no** buffers, so
`array.ValidateFull` rejects every decoded or imported null array (`expected at
least 1 buffers for null, got 0`), including null children of structs and lists.
### What changes are included in this PR?
- `arrow/ipc`: `loadNull` builds null data with a single nil buffer.
- `arrow/cdata`: the null-type import does the same.
Export is unchanged: null types have no validity bitmap, so `exportArray`
still drops the slot and `n_buffers` stays 0.
### Are these changes tested?
Yes. New `TestNullArrayRoundTripValidateFull` (top-level null,
`struct<null>`, `list<null>` through IPC) and `TestPrimitiveArrs` now runs
`ValidateFull` on every imported array. Both fail without the fix.
### Are there any user-facing changes?
Null arrays read from IPC or imported via C Data now pass `ValidateFull`.
--
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]