HyukjinKwon opened a new pull request, #48907:
URL: https://github.com/apache/arrow/pull/48907
### Rationale for this change
`StructArray` diffing was inefficient because it compared all fields
together with no early termination. For a 10-field struct, even if the first
field differs, it checks all 10 fields.
### What changes are included in this PR?
Introduced `StructValueComparator` that compares struct fields independently
with early termination.
### Are these changes tested?
Yes, added `DiffTest.StructFieldComparison` and
`DiffTest.NestedStructComparison`
All existing struct diff tests pass. Plus, I verified this with local
benchmark (can be shared if asked).
### Are there any user-facing changes?
No behavioral changes but optimization for `Array.diff()`.
--
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]