Struct swh_graph::utils::dataset_writer::ParquetTableWriter
source · pub struct ParquetTableWriter<Builder: Default + StructArrayBuilder> {
pub flush_threshold: usize,
/* private fields */
}
Expand description
Writer to a .parquet file, usable with ParallelDatasetWriter
Builder
should follow the pattern documented by
arrow::builder
Fields§
§flush_threshold: usize
Automatically flushes the builder to disk when it length reaches the value.
To avoid uneven row group sizes, this value plus the number of values added
to the builder between calls to Self::builder
should be either equal or
equal to max_row_group_size
(or a multiple of it).
Implementations§
source§impl<Builder: Default + StructArrayBuilder> ParquetTableWriter<Builder>
impl<Builder: Default + StructArrayBuilder> ParquetTableWriter<Builder>
sourcepub fn builder(&mut self) -> Result<&mut Builder>
pub fn builder(&mut self) -> Result<&mut Builder>
Flushes the internal buffer is too large, then returns the array builder.
Trait Implementations§
source§impl<Builder: Default + StructArrayBuilder> Drop for ParquetTableWriter<Builder>
impl<Builder: Default + StructArrayBuilder> Drop for ParquetTableWriter<Builder>
source§impl<Builder: Default + StructArrayBuilder> TableWriter for ParquetTableWriter<Builder>
impl<Builder: Default + StructArrayBuilder> TableWriter for ParquetTableWriter<Builder>
type Schema = (Arc<Schema>, WriterProperties)
type CloseResult = FileMetaData
fn new( path: PathBuf, (schema, properties): Self::Schema, flush_threshold: Option<usize> ) -> Result<Self>
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Calls
.into()
on the internal builder, and writes its result to disk.fn close(self) -> Result<FileMetaData>
Auto Trait Implementations§
impl<Builder> !RefUnwindSafe for ParquetTableWriter<Builder>
impl<Builder> Send for ParquetTableWriter<Builder>where Builder: Send,
impl<Builder> !Sync for ParquetTableWriter<Builder>
impl<Builder> Unpin for ParquetTableWriter<Builder>where Builder: Unpin,
impl<Builder> !UnwindSafe for ParquetTableWriter<Builder>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere U: CastableFrom<T>,
§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere U: DowncastableFrom<T>,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.