Skip to content

Nested field access on nullable structs discard parent nulls #25120

Closed

Description

@AdamGS

Describe the bug

If we have a nested struct array, we only take the leaf nullability into account, instead of of an AND of all parent nullability.

To Reproduce

let inner_array = StructArray::new(
        vec![Field::new("value", DataType::Int32, false)].into(),
        vec![Arc::new(Int32Array::from(vec![1, 2, 3]))],
        None,
    );
// Only the outer struct marks row 1 as null; its children are all valid.
let outer_array = StructArray::new(
        vec![Field::new("inner", inner_array.data_type().clone(), false)].into(),
        vec![Arc::new(inner_array)],
        Some(NullBuffer::from(vec![true, false, true])),
    );

If we try and get outer['inner']['value'], we currently get [1, 2, 3] instead of [1, null, 3].

Expected behavior

No response

Additional context

No response

Activity

  1. added theissue type on Sep 9, 2026
  2. AdamGS commented on Sep 9, 2026

    @AdamGS
    ContributorAuthor

    take

  3. AdamGS commented on Sep 13, 2026

    @AdamGS
    ContributorAuthor

    @neilconway i think this is similar to some of the issues you filed recently

  4. added a commit that references this issue on Sep 16, 2026
    140c7c5
  5. added a commit that references this issue on Oct 6, 2026
    924d571
  6. added a commit that references this issue on Oct 11, 2026
    115bec8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions