zeroshade opened a new pull request, #1474: URL: https://github.com/apache/arrow-go/pull/1474
### Rationale for this change A nested struct field reference on an array ignores the struct array's offset and length. `GetReferencedValue` takes the child with `Children()[i]`, which covers the struct's full storage, so evaluating `s.a` on a sliced record batch returns every row of the underlying storage instead of the slice's rows. ### What changes are included in this PR? - `GetReferencedValue` slices each struct child to the parent's offset and length, as `array.Struct.Field` does. The result is a new array, and intermediate slices in a longer path are released as it descends. - An array result from `GetReferencedValue` is now always a new reference that the caller releases; the doc comment says so. `execFieldRef` takes ownership of it, releases it on a type mismatch, and no longer adds a reference to it. Borrowed scalar struct fields are still retained as in #1470. This builds on #1470, which changes the same ownership logic, and includes its commit until it merges. Merge #1470 first. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. Nested struct field references on sliced arrays and record batches return the slice's rows. There is no API change. Closes #1471. -- 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]
