Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Jan 20, 2026

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().

@github-actions
Copy link

⚠️ GitHub issue #48906 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant