GH-14775: [Go] Fix UnionBuilder.Len implementations#14776
GH-14775: [Go] Fix UnionBuilder.Len implementations#14776jorisvandenbossche merged 1 commit intoapache:masterfrom nwt:go-unionbuilder-len
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.
|
|
|
|
zeroshade
left a comment
There was a problem hiding this comment.
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.