You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
[Python][C++] Casting a list of struct array with null field results in invalid result #43838
changed the title [-]ChunkedArray cast to data type containing null results in ArrowIndexError when accessed[/-][+][Python][C++] Casting a list of struct array with null field results in invalid result[/+]on Aug 27, 2024
The issue already happens with the plain (non-chunked) array as well. And the repr also shows it being invalid (which is then the reason that a getitem operation errors):
In [24]: arr.cast(dtype)
Out[24]:
<pyarrow.lib.ListArray object at 0x7f0536bbd480>
<Invalid array: List child array invalid: Invalid: Struct child array #0 has length smaller than expected for struct array (1 < 2)>
Activity
[-]ChunkedArray cast to data type containing null results in ArrowIndexError when accessed[/-][+][Python][C++] Casting a list of struct array with null field results in invalid result[/+]jorisvandenbossche commentedon Aug 27, 2024
@Angel-212 thanks for the report!
The issue already happens with the plain (non-chunked) array as well. And the repr also shows it being invalid (which is then the reason that a getitem operation errors):
Add (failing) tests for remaining null-nested-field breakage
Work around null-typed nested field breakage in setitem/from_sequence…
apacheGH-43838: [C++] Preserve nested NullType metadata in array views
apacheGH-43838: [C++] Preserve nested NullType metadata in array views
Add xfail canary tests for upstream pyarrow null-nested bugs
Add (failing) tests for null-nested cast robustness in nested-pandas
Add safe_cast to avoid pyarrow null-typed nested cast bug
Add (failing) tests for remaining null-nested-field breakage
Work around null-typed nested field breakage in setitem/from_sequence…
Fix null nested casts (#514)