pub struct U16PartitionedTableWriter<PartitionWriter: TableWriter + Send> { /* private fields */ }Expand description
Wraps N TableWriter in such a way that they each write to base/0/x.parquet,
…, base/N-1/x.parquet instead of base/x.parquet.
This allows Hive partitioning while writing with multiple threads (x is the
thread id in the example above).
If num_partitions is None, disables partitioning.
Implementations§
Source§impl<PartitionWriter: TableWriter + Send> U16PartitionedTableWriter<PartitionWriter>
impl<PartitionWriter: TableWriter + Send> U16PartitionedTableWriter<PartitionWriter>
pub fn partitions(&mut self) -> &mut [PartitionWriter]
Trait Implementations§
Source§impl<PartitionWriter: TableWriter + Send> TableWriter for U16PartitionedTableWriter<PartitionWriter>
impl<PartitionWriter: TableWriter + Send> TableWriter for U16PartitionedTableWriter<PartitionWriter>
Source§type Schema = (String, Option<NonZero<u16>>, <PartitionWriter as TableWriter>::Schema)
type Schema = (String, Option<NonZero<u16>>, <PartitionWriter as TableWriter>::Schema)
(partition_column, num_partitions, underlying_schema)
type CloseResult = Vec<<PartitionWriter as TableWriter>::CloseResult>
type Config = <PartitionWriter as TableWriter>::Config
fn new( path: PathBuf, (partition_column, num_partitions, schema): Self::Schema, config: Self::Config, ) -> 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<Self::CloseResult>
Auto Trait Implementations§
impl<PartitionWriter> Freeze for U16PartitionedTableWriter<PartitionWriter>
impl<PartitionWriter> RefUnwindSafe for U16PartitionedTableWriter<PartitionWriter>where
PartitionWriter: RefUnwindSafe,
impl<PartitionWriter> Send for U16PartitionedTableWriter<PartitionWriter>
impl<PartitionWriter> Sync for U16PartitionedTableWriter<PartitionWriter>where
PartitionWriter: Sync,
impl<PartitionWriter> Unpin for U16PartitionedTableWriter<PartitionWriter>where
PartitionWriter: Unpin,
impl<PartitionWriter> UnsafeUnpin for U16PartitionedTableWriter<PartitionWriter>
impl<PartitionWriter> UnwindSafe for U16PartitionedTableWriter<PartitionWriter>where
PartitionWriter: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more