diff --git a/src/io/parquet/write/file.rs b/src/io/parquet/write/file.rs index 72b95574b18..27c62f6edf5 100644 --- a/src/io/parquet/write/file.rs +++ b/src/io/parquet/write/file.rs @@ -83,8 +83,13 @@ impl FileWriter { } /// Writes the footer of the parquet file. Returns the total size of the file. - pub fn end(self, key_value_metadata: Option>) -> Result<(u64, W)> { + pub fn end(&mut self, key_value_metadata: Option>) -> Result { let key_value_metadata = add_arrow_schema(&self.schema, key_value_metadata); Ok(self.writer.end(key_value_metadata)?) } + + /// Consumes this writer and returns the inner writer + pub fn into_inner(self) -> W { + self.writer.into_inner() + } }