Skip to content
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

Merged
merged 1 commit into from
Nov 30, 2022
Merged

GH-14775: [Go] Fix UnionBuilder.Len implementations #14776

merged 1 commit into from
Nov 30, 2022

Conversation

nwt
Copy link
Contributor

@nwt nwt commented Nov 29, 2022

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

(*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.
@github-actions
Copy link

@github-actions
Copy link

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

@github-actions
Copy link

⚠️ GitHub issue #14775 has no components, please add labels for components.

Copy link
Member

@zeroshade zeroshade left a 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.

@nwt
Copy link
Contributor Author

nwt commented Nov 29, 2022

@zeroshade: You're welcome! And thanks to you for all the work you've done in this repository!

@zeroshade
Copy link
Member

Actually, I need to wait until the merge script is updated from #14750 before I can merge this.

@jorisvandenbossche
Copy link
Member

@zeroshade I took the liberty to merge this as a final test of the merge script changes from #14750

@jorisvandenbossche jorisvandenbossche added this to the 11.0.0 milestone Nov 30, 2022
@nwt nwt deleted the go-unionbuilder-len branch November 30, 2022 16:00
@ursabot
Copy link

ursabot commented Nov 30, 2022

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.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.07% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.54% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.31% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] df07b916 ec2-t3-xlarge-us-east-2
[Finished] df07b916 test-mac-arm
[Finished] df07b916 ursa-i9-9960x
[Finished] df07b916 ursa-thinkcentre-m75q
[Finished] 54e17920 ec2-t3-xlarge-us-east-2
[Finished] 54e17920 test-mac-arm
[Finished] 54e17920 ursa-i9-9960x
[Finished] 54e17920 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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

Successfully merging this pull request may close these issues.

4 participants