[ 
https://issues.apache.org/jira/browse/ARROW-15477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Pitrou resolved ARROW-15477.
------------------------------------
    Fix Version/s: 8.0.0
       Resolution: Fixed

Issue resolved by pull request 12312
[https://github.com/apache/arrow/pull/12312]

> [C++][Python] Enable ListArray::FromArrays with custom list type (field 
> names/nullability)
> ------------------------------------------------------------------------------------------
>
>                 Key: ARROW-15477
>                 URL: https://issues.apache.org/jira/browse/ARROW-15477
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++, Python
>            Reporter: Joris Van den Bossche
>            Assignee: Joris Van den Bossche
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 8.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently, when creating a ListArray from the values and offets, you get a 
> "default" list type:
> {code:python}
> >>> arr = pa.ListArray.from_arrays(pa.array([0, 2, 5], pa.int32()), 
> >>> pa.array([1, 2, 3, 4, 5]))
> >>> arr
> <pyarrow.lib.ListArray object at 0x7f75bdf03dc0>
> [
>   [
>     1,
>     2
>   ],
>   [
>     3,
>     4,
>     5
>   ]
> ]
> >>> arr.type
> ListType(list<item: int64>)
> {code}
> So a type with default field name ("item") and nullability (true). 
> We should allow to specify a type (that needs to be compatible with the 
> passed values' type) so you can create a ListArray with specific field names.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to