You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "quentin lhoest (Jira)" <ji...@apache.org> on 2021/04/27 13:41:00 UTC

[jira] [Created] (ARROW-12568) [Python][C++] Segfault when casting a sliced ListArray of int64 in v4.0.0

quentin lhoest created ARROW-12568:
--------------------------------------

             Summary: [Python][C++] Segfault when casting a sliced ListArray of int64 in v4.0.0
                 Key: ARROW-12568
                 URL: https://issues.apache.org/jira/browse/ARROW-12568
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++, Python
    Affects Versions: 4.0.0
            Reporter: quentin lhoest


Hi !

I just updated to pyarrow 4.0.0 and I noticed that a segfault happens when casting a sliced ListArray of int64. It crashes on both linux and windows. Here is a code to reproduce:

{code:python}
import pyarrow as pa

arr = pa.array([[i * 10] for i in range(4)])
print(type(arr))  # <class 'pyarrow.lib.ListArray'>
print(arr.type)  # list<item: int64>
arr.cast(pa.list_(pa.int32()))  # works
print(">>> Casting without slicing works")

arr = arr.slice(1)
print(type(arr))  # <class 'pyarrow.lib.ListArray'>
print(arr.type)  # list<item: int64>
arr.cast(pa.list_(pa.int32()))  # crashes !!
print(">>> This message isn't printed because casting with slicing causes a segfault")
{code}

On pyarrow 3.0.0 I used to get
{code:python}
ArrowNotImplementedError("Casting sliced lists (non-zero offset) not yet implemented")
{code}
 instead of the segfault.

Thanks in advance for your help !



--
This message was sent by Atlassian Jira
(v8.3.4#803005)