pub struct ExpressionPlan {
pub scalar: ScalarExpr,
pub subqueries: Vec<QueryPlan>,
}Expand description
Executable scalar IR plus every query-valued descendant it owns.
Fields§
§scalar: ScalarExpr§subqueries: Vec<QueryPlan>Implementations§
Source§impl ExpressionPlan
impl ExpressionPlan
Sourcepub fn lower_borrowed_for_rewrite(
expression: &Expr,
control: &ProductionControl<'_>,
) -> Result<MutableExpressionPlan, SQLError>
pub fn lower_borrowed_for_rewrite( expression: &Expr, control: &ProductionControl<'_>, ) -> Result<MutableExpressionPlan, SQLError>
Lower a borrowed expression and every nested query directly into independently movable owners.
pub fn lower_borrowed_with( expression: &Expr, aggregates: &dyn AggregateClassifier, control: &ProductionControl<'_>, ) -> Result<MutableExpressionPlan, SQLError>
Source§impl ExpressionPlan
impl ExpressionPlan
Sourcepub fn clone_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, SQLError>
pub fn clone_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, SQLError>
Copy a scalar expression and its owned query arena under the same production allowance.
Source§impl ExpressionPlan
impl ExpressionPlan
pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<MutableExpressionPlan, SQLError>
Source§impl ExpressionPlan
impl ExpressionPlan
Sourcepub fn upgrade_legacy_range_predicates(&mut self) -> Result<bool, SQLError>
pub fn upgrade_legacy_range_predicates(&mut self) -> Result<bool, SQLError>
Normalize predecessor range nodes while retaining bindings and assigning independent subquery slots to repeated operands.
pub fn lower(expression: Expr) -> Self
pub fn lower_with( expression: Expr, aggregates: &dyn AggregateClassifier, ) -> Self
Source§impl ExpressionPlan
impl ExpressionPlan
Sourcepub fn lower_scalar_for_rewrite(
expression: &Expr,
control: &ProductionControl<'_>,
) -> Result<OwnedScalarExpr, CatalogRetentionError>
pub fn lower_scalar_for_rewrite( expression: &Expr, control: &ProductionControl<'_>, ) -> Result<OwnedScalarExpr, CatalogRetentionError>
Lower borrowed scalar syntax directly into a mutable owner. Every child retains its own allocation lease, so subsequent selection or replacement releases discarded payloads without copying the completed scalar tree. Query children retain the scalar-only lowerer’s rejection behavior.
Source§impl ExpressionPlan
impl ExpressionPlan
Sourcepub fn lower_scalar_with_control(
expression: &Expr,
control: &ProductionControl<'_>,
) -> Result<Produced<ScalarExpr>, CatalogRetentionError>
pub fn lower_scalar_with_control( expression: &Expr, control: &ProductionControl<'_>, ) -> Result<Produced<ScalarExpr>, CatalogRetentionError>
Lower a borrowed scalar-only expression with destination admission. A query child is reported before publication so callers can decline scalar-only transformations without constructing an unowned query arena.
Sourcepub fn lower_column_budgeted(
expression: &Expr,
budget: &MemoryBudget,
original: &CancellationToken,
invoking: &CancellationToken,
) -> Result<Budgeted<ScalarExpr>, CatalogRetentionError>
pub fn lower_column_budgeted( expression: &Expr, budget: &MemoryBudget, original: &CancellationToken, invoking: &CancellationToken, ) -> Result<Budgeted<ScalarExpr>, CatalogRetentionError>
Lower a borrowed, validated column expression directly into admitted scalar IR. Destination strings, value payloads, bindings, vector capacities and boxes acquire the supplied allowance before allocation, and the result retains those leases. Both the retained definition’s original cancellation and the invoking reader’s cancellation remain active during lowering. This controls AST-to-IR production only; subsequent type binding and evaluation require their own resource contracts. Query children violate the validated column-expression invariant.
Trait Implementations§
Source§impl Clone for ExpressionPlan
impl Clone for ExpressionPlan
Source§impl Debug for ExpressionPlan
impl Debug for ExpressionPlan
Source§impl<'de> Deserialize<'de> for ExpressionPlan
impl<'de> Deserialize<'de> for ExpressionPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl ObserveAllocations for ExpressionPlan
impl ObserveAllocations for ExpressionPlan
fn observe_allocations<'a>( &'a self, observer: &mut AllocationObserver<'a, '_>, ) -> Result<(), ValueRetentionError>
Auto Trait Implementations§
impl !RefUnwindSafe for ExpressionPlan
impl !UnwindSafe for ExpressionPlan
impl Freeze for ExpressionPlan
impl Send for ExpressionPlan
impl Sync for ExpressionPlan
impl Unpin for ExpressionPlan
impl UnsafeUnpin for ExpressionPlan
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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