parquet: convert Bytes to ByteArray directly #3719
Labels
enhancement
Any new improvement worthy of a entry in the changelog
parquet
Changes to the parquet crate
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I'm using
SerializedFileWriter
to write byte arrays to parquet files in my project which implements a C# binding to the parquet crate. I find it difficult to constructByteArray
from raw bytes received across FFI. A conversion path frombytes::Bytes
toByteArray
would be really useful.Right now,
ByteArray
only supports conversion fromVec<u8>
and&str
.Describe the solution you'd like
Implement
From<Bytes>
for ByteArray,Describe alternatives you've considered
For now, I'm using
util::memory::ByteBufferPtr
hidden behind theexperimental
feature flag to achieve this goal.Additional context
I find
ByteArray
is a wrapper aroundBytes
. Short term, we can add traitFrom<Bytes>
forByteArray
.In comments above
ByteBufferPtr
,I agree ideally we should remove the internal struct
ByteBufferPtr
.The text was updated successfully, but these errors were encountered: