pub struct FileWriter<W: Write> { /* private fields */ }
Available on crate feature
io_parquet
only.Expand description
An interface to write a parquet to a Write
Implementations§
source§impl<W: Write> FileWriter<W>
impl<W: Write> FileWriter<W>
sourcepub fn options(&self) -> WriteOptions
pub fn options(&self) -> WriteOptions
The options assigned to the file
sourcepub fn parquet_schema(&self) -> &SchemaDescriptor
pub fn parquet_schema(&self) -> &SchemaDescriptor
The SchemaDescriptor
assigned to this file
source§impl<W: Write> FileWriter<W>
impl<W: Write> FileWriter<W>
sourcepub fn try_new(writer: W, schema: Schema, options: WriteOptions) -> Result<Self>
pub fn try_new(writer: W, schema: Schema, options: WriteOptions) -> Result<Self>
sourcepub fn write(&mut self, row_group: RowGroupIter<'_, Error>) -> Result<()>
pub fn write(&mut self, row_group: RowGroupIter<'_, Error>) -> Result<()>
Writes a row group to the file.
sourcepub fn end(&mut self, key_value_metadata: Option<Vec<KeyValue>>) -> Result<u64>
pub fn end(&mut self, key_value_metadata: Option<Vec<KeyValue>>) -> Result<u64>
Writes the footer of the parquet file. Returns the total size of the file.
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes this writer and returns the inner writer
sourcepub fn into_inner_and_metadata(self) -> (W, ThriftFileMetaData)
pub fn into_inner_and_metadata(self) -> (W, ThriftFileMetaData)
Returns the underlying writer and ThriftFileMetaData
Panics
This function panics if Self::end
has not yet been called