You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2019/12/18 16:58:00 UTC
[jira] [Resolved] (ARROW-7362) [Python] ListArray.flatten() should
take care of slicing offsets
[ https://issues.apache.org/jira/browse/ARROW-7362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou resolved ARROW-7362.
-----------------------------------
Fix Version/s: 1.0.0
Resolution: Fixed
Issue resolved by pull request 6006
[https://github.com/apache/arrow/pull/6006]
> [Python] ListArray.flatten() should take care of slicing offsets
> ----------------------------------------------------------------
>
> Key: ARROW-7362
> URL: https://issues.apache.org/jira/browse/ARROW-7362
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Reporter: Zhuo Peng
> Assignee: Zhuo Peng
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.0.0
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> Currently ListArray.flatten() simply returns the child array. If a ListArray is a slice of another ListArray, they will share the same child array, however the expected behavior (I think) of flatten() should be returning an Array that's a concatenation of all the sub-lists in the ListArray, so the slicing offset should be taken into account.
>
> For example:
> a = pa.array([[1], [2], [3]])
> assert a.flatten().equals(pa.array([1,2,3]))
> # expected:
> a.slice(1).flatten().equals(pa.array([2, 3]))
--
This message was sent by Atlassian Jira
(v8.3.4#803005)