You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/17 11:35:00 UTC

[jira] [Updated] (ARROW-12769) [Python] Negative out of range slices yield invalid arrays

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

ASF GitHub Bot updated ARROW-12769:
-----------------------------------
    Labels: pull-request-available  (was: )

> [Python] Negative out of range slices yield invalid arrays
> ----------------------------------------------------------
>
>                 Key: ARROW-12769
>                 URL: https://issues.apache.org/jira/browse/ARROW-12769
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Python
>    Affects Versions: 2.0.0, 4.0.0
>            Reporter: Micah Kornfield
>            Assignee: Joris Van den Bossche
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 5.0.0, 4.0.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Tested on pyarrow 2.0 and pyarrow 4.0 wheels.  The errors are slightly different between the 2.0.  Below is a script from 4.0
>  
> This is taken from the result of test_slice_array
> {{ }}
> {{ >>> import pyarrow as pa}}
> {{ >>> pa.array(range(0,10))}}
> {{ <pyarrow.lib.Int64Array object at 0x7f59b8bdab20>}}
> {{ [}}
> {{ 0,}}
> {{ 1,}}
> {{ 2,}}
> {{ 3,}}
> {{ 4,}}
> {{ 5,}}
> {{ 6,}}
> {{ 7,}}
> {{ 8,}}
> {{ 9}}
> {{ ]}}
> {{ >>> a=pa.array(range(0,10))}}
> {{ >>> a[-9:-20]}}
> {{ <pyarrow.lib.Int64Array object at 0x7f59b8bdaa00>}}
> {{ []}}
> {{ >>> len(a[-9:-20])}}
> {{ Traceback (most recent call last):}}
> {{ File "<stdin>", line 1, in <module>}}
> {{ SystemError: <built-in function len> returned NULL without setting an error}}



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