pub struct ColumnSelection<'a> { /* private fields */ }Expand description
Select already-computed columns without evaluating expressions again.
This is intentionally distinct from crate::Project: SQL ORDER BY
may reference both source columns and SELECT aliases, so the expression
projection first appends aliases, Sort consumes that augmented row, and
ColumnSelection removes the non-output source columns afterwards. Volatile
projection expressions are therefore evaluated exactly once.
Implementations§
Source§impl<'a> ColumnSelection<'a>
impl<'a> ColumnSelection<'a>
pub fn new(child: Box<dyn PhysicalOperator + 'a>, columns: Vec<String>) -> Self
pub fn with_mapping( child: Box<dyn PhysicalOperator + 'a>, columns: Vec<(String, String)>, ) -> Self
Sourcepub fn with_positions(
child: Box<dyn PhysicalOperator + 'a>,
columns: Vec<(String, usize)>,
) -> Self
pub fn with_positions( child: Box<dyn PhysicalOperator + 'a>, columns: Vec<(String, usize)>, ) -> Self
Select and rename logical input positions without resolving them by name. SQL result shaping uses this when repeated public labels must remain distinct even though their qualified input names differ.
Sourcepub fn with_identities(
child: Box<dyn PhysicalOperator + 'a>,
columns: Vec<(String, ColumnIdentity, usize)>,
) -> Self
pub fn with_identities( child: Box<dyn PhysicalOperator + 'a>, columns: Vec<(String, ColumnIdentity, usize)>, ) -> Self
Select logical input positions and assign explicit structured SQL identities without encoding qualifiers into output labels.
Sourcepub fn compacting_with_positions(
child: Box<dyn PhysicalOperator + 'a>,
columns: Vec<(String, usize)>,
) -> Self
pub fn compacting_with_positions( child: Box<dyn PhysicalOperator + 'a>, columns: Vec<(String, usize)>, ) -> Self
Select logical input positions and compact them to one canonical positional layout. Use this only at an explicit state boundary, such as recursive working-table materialization, where independently planned inputs must share an identical physical schema.
Sourcepub fn rebinding_lock_origins(self, qualifier: impl Into<String>) -> Self
pub fn rebinding_lock_origins(self, qualifier: impl Into<String>) -> Self
Attribute inner lock origins to this source qualifier so FOR UPDATE OF a view, CTE, or subquery does not lock sibling join inputs.
Sourcepub fn discarding_lock_origins(self) -> Self
pub fn discarding_lock_origins(self) -> Self
Remove row-lock identities at a relational row-identity barrier.
Trait Implementations§
Source§impl PhysicalOperator for ColumnSelection<'_>
impl PhysicalOperator for ColumnSelection<'_>
Source§fn row_schema(&self) -> &RowSchema
fn row_schema(&self) -> &RowSchema
Batch returned by Self::next must carry this exact schema; operators must reject a child that violates that invariant.Source§fn estimated_cardinality(&self) -> Option<u64>
fn estimated_cardinality(&self) -> Option<u64>
None means the operator cannot provide a useful estimate. The value
is advisory rather than a correctness bound.Source§fn output_ordering(&self) -> &[PhysicalOrder]
fn output_ordering(&self) -> &[PhysicalOrder]
fn open(&mut self) -> ExecResult<()>
fn next(&mut self) -> ExecResult<Option<Batch>>
fn close(&mut self) -> ExecResult<()>
Source§fn consume_into_aggregate(
&mut self,
_executor: &mut dyn AggregateExecutor,
) -> ExecResult<bool>
fn consume_into_aggregate( &mut self, _executor: &mut dyn AggregateExecutor, ) -> ExecResult<bool>
false promises that no input was
consumed, so the caller can fall back to ordinary Batch pulls.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ColumnSelection<'a>
impl<'a> !Sync for ColumnSelection<'a>
impl<'a> !UnwindSafe for ColumnSelection<'a>
impl<'a> Freeze for ColumnSelection<'a>
impl<'a> Send for ColumnSelection<'a>
impl<'a> Unpin for ColumnSelection<'a>
impl<'a> UnsafeUnpin for ColumnSelection<'a>
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
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