pub struct QueryBlockPlan {Show 20 fields
pub deferred_outer_rewrites: Vec<DeferredOuterRewrite>,
pub windows: Vec<WindowDefinition<ScalarWindowSpec>>,
pub projections: Vec<ProjectionPlan>,
pub privilege_columns: OwnedSet<ColumnIdentity>,
pub from: Option<SourcePlan>,
pub where: Option<ScalarExpr>,
pub compute: ComputePlan,
pub group_by: Vec<ScalarExpr>,
pub grouping_sets: Vec<Vec<ScalarExpr>>,
pub group_distinct: bool,
pub having: Option<ScalarExpr>,
pub order_by: Vec<OrderPlan>,
pub limit: Option<ScalarExpr>,
pub with_ties: bool,
pub offset: Option<ScalarExpr>,
pub distinct: bool,
pub distinct_on: Vec<ScalarExpr>,
pub subqueries: Vec<QueryPlan>,
pub access: AccessPathPlan,
pub locking: Vec<LockingClause>,
}Expand description
One SELECT block after WITH and set-operation structure has been pulled
into explicit parent/child nodes.
Fields§
§deferred_outer_rewrites: Vec<DeferredOuterRewrite>Transient outer-column substitutions whose local namespace is supplied by a runtime row descriptor. Stored syntax never retains an execution’s view rewrite.
windows: Vec<WindowDefinition<ScalarWindowSpec>>The canonical owners of window inputs; calls keep resolved execution copies.
projections: Vec<ProjectionPlan>§privilege_columns: OwnedSet<ColumnIdentity>Analyzed column reads retained when unused outputs are removed. These names authorize access but never evaluate the discarded values.
from: Option<SourcePlan>§where: Option<ScalarExpr>§compute: ComputePlan§group_by: Vec<ScalarExpr>§grouping_sets: Vec<Vec<ScalarExpr>>§group_distinct: bool§having: Option<ScalarExpr>§order_by: Vec<OrderPlan>§limit: Option<ScalarExpr>§with_ties: bool§offset: Option<ScalarExpr>§distinct: bool§distinct_on: Vec<ScalarExpr>§subqueries: Vec<QueryPlan>§access: AccessPathPlan§locking: Vec<LockingClause>FOR UPDATE / FOR SHARE clauses belonging to this query block.
Implementations§
Source§impl QueryBlockPlan
impl QueryBlockPlan
Sourcepub fn clone_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, SQLError>
pub fn clone_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, SQLError>
Retain an immutable physical recheck input under the invoking request’s allowance.
Source§impl QueryBlockPlan
impl QueryBlockPlan
Sourcepub fn copy_for_rewrite(
&self,
control: &ProductionControl<'_>,
) -> Result<MutableQueryPlan, SQLError>
pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<MutableQueryPlan, SQLError>
Construct an independent mutable query root from a retained block, admitting every scalar and structural destination before copying. The enclosing query has no CTE or relation flags until its caller installs the root in its original scope.
Source§impl QueryBlockPlan
impl QueryBlockPlan
Sourcepub fn compute_kind(&self, aggregates: &dyn AggregateClassifier) -> ComputePlan
pub fn compute_kind(&self, aggregates: &dyn AggregateClassifier) -> ComputePlan
Select the computation before output-demand rewrites remove unobserved aggregate values.
pub fn compute_kind_with_control( &self, aggregates: &dyn AggregateClassifier, control: &ProductionControl<'_>, ) -> Result<ComputePlan, SQLError>
Source§impl QueryBlockPlan
impl QueryBlockPlan
Sourcepub fn is_single_expression(&self) -> bool
pub fn is_single_expression(&self) -> bool
One scalar SELECT with no relational clauses or subplans. The caller must also reject set-returning routines using its selected catalog.
Source§impl QueryBlockPlan
impl QueryBlockPlan
Sourcepub fn expressions(&self) -> Vec<&ScalarExpr>
pub fn expressions(&self) -> Vec<&ScalarExpr>
Expression nodes evaluated while executing this query block. Query
bodies under FROM (SELECT ...) are excluded because their child plan
installs its own expression scope when it executes.
Sourcepub fn visit_expressions<'a>(&'a self, visit: &mut dyn FnMut(&'a ScalarExpr))
pub fn visit_expressions<'a>(&'a self, visit: &mut dyn FnMut(&'a ScalarExpr))
Borrow direct source roots followed by this query’s own roots. Derived-query bodies and scalar-query arenas keep their separate namespaces.
Sourcepub fn try_visit_expressions<'a, E>(
&'a self,
visit: &mut dyn FnMut(&'a ScalarExpr) -> Result<bool, E>,
) -> Result<bool, E>
pub fn try_visit_expressions<'a, E>( &'a self, visit: &mut dyn FnMut(&'a ScalarExpr) -> Result<bool, E>, ) -> Result<bool, E>
Visit direct expression roots in initialization order. Return false when the callback stops successfully; an error also stops before the next root.
Sourcepub fn query_expressions(&self) -> impl Iterator<Item = &ScalarExpr>
pub fn query_expressions(&self) -> impl Iterator<Item = &ScalarExpr>
Expressions at this query level, excluding FROM-item inputs and join conditions, which have their own namespaces.
Trait Implementations§
Source§impl AsRef<QueryBlockPlan> for ExecutionQueryBlock<'_>
impl AsRef<QueryBlockPlan> for ExecutionQueryBlock<'_>
Source§fn as_ref(&self) -> &QueryBlockPlan
fn as_ref(&self) -> &QueryBlockPlan
Source§impl Clone for QueryBlockPlan
impl Clone for QueryBlockPlan
Source§impl Debug for QueryBlockPlan
impl Debug for QueryBlockPlan
Source§impl<'de> Deserialize<'de> for QueryBlockPlan
impl<'de> Deserialize<'de> for QueryBlockPlan
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 QueryBlockPlan
impl ObserveAllocations for QueryBlockPlan
fn observe_allocations<'a>( &'a self, observer: &mut AllocationObserver<'a, '_>, ) -> Result<(), ValueRetentionError>
Auto Trait Implementations§
impl !RefUnwindSafe for QueryBlockPlan
impl !UnwindSafe for QueryBlockPlan
impl Freeze for QueryBlockPlan
impl Send for QueryBlockPlan
impl Sync for QueryBlockPlan
impl Unpin for QueryBlockPlan
impl UnsafeUnpin for QueryBlockPlan
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