pub struct LoweredAggregateBuilder<'a> { /* private fields */ }Expand description
Builder for converting a logical aggregate Expr into physical aggregate
planning pieces.
This builder handles the logical-to-physical work needed for aggregate
planning: unwrapping aggregate aliases, choosing the output name, preserving
user-facing display text, lowering aggregate arguments, lowering the optional
filter, and lowering aggregate ORDER BY expressions.
Implementations§
Source§impl<'a> LoweredAggregateBuilder<'a>
impl<'a> LoweredAggregateBuilder<'a>
Sourcepub fn new(
expr: &'a Expr,
logical_input_schema: &'a DFSchema,
physical_input_schema: &'a Schema,
execution_props: &'a ExecutionProps,
) -> Self
pub fn new( expr: &'a Expr, logical_input_schema: &'a DFSchema, physical_input_schema: &'a Schema, execution_props: &'a ExecutionProps, ) -> Self
Create a builder for lowering expr.
logical_input_schema is used to resolve logical expressions such as
columns, while physical_input_schema is the input schema used by the
physical aggregate expression.
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
Override the output column name for the aggregate.
If this is not set, the builder uses the alias from expr when present,
or derives the physical name from the aggregate expression.
Sourcepub fn with_human_display(self, human_display: impl Into<String>) -> Self
pub fn with_human_display(self, human_display: impl Into<String>) -> Self
Override the human-readable display text for the aggregate.
This is useful when a caller has already computed the exact display text it wants to preserve. When this override is used, aliases with metadata are still unwrapped for planning, but alias metadata is not copied to the aggregate output field.
Sourcepub fn build(self) -> Result<LoweredAggregate>
pub fn build(self) -> Result<LoweredAggregate>
Lower the logical aggregate expression into physical aggregate pieces.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LoweredAggregateBuilder<'a>
impl<'a> !UnwindSafe for LoweredAggregateBuilder<'a>
impl<'a> Freeze for LoweredAggregateBuilder<'a>
impl<'a> Send for LoweredAggregateBuilder<'a>
impl<'a> Sync for LoweredAggregateBuilder<'a>
impl<'a> Unpin for LoweredAggregateBuilder<'a>
impl<'a> UnsafeUnpin for LoweredAggregateBuilder<'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
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