pub struct CowRewriteBuilder<'a> { /* private fields */ }Expand description
Builder for orchestrating copy-on-write data file rewrites.
Implementations§
Source§impl<'a> CowRewriteBuilder<'a>
impl<'a> CowRewriteBuilder<'a>
Sourcepub fn with_predicate(self, predicate: Predicate) -> Self
pub fn with_predicate(self, predicate: Predicate) -> Self
Sets the row predicate used to plan candidate files.
Sourcepub fn with_snapshot_id(self, snapshot_id: i64) -> Self
pub fn with_snapshot_id(self, snapshot_id: i64) -> Self
Sets the snapshot id used to plan candidate files.
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Sets the Arrow reader batch size.
Sourcepub fn with_case_sensitive(self, case_sensitive: bool) -> Self
pub fn with_case_sensitive(self, case_sensitive: bool) -> Self
Sets the case sensitivity used to bind the planning predicate.
Sourcepub fn with_rewriter(self, rewriter: Arc<dyn CowBatchRewriter>) -> Self
pub fn with_rewriter(self, rewriter: Arc<dyn CowBatchRewriter>) -> Self
Sets the record batch rewriter.
Sourcepub async fn rewrite(self) -> Result<CowRewriteResult>
pub async fn rewrite(self) -> Result<CowRewriteResult>
Plans, reads, rewrites, and writes replacement data files.
§Memory usage
Batches read before a file’s first changed batch are buffered so that no replacement file is emitted for a source file that turns out unchanged. A file that never changes — or whose first change sits at its very end — therefore buffers its entire decoded contents in memory. Files are processed sequentially, so peak usage is one decoded source file at a time, but that can still be several GB for a compaction-sized file. A size-capped fallback that starts writing the replacement once the buffer crosses a threshold is left for follow-up work.
Auto Trait Implementations§
impl<'a> Freeze for CowRewriteBuilder<'a>
impl<'a> !RefUnwindSafe for CowRewriteBuilder<'a>
impl<'a> Send for CowRewriteBuilder<'a>
impl<'a> Sync for CowRewriteBuilder<'a>
impl<'a> Unpin for CowRewriteBuilder<'a>
impl<'a> UnsafeUnpin for CowRewriteBuilder<'a>
impl<'a> !UnwindSafe for CowRewriteBuilder<'a>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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