Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The metadata of parquet is placed in the footer, In this design, metadata can be written after the data has been written, which allow for single pass writing.
But in current implementation of ArrowWriter, we can only provide WriterProperties in try_new, for most fields of WriterProperties this is fine, but not the case for key_value_metadata.
key_value_metadata is meant for users to save customized information, for example we can encode some stats in here.
This usually means that we need to loop the original data to get stats information, this means we have to loop data twice:
- First to get the stats information
- Second to write to parquet
If ArrowWriter could provide a way to set key_value_metadata after write all records, then only one loop is need.
Describe the solution you'd like
Add new method in ArrowWriter/SerializedFileWriter to let users set key_value_metadata.
Describe alternatives you've considered
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The metadata of parquet is placed in the footer, In this design, metadata can be written after the data has been written, which allow for single pass writing.
But in current implementation of ArrowWriter, we can only provide WriterProperties in
try_new, for most fields of WriterProperties this is fine, but not the case for key_value_metadata.key_value_metadata is meant for users to save customized information, for example we can encode some stats in here.
This usually means that we need to loop the original data to get stats information, this means we have to loop data twice:
If ArrowWriter could provide a way to set key_value_metadata after write all records, then only one loop is need.
Describe the solution you'd like
Add new method in ArrowWriter/SerializedFileWriter to let users set key_value_metadata.
Describe alternatives you've considered
Additional context