[
https://issues.apache.org/jira/browse/ARROW-15839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Miles Granger reassigned ARROW-15839:
-------------------------------------
Assignee: Miles Granger
> [C++][Python] Allow to reconstruct a ListArray with ListArray.from_arrays and
> keep the nulls
> --------------------------------------------------------------------------------------------
>
> Key: ARROW-15839
> URL: https://issues.apache.org/jira/browse/ARROW-15839
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Python
> Affects Versions: 7.0.0
> Reporter: quentin lhoest
> Assignee: Miles Granger
> Priority: Major
> Labels: good-second-issue
>
> Hi ! Right now when one wants to reconstruct a ListArray using
> ListArrar.from_arrays, the `null` values may be lost:
> {code:java}
> import pyarrow as pa
> arr = pa.array([None, [0]])
> reconstructed_arr = pa.ListArray.from_arrays(arr.offsets, arr.values)
> print(reconstructed_arr.to_pylist())
> # [[], [0]] {code}
> It would be nice to have a `mask` parameter to `ListArray.from_arrays` (or
> any way to provide the validity bitmap) to be able to reconstruct the
> original array with the `null` values.
> It would also be consistent with `StructArray.from_arrays` that already has
> the `mask` parameter.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)