You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting a Vec<S> into an arrow2::Chunk via try_into_arrow where S is a struct, the resulting Chunk will wrap a StructArray. We'd like to facilitate the conversion of this Chunk to another Chunk that directly wraps the fields of the StructArray.
One way this could be accomplished is by introducing a FlattenChunk trait, which defines a flatten method, that consumes a Chunk and returns a modified Chunk with the fields of a StructArray or the original Chunk if it was not wrapping a StructArray. This trait could be implemented for Chunk<A> where A: AsRef<dyn Array>.
The text was updated successfully, but these errors were encountered:
ncpenke
changed the title
Provide a helper function to flatten a Chunk that wraps a StructArray
Provide a helper function to flatten a Chunk that wraps a StructArrayJun 30, 2022
nielsmeima
pushed a commit
to nielsmeima/arrow2-convert
that referenced
this issue
Jul 1, 2022
From the discussion in: #40.
When converting a
Vec<S>
into anarrow2::Chunk
viatry_into_arrow
whereS
is a struct, the resulting Chunk will wrap aStructArray
. We'd like to facilitate the conversion of thisChunk
to anotherChunk
that directly wraps the fields of theStructArray
.One way this could be accomplished is by introducing a
FlattenChunk
trait, which defines aflatten
method, that consumes a Chunk and returns a modifiedChunk
with the fields of aStructArray
or the originalChunk
if it was not wrapping aStructArray
. This trait could be implemented forChunk<A> where A: AsRef<dyn Array>
.The text was updated successfully, but these errors were encountered: