pub struct LimitedDistinctAggregation {}Expand description
An optimizer rule that passes a limit hint into grouped aggregations which don’t require all
rows in the group to be processed for correctness. Example queries fitting this description are:
SELECT distinct l_orderkey FROM lineitem LIMIT 10;SELECT l_orderkey FROM lineitem GROUP BY l_orderkey LIMIT 10;
Implementations§
Source§impl LimitedDistinctAggregation
impl LimitedDistinctAggregation
fn transform_agg( aggr: &AggregateExec, limit: usize, ) -> Option<Arc<dyn ExecutionPlan>>
Sourcefn transform_limit(
plan: Arc<dyn ExecutionPlan>,
) -> Option<Arc<dyn ExecutionPlan>>
fn transform_limit( plan: Arc<dyn ExecutionPlan>, ) -> Option<Arc<dyn ExecutionPlan>>
transform_limit matches an AggregateExec as the child of a LocalLimitExec
or GlobalLimitExec and pushes the limit into the aggregation as a soft limit when
there is a group by, but no sorting, no aggregate expressions, and no filters in the
aggregation
Trait Implementations§
Source§impl Debug for LimitedDistinctAggregation
impl Debug for LimitedDistinctAggregation
Source§impl Default for LimitedDistinctAggregation
impl Default for LimitedDistinctAggregation
Source§impl PhysicalOptimizerRule for LimitedDistinctAggregation
impl PhysicalOptimizerRule for LimitedDistinctAggregation
Source§fn optimize(
&self,
plan: Arc<dyn ExecutionPlan>,
config: &ConfigOptions,
) -> Result<Arc<dyn ExecutionPlan>>
fn optimize( &self, plan: Arc<dyn ExecutionPlan>, config: &ConfigOptions, ) -> Result<Arc<dyn ExecutionPlan>>
Rewrite
plan to an optimized formSource§fn schema_check(&self) -> bool
fn schema_check(&self) -> bool
A flag to indicate whether the physical planner should validate that the rule will not
change the schema of the plan after the rewriting.
Some of the optimization rules might change the nullable properties of the schema
and should disable the schema check.
Auto Trait Implementations§
impl Freeze for LimitedDistinctAggregation
impl RefUnwindSafe for LimitedDistinctAggregation
impl Send for LimitedDistinctAggregation
impl Sync for LimitedDistinctAggregation
impl Unpin for LimitedDistinctAggregation
impl UnwindSafe for LimitedDistinctAggregation
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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