pub struct FactorizedAggregateOperator { /* private fields */ }Expand description
An aggregate operator that works directly on factorized data.
This operator takes a LazyFactorizedChainOperator as input and computes
aggregates without flattening. This is the key to achieving 10-100x speedups
for aggregate queries on multi-hop traversals.
§Example
ⓘ
// Query: MATCH (a)->(b)->(c) RETURN COUNT(*)
let expand_chain = LazyFactorizedChainOperator::new(store, scan, steps);
let agg = FactorizedAggregateOperator::new(expand_chain, vec![FactorizedAggregate::count()]);
// Returns a single row with the count, computed in O(n) instead of O(n²)Implementations§
Source§impl FactorizedAggregateOperator
impl FactorizedAggregateOperator
Sourcepub fn new(
input: LazyFactorizedChainOperator,
aggregates: Vec<FactorizedAggregate>,
) -> Self
pub fn new( input: LazyFactorizedChainOperator, aggregates: Vec<FactorizedAggregate>, ) -> Self
Creates a new factorized aggregate operator.
§Arguments
input- The input operator (typically aLazyFactorizedChainOperator)aggregates- The aggregates to compute
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FactorizedAggregateOperator
impl !RefUnwindSafe for FactorizedAggregateOperator
impl Send for FactorizedAggregateOperator
impl Sync for FactorizedAggregateOperator
impl Unpin for FactorizedAggregateOperator
impl !UnwindSafe for FactorizedAggregateOperator
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