There exists a ParquetRecordWriter
proc macro in parquet_derive
, but ParquetRecordReader
is missing
#4772
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.
Reading parquet files into slices of structs can take quite a lot of code. There exists a
parquet_derive::ParquetRecordWriter
derive macro to write from a slice of structs to a parquet file, but there is no equivalentparquet_derive::ParquetRecordReader
macro.Describe the solution you'd like
A
parquet_derive::ParquetRecordReader
macro that does the same asparquet_derive::ParquetRecordWriter
but for reading.There already exists a
parquet::record::RecordWriter
trait:arrow-rs/parquet/src/record/record_writer.rs
Lines 23 to 31 in 587250c
I would like there to be a similar
parquet::record::RecordReader
trait such as:There also exists a
parquet_derive::ParquetRecordWriter
proc macro to implement this trait for slices of structs:arrow-rs/parquet_derive/src/lib.rs
Lines 77 to 78 in 587250c
Generates code to implement trait here:
arrow-rs/parquet_derive/src/lib.rs
Line 98 in 587250c
So I would again like there to be a similar
parquet_derive::ParquetRecordReader
that implements something like:Describe alternatives you've considered
The alternative is for the user to write this code by hand. However, for large structs a macro is necessary and then quickly becomes quite a lot of code ontop of the existing parquet library.
Additional context
I have already implemented a possible solution which I will make a PR for.
The text was updated successfully, but these errors were encountered: