jerolba / parquet-carpet

Java Parquet serialization and deserialization library using Java 17 Records
Apache License 2.0
50 stars 3 forks source link

Unify Record fields writers with Collection value writer #41

Closed jerolba closed 3 months ago

jerolba commented 3 months ago

CarpetRecordWriter::buildBasicTypeWriter code and SimpleCollectionItemConsumerFactory is similar, while FieldsWriter has a lot of duplicated code.

Extract from FieldsWriter shared write logic, and use SimpleCollectionItemConsumerFactory to convert values for the writer. Then move all logic to buildBasicTypeWriter, removing the factory code.