You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/16 11:33:00 UTC
[jira] [Updated] (ARROW-15839) [C++][Python] Allow to reconstruct a ListArray with ListArray.from_arrays and keep the nulls
[ https://issues.apache.org/jira/browse/ARROW-15839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-15839:
-----------------------------------
Labels: good-second-issue pull-request-available (was: good-second-issue)
> [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, pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)