Skip to main content

CowBatchRewriter

Trait CowBatchRewriter 

Source
pub trait CowBatchRewriter: Send + Sync {
    // Required method
    fn rewrite_batch(&self, batch: RecordBatch) -> Result<CowBatchRewrite>;
}
Expand description

Rewrites record batches for copy-on-write operations.

rewrite_batch is synchronous: it runs on the async runtime thread that drives the read/write pipeline, so implementations must not perform blocking work — async I/O such as catalog enrichment or cross-table lookups is not supported in this contract. The method stays sync (rather than returning a boxed future) so the trait remains object safe for Arc<dyn CowBatchRewriter>.

Required Methods§

Source

fn rewrite_batch(&self, batch: RecordBatch) -> Result<CowBatchRewrite>

Rewrites a record batch and reports whether it changed.

output: None means the batch is fully removed, which is itself a change: the orchestrator treats it as changed regardless of the changed flag, so a rewriter cannot accidentally keep dropped rows alive by reporting changed: false alongside a None output.

Implementors§