| Package | Description |
|---|---|
| io.prestosql.sql.planner | |
| io.prestosql.sql.planner.iterative | |
| io.prestosql.sql.planner.iterative.rule |
| Modifier and Type | Method and Description |
|---|---|
void |
RuleStatsRecorder.record(Rule<?> rule,
long nanos,
boolean match) |
void |
RuleStatsRecorder.recordFailure(Rule<?> rule) |
| Modifier and Type | Method and Description |
|---|---|
void |
RuleStatsRecorder.registerAll(Collection<Rule<?>> rules) |
| Modifier and Type | Method and Description |
|---|---|
Stream<Rule<?>> |
RuleIndex.getCandidates(Object object) |
| Modifier and Type | Method and Description |
|---|---|
RuleIndex.Builder |
RuleIndex.Builder.register(Rule<?> rule) |
| Modifier and Type | Method and Description |
|---|---|
RuleIndex.Builder |
RuleIndex.Builder.register(Set<Rule<?>> rules) |
| Constructor and Description |
|---|
IterativeOptimizer(RuleStatsRecorder stats,
StatsCalculator statsCalculator,
CostCalculator costCalculator,
List<PlanOptimizer> legacyRules,
Set<Rule<?>> newRules) |
IterativeOptimizer(RuleStatsRecorder stats,
StatsCalculator statsCalculator,
CostCalculator costCalculator,
Set<Rule<?>> rules) |
| Modifier and Type | Class and Description |
|---|---|
class |
AddIntermediateAggregations
Adds INTERMEDIATE aggregations between an un-grouped FINAL aggregation and its preceding
PARTIAL aggregation.
|
class |
CreatePartialTopN |
class |
DetermineJoinDistributionType |
class |
DetermineSemiJoinDistributionType
This rule must run after the distribution type has already been set for delete queries,
since semi joins in delete queries must be replicated.
|
class |
EliminateCrossJoins |
class |
EvaluateZeroSample
Replaces 0% sample node with empty values node.
|
static class |
ExtractSpatialJoins.ExtractSpatialInnerJoin |
static class |
ExtractSpatialJoins.ExtractSpatialLeftJoin |
static class |
GatherAndMergeWindows.MergeAdjacentWindowsOverProjects |
static class |
GatherAndMergeWindows.SwapAdjacentWindowsBySpecifications |
class |
ImplementBernoulliSampleAsFilter
Transforms:
|
class |
ImplementFilteredAggregations
Implements filtered aggregations by transforming plans of the following shape:
|
class |
ImplementOffset
Transforms:
|
class |
InlineProjections
Inlines expressions from a child project node into a parent project node
as long as they are simple constants, or they are referenced only once (to
avoid introducing duplicate computation) and the references don't appear
within a TRY block (to avoid changing semantics).
|
class |
MergeFilters |
class |
MergeLimitOverProjectWithSort
Transforms:
|
class |
MergeLimits |
class |
MergeLimitWithDistinct |
class |
MergeLimitWithSort |
class |
MergeLimitWithTopN |
class |
MultipleDistinctAggregationToMarkDistinct
Implements distinct aggregations with different inputs by transforming plans of the following shape:
|
class |
ProjectOffPushDownRule<N extends PlanNode> |
class |
PruneAggregationColumns |
class |
PruneAggregationSourceColumns |
class |
PruneCountAggregationOverScalar
A count over a subquery can be reduced to a VALUES(1) provided
the subquery is a scalar
|
class |
PruneCrossJoinColumns
Cross joins don't support output symbol selection, so push the project-off through the node.
|
class |
PruneFilterColumns |
class |
PruneIndexSourceColumns |
class |
PruneJoinChildrenColumns
Non-Cross joins support output symbol selection, so make any project-off of child columns explicit in project nodes.
|
class |
PruneJoinColumns
Non-cross joins support output symbol selection, so absorb any project-off into the node.
|
class |
PruneLimitColumns |
class |
PruneMarkDistinctColumns |
class |
PruneOrderByInAggregation |
class |
PruneOutputColumns |
class |
PruneProjectColumns |
class |
PruneSemiJoinColumns |
class |
PruneSemiJoinFilteringSourceColumns |
class |
PruneTableScanColumns |
class |
PruneTopNColumns |
class |
PruneValuesColumns |
class |
PruneWindowColumns |
class |
PushAggregationThroughOuterJoin
This optimizer pushes aggregations below outer joins when: the aggregation
is on top of the outer join, it groups by all columns in the outer table, and
the outer rows are guaranteed to be distinct.
|
class |
PushLimitIntoTableScan |
class |
PushLimitThroughMarkDistinct |
class |
PushLimitThroughOffset
Transforms:
|
class |
PushLimitThroughOuterJoin
Transforms:
|
class |
PushLimitThroughProject |
class |
PushLimitThroughSemiJoin |
class |
PushLimitThroughUnion
Transforms:
|
class |
PushOffsetThroughProject
Transforms:
|
class |
PushPartialAggregationThroughExchange |
class |
PushPartialAggregationThroughJoin |
class |
PushPredicateIntoTableScan
These rules should not be run after AddExchanges so as not to overwrite the TableLayout
chosen by AddExchanges
|
class |
PushProjectionThroughExchange
Transforms:
|
class |
PushProjectionThroughUnion |
class |
PushRemoteExchangeThroughAssignUniqueId
Pushes RemoteExchange node down through the AssignUniqueId to preserve
partitioned_on(unique) and grouped(unique) properties for the output of
the AssignUniqueId.
|
class |
PushSampleIntoTableScan |
class |
PushTableWriteThroughUnion |
class |
PushTopNThroughOuterJoin
Transforms:
|
class |
PushTopNThroughProject
Transforms:
|
class |
PushTopNThroughUnion |
class |
RemoveAggregationInSemiJoin
Remove the aggregation node that produces distinct rows from the Filtering source of a Semi join.
|
class |
RemoveEmptyDelete
If the predicate for a delete is optimized to false, the target table scan
of the delete will be replaced with an empty values node.
|
class |
RemoveFullSample
Removes 100% sample nodes.
|
class |
RemoveRedundantDistinctLimit
Replace DistinctLimit node
1.
|
class |
RemoveRedundantIdentityProjections
Removes projection nodes that only perform non-renaming identity projections
|
class |
RemoveRedundantLimit
Remove Limit node when the subplan is guaranteed to produce fewer rows than the limit and
replace the plan with empty values if the limit count is 0.
|
class |
RemoveRedundantSort |
class |
RemoveRedundantTopN
Replace TopN node
1.
|
class |
RemoveTrivialFilters |
class |
RemoveUnreferencedScalarApplyNodes |
class |
RemoveUnreferencedScalarLateralNodes |
class |
ReorderJoins |
class |
RewriteSpatialPartitioningAggregation
Re-writes spatial_partitioning(geometry) aggregations into spatial_partitioning(envelope, partition_count)
on top of ST_Envelope(geometry) projection, e.g.
|
class |
SimplifyCountOverConstant |
class |
SingleDistinctAggregationToGroupBy
Implements distinct aggregations with similar inputs by transforming plans of the following shape:
|
class |
TransformCorrelatedInPredicateToJoin
Replaces correlated ApplyNode with InPredicate expression with SemiJoin
|
class |
TransformCorrelatedLateralJoinToJoin
Tries to decorrelate subquery and rewrite it using normal join.
|
class |
TransformCorrelatedScalarAggregationToJoin
Scalar aggregation is aggregation with GROUP BY 'a constant' (or empty GROUP BY).
|
class |
TransformCorrelatedScalarSubquery
Scalar filter scan query is something like:
|
class |
TransformCorrelatedSingleRowSubqueryToProject
This optimizer can rewrite correlated single row subquery to projection in a way described here:
From:
|
class |
TransformExistsApplyToLateralNode
EXISTS is modeled as (if correlated predicates are equality comparisons):
|
class |
TransformUncorrelatedInPredicateSubqueryToSemiJoin
This optimizers looks for InPredicate expressions in ApplyNodes and replaces the nodes with SemiJoin nodes.
|
class |
TransformUncorrelatedLateralToJoin |
| Modifier and Type | Method and Description |
|---|---|
Rule<?> |
ExpressionRewriteRuleSet.aggregationExpressionRewrite() |
Rule<?> |
ExpressionRewriteRuleSet.applyExpressionRewrite() |
static Rule<ExchangeNode> |
PreconditionRules.checkRulesAreFiredBeforeAddExchangesRule() |
Rule<?> |
ExpressionRewriteRuleSet.filterExpressionRewrite() |
Rule<?> |
ExpressionRewriteRuleSet.joinExpressionRewrite() |
Rule<?> |
ExpressionRewriteRuleSet.projectExpressionRewrite() |
Rule<?> |
ExpressionRewriteRuleSet.valuesExpressionRewrite() |
| Modifier and Type | Method and Description |
|---|---|
Set<Rule<?>> |
SimplifyExpressions.rules() |
Set<Rule<?>> |
DesugarLambdaExpression.rules() |
Set<Rule<?>> |
ExpressionRewriteRuleSet.rules() |
Set<Rule<?>> |
DesugarAtTimeZone.rules() |
Set<Rule<?>> |
AddExchangesBelowPartialAggregationOverGroupIdRuleSet.rules() |
static Set<Rule<?>> |
GatherAndMergeWindows.rules() |
Set<Rule<?>> |
ExtractSpatialJoins.rules() |
Copyright © 2012–2019. All rights reserved.