Joseph-Rance opened a new issue, #4772: URL: https://github.com/apache/arrow-rs/issues/4772
## 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 equivalent `parquet_derive::ParquetRecordReader` macro. ## Describe the solution you'd like A `parquet_derive::ParquetRecordReader` macro that does the same as `parquet_derive::ParquetRecordWriter` but for reading. There already exists a `parquet::record::RecordWriter` trait: https://github.com/apache/arrow-rs/blob/587250c8e0f9707cc102bd04573395c153249ced/parquet/src/record/record_writer.rs#L23-L31 I would like there to be a similar `parquet::record::RecordReader` trait such as: ```rust pub trait RecordReader<T> { fn read_from_row_group( &mut self, row_group_reader: &mut dyn RowGroupReader, max_records: usize, ) -> Result<(), ParquetError>; } ``` There also exists a `parquet_derive::ParquetRecordWriter` proc macro to implement this trait for slices of structs: https://github.com/apache/arrow-rs/blob/587250c8e0f9707cc102bd04573395c153249ced/parquet_derive/src/lib.rs#L77-L78 Generates code to implement trait here: https://github.com/apache/arrow-rs/blob/587250c8e0f9707cc102bd04573395c153249ced/parquet_derive/src/lib.rs#L98 So I would again like there to be a similar `parquet_derive::ParquetRecordReader` that implements something like: ```rust impl #generics ::parquet::record::RecordReader<#derived_for #generics> for &mut [#derived_for #generics] { ``` ## 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
