Skip to content

ArrayData Equality Incorrect Null Mask Offset Handling #1599

@tustvold

Description

@tustvold

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions