pub trait AggregateExecutor: Send {
// Required methods
fn consume(&mut self, batch: Batch) -> ExecResult<()>;
fn finish(&mut self) -> ExecResult<SpillBuffer>;
// Provided methods
fn supports_projected_rows(&self) -> bool { ... }
fn supports_storage_borrowed_rows(&self) -> bool { ... }
fn consume_projected_row(
&mut self,
_row: &ProjectedRow<'_, '_>,
) -> ExecResult<()> { ... }
}Expand description
Blocking group-by + aggregate. Pulls every row from the child
during open, hashes each row by its group key, and folds the
aggregates over each group’s row set. Groups are emitted in the
order they were first observed.
Required Methods§
Sourcefn consume(&mut self, batch: Batch) -> ExecResult<()>
fn consume(&mut self, batch: Batch) -> ExecResult<()>
Consume one child batch. Implementations that need a blocking input must enforce their own byte budget here; the physical operator never creates an unbounded intermediate row vector.
Sourcefn finish(&mut self) -> ExecResult<SpillBuffer>
fn finish(&mut self) -> ExecResult<SpillBuffer>
Finalize all groups into a byte-bounded, disk-backed output stream. The row-oriented SQL API may materialize that stream at its public API boundary, but physical operators must not create an unbounded result vector first.
Provided Methods§
Sourcefn supports_projected_rows(&self) -> bool
fn supports_projected_rows(&self) -> bool
Whether this executor can fold a borrowed, positional row without a
materialized ResultRow. A source checks this before advancing.
Sourcefn supports_storage_borrowed_rows(&self) -> bool
fn supports_storage_borrowed_rows(&self) -> bool
Whether projected-row consumption is guaranteed not to call back into the engine while a storage backend lends its row values. Sources use this stricter capability before invoking an executor under a backend read borrow.
Sourcefn consume_projected_row(
&mut self,
_row: &ProjectedRow<'_, '_>,
) -> ExecResult<()>
fn consume_projected_row( &mut self, _row: &ProjectedRow<'_, '_>, ) -> ExecResult<()>
Fold one projected row. Implementations advertising support must
preserve the same expression and aggregate semantics as Self::consume.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".