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

PartialEq of GenericByteViewArray (StringViewArray / ByteViewArray) that compares on equality rather than logical value #6679

Closed
alamb opened this issue Nov 4, 2024 · 3 comments · Fixed by #6689
Assignees
Labels
arrow Changes to the arrow crate documentation Improvements or additions to documentation enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Nov 4, 2024

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Comparing two GenericByteViewArray using PartialEq compares by structure
(the u128s) and contents of the buffers, not by logical content. As there

As @tustvold points out on https://github.com/apache/arrow-rs/pull/6673/files#r1827839121 this is inconsistent with how PartialEq is implemented for other arrays, which compare based on ArrayData which compares based on equality:

impl PartialEq for ArrayData {
fn eq(&self, other: &Self) -> bool {
equal::equal(self, other)
}
}

Describe the solution you'd like
Implement PartialEq for GenericByteViewArray that compares two arrays on logical value rather than physical representation

Describe alternatives you've considered
Add manual impl of PartialEq to GenericByteViewArray

Additional context

@alamb alamb added the enhancement Any new improvement worthy of a entry in the changelog label Nov 4, 2024
@tlm365
Copy link
Contributor

tlm365 commented Nov 5, 2024

take

@alamb
Copy link
Contributor Author

alamb commented Nov 16, 2024

label_issue.py automatically added labels {'documentation'} from #6673

@alamb alamb added the arrow Changes to the arrow crate label Nov 16, 2024
@alamb
Copy link
Contributor Author

alamb commented Nov 16, 2024

label_issue.py automatically added labels {'arrow'} from #6673

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate documentation Improvements or additions to documentation enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants