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

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

Closed
candiduslynx opened this issue Jun 1, 2023 · 0 comments · Fixed by #35872
Closed

Comments

@candiduslynx
Copy link
Contributor

Describe the enhancement requested

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.

Component(s)

Go

zeroshade pushed a commit that referenced this issue Jun 1, 2023
…al` (#35872)

### 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.

* Closes: #35871

Authored-by: candiduslynx <candiduslynx@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
@zeroshade zeroshade added this to the 13.0.0 milestone Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants