| Class | Description |
|---|---|
| AbstractJoinExtractFilterRule | |
| AggregateCaseToFilterRule |
Rule that converts CASE-style filtered aggregates into true filtered
aggregates.
|
| AggregateExpandDistinctAggregatesRule |
Planner rule that expands distinct aggregates
(such as
COUNT(DISTINCT x)) from a
Aggregate. |
| AggregateExpandWithinDistinctRule |
Planner rule that rewrites an
Aggregate that contains
WITHIN DISTINCT aggregate functions. |
| AggregateExtractProjectRule | |
| AggregateFilterTransposeRule | |
| AggregateJoinJoinRemoveRule | |
| AggregateJoinRemoveRule | |
| AggregateJoinTransposeRule | |
| AggregateMergeRule | |
| AggregateProjectConstantToDummyJoinRule | |
| AggregateProjectMergeRule | |
| AggregateProjectPullUpConstantsRule |
Planner rule that removes constant keys from an
Aggregate. |
| AggregateProjectStarTableRule |
Variant of
AggregateStarTableRule that accepts a Project
between the Aggregate and its StarTable.StarTableScan
input. |
| AggregateReduceFunctionsRule |
Planner rule that reduces aggregate functions in
Aggregates to simpler forms. |
| AggregateRemoveRule |
Planner rule that removes
a
Aggregate
if it computes no aggregate functions
(that is, it is implementing SELECT DISTINCT),
or all the aggregate functions are splittable,
and the underlying relational expression is already distinct. |
| AggregateStarTableRule |
Planner rule that matches an
Aggregate on
top of a StarTable.StarTableScan. |
| AggregateUnionAggregateRule | |
| AggregateUnionTransposeRule | |
| AggregateValuesRule | |
| CalcMergeRule | |
| CalcRelSplitter | |
| CalcRelSplitter.RelType |
Type of relational expression.
|
| CalcRemoveRule |
Planner rule that removes a trivial
LogicalCalc. |
| CalcSplitRule | |
| CoerceInputsRule |
CoerceInputsRule pre-casts inputs to a particular type.
|
| CoreRules |
Rules that perform logical transformations on relational expressions.
|
| DateRangeRules |
Collection of planner rules that convert
EXTRACT(timeUnit FROM dateTime) = constant,
FLOOR(dateTime to timeUnit = constant} and
CEIL(dateTime to timeUnit = constant} to
dateTime BETWEEN lower AND upper. |
| DateRangeRules.FilterDateRangeRule |
Rule that converts EXTRACT, FLOOR and CEIL in a
Filter into a date
range. |
| EquiJoin | Deprecated |
| ExchangeRemoveConstantKeysRule |
Planner rule that removes keys from
a
Exchange if those keys are known to be constant. |
| FilterAggregateTransposeRule | |
| FilterCalcMergeRule | |
| FilterCorrelateRule | |
| FilterFlattenCorrelatedConditionRule |
Planner rule that matches a
Filter expression with correlated variables, and rewrites the
condition in a simpler form that is more convenient for the decorrelation logic. |
| FilterJoinRule<C extends FilterJoinRule.Config> |
Planner rule that pushes filters above and
within a join node into the join node and/or its children nodes.
|
| FilterJoinRule.FilterIntoJoinRule |
Rule that tries to push filter expressions into a join
condition and into the inputs of the join.
|
| FilterJoinRule.JoinConditionPushRule |
Rule that pushes parts of the join condition to its inputs.
|
| FilterMergeRule |
Planner rule that combines two
LogicalFilters. |
| FilterMultiJoinMergeRule | |
| FilterProjectTransposeRule | |
| FilterRemoveIsNotDistinctFromRule |
Planner rule that replaces
IS NOT DISTINCT FROM
in a Filter with logically equivalent operations. |
| FilterSetOpTransposeRule | |
| FilterTableFunctionTransposeRule |
Planner rule that pushes
a
LogicalFilter
past a LogicalTableFunctionScan. |
| FilterTableScanRule |
Planner rule that converts
a
Filter
on a TableScan
of a FilterableTable
or a ProjectableFilterableTable
to a Bindables.BindableTableScan. |
| FilterToCalcRule |
Planner rule that converts a
LogicalFilter to a
LogicalCalc. |
| IntersectToDistinctRule | |
| JoinAddRedundantSemiJoinRule |
Rule to add a semi-join into a join.
|
| JoinAssociateRule |
Planner rule that changes a join based on the associativity rule.
|
| JoinCommuteRule |
Planner rule that permutes the inputs to a
Join. |
| JoinDeriveIsNotNullFilterRule | |
| JoinExtractFilterRule | |
| JoinProjectTransposeRule |
Planner rule that matches a
Join one of whose inputs is a
LogicalProject, and
pulls the project up. |
| JoinPushExpressionsRule |
Planner rule that pushes down expressions in "equal" join condition.
|
| JoinPushThroughJoinRule |
Rule that pushes the right input of a join into through the left input of
the join, provided that the left input is also a join.
|
| JoinPushTransitivePredicatesRule | |
| JoinToCorrelateRule |
Rule that converts a
Join
into a LogicalCorrelate, which can
then be implemented using nested loops. |
| JoinToMultiJoinRule |
Planner rule to flatten a tree of
LogicalJoins
into a single MultiJoin with N inputs. |
| JoinUnionTransposeRule | |
| LoptJoinTree |
Utility class used to store a
Join tree
and the factors that make up the tree. |
| LoptJoinTree.BinaryTree |
Simple binary tree class that stores an id in the leaf nodes and keeps
track of the parent LoptJoinTree object associated with the binary tree.
|
| LoptJoinTree.Leaf |
Binary tree node that has no children.
|
| LoptJoinTree.Node |
Binary tree node that has two children.
|
| LoptMultiJoin |
Utility class that keeps track of the join factors that
make up a
MultiJoin. |
| LoptOptimizeJoinRule |
Planner rule that implements the heuristic planner for determining optimal
join orderings.
|
| LoptSemiJoinOptimizer |
Implements the logic for determining the optimal
semi-joins to be used in processing joins in a query.
|
| MatchRule |
Planner rule that converts a
LogicalMatch to the result
of calling LogicalMatch.copy(org.apache.calcite.plan.RelTraitSet, java.util.List<org.apache.calcite.rel.RelNode>). |
| MaterializedViewFilterScanRule | |
| MultiJoin |
A MultiJoin represents a join of N inputs, whereas regular Joins
represent strictly binary joins.
|
| MultiJoinOptimizeBushyRule |
Planner rule that finds an approximately optimal ordering for join operators
using a heuristic algorithm.
|
| MultiJoinProjectTransposeRule |
MultiJoinProjectTransposeRule implements the rule for pulling
LogicalProjects that are on top of a
MultiJoin and beneath a
LogicalJoin so the
LogicalProject appears above the
LogicalJoin. |
| ProjectAggregateMergeRule | |
| ProjectCalcMergeRule | |
| ProjectCorrelateTransposeRule | |
| ProjectCorrelateTransposeRule.RelNodesExprsHandler |
Visitor for RelNodes which applies specified
RexShuttle visitor
for every node in the tree. |
| ProjectCorrelateTransposeRule.RexFieldAccessReplacer |
Visitor for RexNodes which replaces
RexCorrelVariable with specified. |
| ProjectFilterTransposeRule | |
| ProjectJoinJoinRemoveRule | |
| ProjectJoinRemoveRule | |
| ProjectJoinTransposeRule | |
| ProjectMergeRule | |
| ProjectMultiJoinMergeRule | |
| ProjectRemoveRule |
Planner rule that,
given a
Project node that
merely returns its input, converts the node into its child. |
| ProjectSetOpTransposeRule |
Planner rule that pushes
a
LogicalProject
past a SetOp. |
| ProjectTableScanRule |
Planner rule that converts a
Project
on a TableScan
of a ProjectableFilterableTable
to a Bindables.BindableTableScan. |
| ProjectToCalcRule |
Rule to convert a
LogicalProject to a
LogicalCalc. |
| ProjectToWindowRule |
Planner rule that slices a
Project
into sections which contain windowed
aggregate functions and sections which do not. |
| ProjectToWindowRule.CalcToWindowRule |
Instance of the rule that applies to a
Calc that contains
windowed aggregates and converts it into a mixture of
LogicalWindow and Calc. |
| ProjectToWindowRule.ProjectToLogicalProjectAndWindowRule |
Instance of the rule that can be applied to a
Project and that produces, in turn,
a mixture of LogicalProject
and LogicalWindow. |
| ProjectWindowTransposeRule |
Planner rule that pushes
a
LogicalProject
past a LogicalWindow. |
| PruneEmptyRules |
Collection of rules which remove sections of a query plan known never to
produce any rows.
|
| PruneEmptyRules.PruneEmptyRule |
Abstract prune empty rule that implements SubstitutionRule interface.
|
| PruneEmptyRules.RemoveEmptySingleRule |
Planner rule that converts a single-rel (e.g.
|
| PushProjector |
PushProjector is a utility class used to perform operations used in push
projection rules.
|
| ReduceDecimalsRule |
Rule that reduces decimal operations (such as casts
or arithmetic) into operations involving more primitive types (such as longs
and doubles).
|
| ReduceDecimalsRule.DecimalShuttle |
A shuttle which converts decimal expressions to expressions based on
longs.
|
| ReduceDecimalsRule.RexExpander |
Rewrites a decimal expression for a specific set of SqlOperator's.
|
| ReduceExpressionsRule<C extends ReduceExpressionsRule.Config> |
Collection of planner rules that apply various simplifying transformations on
RexNode trees.
|
| ReduceExpressionsRule.CalcReduceExpressionsRule |
Rule that reduces constants inside a
Calc. |
| ReduceExpressionsRule.CaseShuttle |
Shuttle that pushes predicates into a CASE.
|
| ReduceExpressionsRule.FilterReduceExpressionsRule |
Rule that reduces constants inside a
Filter. |
| ReduceExpressionsRule.JoinReduceExpressionsRule |
Rule that reduces constants inside a
Join. |
| ReduceExpressionsRule.ProjectReduceExpressionsRule |
Rule that reduces constants inside a
Project. |
| ReduceExpressionsRule.ReducibleExprLocator |
Helper class used to locate expressions that either can be reduced to
literals or contain redundant casts.
|
| ReduceExpressionsRule.RexReplacer |
Replaces expressions with their reductions.
|
| ReduceExpressionsRule.WindowReduceExpressionsRule |
Rule that reduces constants inside a
Window. |
| SemiJoinFilterTransposeRule |
Planner rule that pushes
SemiJoins down in a tree past
a Filter. |
| SemiJoinJoinTransposeRule | |
| SemiJoinProjectTransposeRule | |
| SemiJoinRemoveRule |
Planner rule that removes a
semi-join from a join
tree. |
| SemiJoinRule |
Planner rule that creates a
SemiJoin from a
Join on top of a
LogicalAggregate or
on a RelNode which is
unique for join's right keys. |
| SemiJoinRule.JoinOnUniqueToSemiJoinRule |
SemiJoinRule that matches a Project on top of a Join with a RelNode
which is unique for Join's right keys.
|
| SemiJoinRule.JoinToSemiJoinRule |
SemiJoinRule that matches a Join with an empty Aggregate as its right
input.
|
| SemiJoinRule.ProjectToSemiJoinRule |
SemiJoinRule that matches a Project on top of a Join with an Aggregate
as its right child.
|
| SortJoinCopyRule | |
| SortJoinTransposeRule | |
| SortProjectTransposeRule | |
| SortRemoveConstantKeysRule |
Planner rule that removes keys from a
a
Sort if those keys are known to be
constant, or removes the entire Sort if all keys are constant. |
| SortRemoveRule |
Planner rule that removes
a
Sort if its input is already sorted. |
| SortUnionTransposeRule | |
| SpatialRules |
Collection of planner rules that convert
calls to spatial functions into more efficient expressions.
|
| SpatialRules.FilterHilbertRule |
Rule that converts ST_DWithin in a Filter condition into a predicate on
a Hilbert curve.
|
| SubQueryRemoveRule |
Transform that converts IN, EXISTS and scalar sub-queries into joins.
|
| TableScanRule | Deprecated
org.apache.calcite.rel.core.RelFactories.TableScanFactoryImpl
has called RelOptTable.toRel(RelOptTable.ToRelContext). |
| UnionEliminatorRule |
UnionEliminatorRule checks to see if its possible to optimize a
Union call by eliminating the Union operator altogether in the case the call
consists of only one input. |
| UnionMergeRule | |
| UnionPullUpConstantsRule |
Planner rule that pulls up constants through a Union operator.
|
| UnionToDistinctRule | |
| ValuesReduceRule |
Planner rule that folds projections and filters into an underlying
LogicalValues. |
Consider this package to be the "standard library" of planner rules. Most of the common rewrites that you would want to perform on logical relational expressions, or generically on any data source, are present, and have been well tested.
Of course, the library is never complete, and contributions are welcome.
Not present are rules specific to a particular data source: look in that data source's adapter.
Also out of the scope of this package are rules that support a particular operation, such as decorrelation or recognizing materialized views. Those are defined along with the algorithm.
For
org.apache.calcite.sql
is an object model for SQL expressions
org.apache.calcite.rex
is an object model for relational row expressions
org.apache.calcite.plan
provides an optimizer interface.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.