parquet: add method to get both the inner writer and the file metadata when closing SerializedFileWriter #5253
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 want to access the
FileMetadata
from a closed parquet file so that I can add some logging, but I also need to access the inner writer for further processing.Describe the solution you'd like
SerializedFileWriter
offersinto_inner() -> Result<W>
close() -> Result<FileMetadata>
.The bodies of both functions are almost identical. Perhaps close can return
Result<(FileMetadata, W)>
.Describe alternatives you've considered
For now, I will use
into_inner()
and then open the file withSerializedFileReader
to get the metadata.Additional context
close()
does not flush the file, which will ignore errors.W: BufWriter
instead of forcing the buffer on top.The text was updated successfully, but these errors were encountered: