pub struct AggregationExecutor<'a, H: AggregationHost + ?Sized> { /* private fields */ }Expand description
Single owner for aggregate planning, state, execution and finalization.
Implementations§
Source§impl<'host, H: AggregationHost + ?Sized> AggregationExecutor<'host, H>
impl<'host, H: AggregationHost + ?Sized> AggregationExecutor<'host, H>
Sourcepub fn try_storage_aggregation(
&self,
table: &dyn Table,
stmt: &SelectStatement,
ctx: &ExecutionContext,
all_columns: &[String],
classification: &QueryClassification,
) -> Option<Box<dyn QueryResult>>
pub fn try_storage_aggregation( &self, table: &dyn Table, stmt: &SelectStatement, ctx: &ExecutionContext, all_columns: &[String], classification: &QueryClassification, ) -> Option<Box<dyn QueryResult>>
Try to use storage-level aggregation for GROUP BY queries.
This optimization bypasses row materialization by computing aggregates directly from arena storage using Arc::clone for group keys.
Returns None if the optimization cannot be applied.
Currently only applies to simple queries with:
- GROUP BY columns that match SELECT identifiers exactly (same order)
- Simple aggregates (COUNT, SUM, AVG, MIN, MAX) on column references
- No ROLLUP, CUBE, or GROUPING SETS
- Optional WHERE if it can be fully converted to a storage expression
- Optional HAVING that can be evaluated against the grouped result row
Auto Trait Implementations§
impl<'a, H> Freeze for AggregationExecutor<'a, H>
impl<'a, H> RefUnwindSafe for AggregationExecutor<'a, H>
impl<'a, H> Send for AggregationExecutor<'a, H>
impl<'a, H> Sync for AggregationExecutor<'a, H>
impl<'a, H> Unpin for AggregationExecutor<'a, H>
impl<'a, H> UnsafeUnpin for AggregationExecutor<'a, H>
impl<'a, H> UnwindSafe for AggregationExecutor<'a, H>
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