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

Use contains_nulls in ArrayData equality of byte arrays #4582

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 29, 2023
&& !lhs_values.is_empty()
&& !rhs_values.is_empty()
{
// Only checking one null mask here because by the time the control flow reaches
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked this was the case and indeed the call site equal checks the null count already and then calls equal_values which then calls this function

pub fn equal(lhs: &ArrayData, rhs: &ArrayData) -> bool {
utils::base_equal(lhs, rhs)
&& lhs.null_count() == rhs.null_count()
&& utils::equal_nulls(lhs, rhs, 0, 0, lhs.len())
&& equal_values(lhs, rhs, 0, 0, lhs.len())
}

DataType::Utf8 | DataType::Binary => {

@tustvold tustvold merged commit 5724cf2 into apache:master Aug 1, 2023
25 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants