pub struct LazyFactorizedChainOperator { /* private fields */ }Expand description
A lazy operator that executes a factorized expand chain when next() is called.
Unlike FactorizedExpandChain which executes immediately during construction,
this operator defers execution until query runtime. This is critical for
correctness when filters are applied above the expand chain.
§Factorized Aggregation Support
This operator supports returning factorized results via next_factorized().
When the downstream operator can handle factorized data (e.g., factorized
aggregation), this avoids flattening and provides massive speedups.
Implementations§
Source§impl LazyFactorizedChainOperator
impl LazyFactorizedChainOperator
Sourcepub fn new(
store: Arc<LpgStore>,
source: Box<dyn Operator>,
steps: Vec<ExpandStep>,
) -> Self
pub fn new( store: Arc<LpgStore>, source: Box<dyn Operator>, steps: Vec<ExpandStep>, ) -> Self
Creates a new lazy factorized chain operator.
Sourcepub fn with_tx_context(self, epoch: EpochId, tx_id: Option<TxId>) -> Self
pub fn with_tx_context(self, epoch: EpochId, tx_id: Option<TxId>) -> Self
Sets the transaction context for MVCC visibility.
Sourcepub fn next_factorized(&mut self) -> FactorizedResult
pub fn next_factorized(&mut self) -> FactorizedResult
Returns the factorized result without flattening.
Use this when the next operator can handle factorized data (e.g., factorized aggregation). This is the key to 10-100x speedups for aggregate queries on multi-hop traversals.
§Returns
The factorized chunk, or None if exhausted or no results.
Trait Implementations§
Source§impl FactorizedOperator for LazyFactorizedChainOperator
impl FactorizedOperator for LazyFactorizedChainOperator
Source§fn next_factorized(&mut self) -> FactorizedResult
fn next_factorized(&mut self) -> FactorizedResult
Auto Trait Implementations§
impl Freeze for LazyFactorizedChainOperator
impl !RefUnwindSafe for LazyFactorizedChainOperator
impl Send for LazyFactorizedChainOperator
impl Sync for LazyFactorizedChainOperator
impl Unpin for LazyFactorizedChainOperator
impl !UnwindSafe for LazyFactorizedChainOperator
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
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