Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.0.0
Description
When trying to flatten a struct that has children that were sliced we see incorrect results.
Bar.java
import pyarrow as pa a = py.array([1,2,3]) sliceds = a.slice(1) composed_struct = pa.StructArray.from_buffers(pa.struct([pa.field("a", sliceds.type)]), len(sliceds), [pa.array([True, False]).buffers()[1]], children=[sliceds]) >>> composed_struct <pyarrow.lib.StructArray object at 0x7f5502a74880> -- is_valid: [ true, false ] -- child 0 type: int64 [ 2, 3 ] >>> composed_struct.flatten() [<pyarrow.lib.Int64Array object at 0x7f5502a74460> [ null, null ]]
I believe the problems is here the copy does not account for child array offset.
Attachments
Issue Links
- links to