zeroshade opened a new pull request, #1421:
URL: https://github.com/apache/arrow-go/pull/1421

   ### Rationale for this change
   
   Split out of #1409.
   
   `ValidateFull` rejects run-end-encoded arrays from the builder. A REE array 
from `NewRunEndEncodedBuilder` (or a `Concatenate` of such arrays) fails with 
`expected at least 1 buffers for run_end_encoded<...>, got 0`, on every 
platform. The REE layout declares one always-null placeholder buffer 
(`datatype_encoded.go:40`); `NewRunEndEncodedArray` and the IPC reader supply a 
`nil` placeholder, but the builder and C Data import produce zero buffers. The 
Arrow spec says REE arrays have no physical buffers, so both representations 
are legitimate.
   
   ### What changes are included in this PR?
   
   `arrow/array/validate.go` accepts a REE array (including extension types 
with REE storage) that has no buffers. Arrays with a `nil` placeholder go 
through the existing checks as before, and non-nil or extra parent buffers are 
still rejected. Constructors, layouts, IPC and C Data are unchanged.
   
   ### Are these changes tested?
   
   Yes. New `TestRunEndEncodedValidateConstructedArrays` checks that 
builder-produced, empty, sliced, constructor-built, `Concatenate`d and 
REE-extension arrays pass `ValidateFull`. The builder, `Concatenate`, empty, 
sliced and extension cases fail before the fix; constructor cases passed 
already. Existing rejection cases (bad run ends, non-nil/extra parent buffers) 
still fail validation. `go vet` and `gofmt -l` are clean on `arrow/array`.
   
   ### Are there any user-facing changes?
   
   Yes: `ValidateFull` accepts run-end-encoded arrays produced by the builder, 
`Concatenate` and C Data import. No API changes.
   


-- 
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