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 2022/03/01 13:09:00 UTC

[jira] [Resolved] (ARROW-15291) [C++][Python] Segfault in StructArray.to_numpy and to_pandas if it contains an ExtensionArray

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

Joris Van den Bossche resolved ARROW-15291.
-------------------------------------------
    Fix Version/s: 8.0.0
       Resolution: Fixed

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

> [C++][Python] Segfault in StructArray.to_numpy and to_pandas if it contains an ExtensionArray
> ---------------------------------------------------------------------------------------------
>
>                 Key: ARROW-15291
>                 URL: https://issues.apache.org/jira/browse/ARROW-15291
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Python
>    Affects Versions: 6.0.1
>         Environment: pyarrow 6.0.1, macbook pro
>            Reporter: quentin lhoest
>            Assignee: Alenka Frim
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 8.0.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Hi !
> If you create a StructArray with an ExtensionArray in it, then both to_numpy and to_pandasĀ  segfault in python:
> {code:java}
> import pyarrow as pa
> class CustomType(pa.PyExtensionType):
>     def __init__(self):
>         pa.PyExtensionType.__init__(self, pa.binary())
>     def __reduce__(self):
>         return CustomType, ()
> arr = pa.ExtensionArray.from_storage(CustomType(), pa.array([b"foo"]))
> pa.StructArray.from_arrays([arr], ["name"]).to_numpy(zero_copy_only=False)
>  {code}
> Thanks in advance for the help !



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