You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2020/12/21 09:33:00 UTC
[jira] [Commented] (ARROW-10930) [Python] LargeListType doesn't
have a value_field
[ https://issues.apache.org/jira/browse/ARROW-10930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252723#comment-17252723 ]
Joris Van den Bossche commented on ARROW-10930:
-----------------------------------------------
[~jpivarski] thanks for the report! Indeed an easy one, putting up a PR now.
> [Python] LargeListType doesn't have a value_field
> -------------------------------------------------
>
> Key: ARROW-10930
> URL: https://issues.apache.org/jira/browse/ARROW-10930
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 2.0.0
> Reporter: Jim Pivarski
> Assignee: Joris Van den Bossche
> Priority: Major
> Fix For: 3.0.0
>
>
> This one is easy: it looks like the LargeListType is just missing this field. Here it is for a 32-bit list (the reason I want this is to get at the "nullable" field, although the "metadata" would be nice, too):
> {code:java}
> >>> import pyarrow as pa
> >>> small_array = pa.ListArray.from_arrays(pa.array([0, 3, 3, 5]), pa.array([1.1, 2.2, 3.3, 4.4, 5.5]))
> >>> small_array.type.value_field
> pyarrow.Field<item: double>
> >>> small_array.type.value_field.nullable
> True{code}
> Now with a large list:
> {code:java}
> >>> large_array = pa.LargeListArray.from_arrays(pa.array([0, 3, 3, 5]), pa.array([1.1, 2.2, 3.3, 4.4, 5.5]))
> >>> large_array.type.value_field
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'pyarrow.lib.LargeListType' object has no attribute 'value_field'{code}
> Verifying version:
> {code:java}
> >>> pa.__version__
> '2.0.0'{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)