-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-14775: [Go] Fix UnionBuilder.Len implementations #14776
Conversation
(*DenseUnionBuilder).Len and (*SparseUnionBuilder).Len always return 0. They should instead return the number of values appended. This bug exists because these methods are promoted (via unionBuilder) from (*builder).Len, which reads builder.length, but DenseUnionBuilder and SparseUnionBuilder don't update that field. Fix by adding a (*unionBuilder).Len implementation that calls unionBuilder.typesBuilder.Len.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Once all the tests in the CI pass, I'll merge this.
@zeroshade: You're welcome! And thanks to you for all the work you've done in this repository! |
Actually, I need to wait until the merge script is updated from #14750 before I can merge this. |
@zeroshade I took the liberty to merge this as a final test of the merge script changes from #14750 |
Benchmark runs are scheduled for baseline = 54e1792 and contender = df07b91. df07b91 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
(*DenseUnionBuilder).Len and (*SparseUnionBuilder).Len always return 0. They should instead return the number of values appended.
This bug exists because these methods are promoted (via unionBuilder) from (*builder).Len, which reads builder.length, but DenseUnionBuilder and SparseUnionBuilder don't update that field.
Fix by adding a (*unionBuilder).Len implementation that calls unionBuilder.typesBuilder.Len.