When creating a ListArray where you indicate that the values field is not nullable, you can actually create the array with nulls without this is being validated:
>>>typ=pa.list_(pa.field("element", pa.int64(), nullable=False))
>>>arr=pa.array([[1, 2], [3, 4, None]], typ)
>>>arr<pyarrow.lib.ListArrayobjectat0x7f75bdeba760>
[
[
1,
2
],
[
3,
4,
null
]
]
>>>arr.typeListType(list<element: int64notnull>)Also explicitly validating it doesn't raise:
>>>arr.validate(full=True)
Is this something we should check?
What guarantees do we attach to the nullability of a field of a nested type?
Reporter: Joris Van den Bossche / @jorisvandenbossche
Related issues:
Note: This issue was originally created as ARROW-15478. Please see the migration documentation for further details.
When creating a ListArray where you indicate that the values field is not nullable, you can actually create the array with nulls without this is being validated:
Also explicitly validating it doesn't raise:
Is this something we should check?
What guarantees do we attach to the nullability of a field of a nested type?
Reporter: Joris Van den Bossche / @jorisvandenbossche
Related issues:
Note: This issue was originally created as ARROW-15478. Please see the migration documentation for further details.