You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/05/03 15:38:00 UTC
[jira] [Resolved] (ARROW-12568) [Python][C++] Segfault when casting
a sliced ListArray of int64 in v4.0.0
[ https://issues.apache.org/jira/browse/ARROW-12568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou resolved ARROW-12568.
------------------------------------
Fix Version/s: 5.0.0
Resolution: Fixed
Issue resolved by pull request 10184
[https://github.com/apache/arrow/pull/10184]
> [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
> Assignee: Yibo Cai
> Priority: Major
> Labels: pull-request-available, segfault
> Fix For: 5.0.0
>
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> 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)