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

ArrayData Equality Incorrect Null Mask Offset Handling #1599

Closed
tustvold opened this issue Apr 20, 2022 · 0 comments · Fixed by #1589
Closed

ArrayData Equality Incorrect Null Mask Offset Handling #1599

tustvold opened this issue Apr 20, 2022 · 0 comments · Fixed by #1589
Labels
bug question Further information is requested

Comments

@tustvold
Copy link
Contributor

Describe the bug

The handling of null masks in the ArrayData comparisons does not take into account the ArrayData offset, leading to incorrect results.

To Reproduce

#[test]
fn test_offset() {
    let a = Int32Array::from(vec![Some(1), Some(2), None, Some(0)]);
    let b = Int32Array::from(vec![Some(4), Some(5), Some(0), None]);
    assert_ne!(a.data().slice(2, 2), b.data().slice(2, 2));
}

Expected behavior

The equality comparisons should produce correct results on ArrayData slices

@tustvold tustvold added question Further information is requested bug labels Apr 20, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Apr 20, 2022
Various UnionArray fixes (apache#1598) (apache#1596) (apache#1591) (apache#1590)

Fix handling of null masks in ArrayData equality (apache#1599)
alamb pushed a commit that referenced this issue Apr 28, 2022
* Fix ListArray and StructArray equality (#626)

* Simplify null masking in equality comparisons

Various UnionArray fixes (#1598) (#1596) (#1591) (#1590)

Fix handling of null masks in ArrayData equality (#1599)

* Miscellaneous fixes

* Fix structure null equality

* Review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant