pub struct MaterializedView {
pub expr: Expr,
pub result: Series,
pub base_snapshot: EvalContext,
}Expand description
The last successful evaluation and its source context.
Self::apply_delta validates append hints and refreshes the full result
atomically. Publicly mutable cache fields do not establish that a delta
can be evaluated independently.
Fields§
§expr: Expr§result: Series§base_snapshot: EvalContextImplementations§
Source§impl MaterializedView
impl MaterializedView
pub fn from_full_eval( expr: &Expr, context: &EvalContext, policy: &RuntimePolicy, ledger: &mut EvidenceLedger, ) -> Result<Self, ExprError>
Sourcepub fn apply_delta(
&mut self,
delta: &Delta,
context: &EvalContext,
policy: &RuntimePolicy,
ledger: &mut EvidenceLedger,
) -> Result<&Series, ExprError>
pub fn apply_delta( &mut self, delta: &Delta, context: &EvalContext, policy: &RuntimePolicy, ledger: &mut EvidenceLedger, ) -> Result<&Series, ExprError>
Refresh the view from the authoritative updated context.
context must contain the complete current inputs, including appended
rows. The delta is a validated append hint, not a replacement context.
The expression and cache fields are publicly mutable, so the hint alone cannot prove that previously computed rows remain valid. Recompute the full result for now; this costs a full evaluation per update but preserves source dtype, index metadata, local bindings, and runtime-policy behavior. A failed validation or evaluation leaves both cached fields unchanged.
Trait Implementations§
Source§impl Clone for MaterializedView
impl Clone for MaterializedView
Auto Trait Implementations§
impl !Freeze for MaterializedView
impl !RefUnwindSafe for MaterializedView
impl !UnwindSafe for MaterializedView
impl Forget for MaterializedView
impl Move for MaterializedView
impl Send for MaterializedView
impl Sync for MaterializedView
impl Unpin for MaterializedView
impl UnsafeUnpin for MaterializedView
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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