New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Add combine_chunks method to ChunkedArray #23640
Comments
Joris Van den Bossche / @jorisvandenbossche: StructArray and ListArray implement (somewhat unfortunately maybe) a different flatten method: for StructArray it returns a list of arrays (returning one individual array for each field in the struct), while ListArray returns a new Array with one level of nesting reduced (list array -> array, or list of list array -> list array, ..). I am not fully sure how to deal with this. Should ChunkedArray.flatten do something different depending on the type? (but it's also not nice that the type of return is then variable) Should be rename the |
Daniel Nugent / @nugend: Could it just be called edit: D'oh. Just realized this is on Table already as |
Joris Van den Bossche / @jorisvandenbossche: In [42]: chunked_array = pa.chunked_array([[1, 2], [3, 4]])
In [43]: chunked_array
Out[43]:
<pyarrow.lib.ChunkedArray object at 0x7fa785879ea8>
[
[
1,
2
],
[
3,
4
]
]
In [44]: pa.concat_arrays(chunked_array.chunks)
Out[44]:
<pyarrow.lib.Int64Array object at 0x7fa785824468>
[
1,
2,
3,
4
] (which is in the end using the same C++ But so maybe we could indeed expose this as a |
Joris Van den Bossche / @jorisvandenbossche: |
Flatten() doesn't work on ChunkedArray. It returns only the ChunkedArray in a list without flattening anything.
Reporter: marc abboud
Assignee: Andrew Wieteska / @arw2019
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-7363. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: