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/05/03 15:41:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17338431#comment-17338431 ]
quentin lhoest commented on ARROW-12568:
----------------------------------------
Thanks !
> [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: 2h 40m
> 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)