Skip to content

array_element, array_any_value use list offsets to deduce nullability. #21671

@tabac

Description

@tabac

Describe the bug

The array_element, array_any_value UDFs use a ListArray's offsets to deduce that a row is Null. If the difference between two consecutive offsets is 0 then the row should be Null.

This goes against the Arrow spec which allows positive slot lengths for Null rows.

It should be noted that a null value may have a positive slot length. That is, a null value may occupy a non-empty memory space in the data buffer. When this is true, the content of the corresponding memory space is undefined.

Expected behavior

The ListArray's null buffer should be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions