Skip to content

GH-35871: [Go] Account for struct validity bitmap in array.ApproxEqual#35872

Merged
zeroshade merged 4 commits intoapache:mainfrom
cloudquery:feat/approx-equal/struct-validity-over-child-validity
Jun 1, 2023
Merged

GH-35871: [Go] Account for struct validity bitmap in array.ApproxEqual#35872
zeroshade merged 4 commits intoapache:mainfrom
cloudquery:feat/approx-equal/struct-validity-over-child-validity

Conversation

@candiduslynx
Copy link
Copy Markdown
Contributor

@candiduslynx candiduslynx commented Jun 1, 2023

Rationale for this change

When comparing array.Struct values with array.ApproxEqual the validity bitmap of the struct itself should take precedence:

When reading the struct array the parent validity bitmap takes priority.

This follows a brief discussion from #35851.

What changes are included in this PR?

array.arrayApproxEqualStruct will check the fields data only if the struct elem is valid.

Are these changes tested?

pqarrow tests are updated accordingly (no special treatment for structs, just array.ApproxEqual

Are there any user-facing changes?

array.ApproxEqual behavior changed to match the docs about validity bitmap precedence.

@candiduslynx candiduslynx requested a review from zeroshade as a code owner June 1, 2023 11:11
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 1, 2023

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

@candiduslynx
Copy link
Copy Markdown
Contributor Author

@zeroshade this PR includes some changes to pqarrow pkg as well, but they are minor (exit early on the found value, dedup code).
I can extract it into a minor PR, if that's required.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jun 1, 2023
@candiduslynx candiduslynx requested a review from zeroshade June 1, 2023 16:14
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 1, 2023
@candiduslynx
Copy link
Copy Markdown
Contributor Author

@zeroshade I've updated the code to use bitutils visit, thanks for the suggestion!

Copy link
Copy Markdown
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.

LGTM thanks!

@zeroshade zeroshade merged commit 61692b6 into apache:main Jun 1, 2023
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jun 1, 2023
@candiduslynx candiduslynx deleted the feat/approx-equal/struct-validity-over-child-validity branch June 1, 2023 19:49
@ursabot
Copy link
Copy Markdown

ursabot commented Jun 3, 2023

Benchmark runs are scheduled for baseline = 3299d12 and contender = 61692b6. 61692b6 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.97% ⬆️0.06%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.36% ⬆️0.03%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 61692b69 ec2-t3-xlarge-us-east-2
[Finished] 61692b69 test-mac-arm
[Finished] 61692b69 ursa-i9-9960x
[Finished] 61692b69 ursa-thinkcentre-m75q
[Finished] 3299d12e ec2-t3-xlarge-us-east-2
[Finished] 3299d12e test-mac-arm
[Finished] 3299d12e ursa-i9-9960x
[Finished] 3299d12e 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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

array.ApproxEqual should take parent struct validity bitmap prior to checking fields

3 participants