public class CoreRules extends Object
MaterializedViewRulespublic static final AggregateProjectMergeRule AGGREGATE_PROJECT_MERGE
public static final AggregateProjectPullUpConstantsRule AGGREGATE_PROJECT_PULL_UP_CONSTANTS
Aggregate.public static final AggregateProjectPullUpConstantsRule AGGREGATE_ANY_PULL_UP_CONSTANTS
AGGREGATE_PROJECT_PULL_UP_CONSTANTS
that matches any relational expression.public static final AggregateStarTableRule AGGREGATE_STAR_TABLE
Aggregate on
a StarTable.StarTableScan.public static final AggregateProjectStarTableRule AGGREGATE_PROJECT_STAR_TABLE
AGGREGATE_STAR_TABLE that accepts a Project
between the Aggregate and its StarTable.StarTableScan
input.public static final AggregateReduceFunctionsRule AGGREGATE_REDUCE_FUNCTIONS
Aggregate to simpler forms.public static final AggregateMergeRule AGGREGATE_MERGE
public static final AggregateRemoveRule AGGREGATE_REMOVE
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.public static final AggregateExpandDistinctAggregatesRule AGGREGATE_EXPAND_DISTINCT_AGGREGATES
COUNT(DISTINCT x)) from a
Aggregate.
This instance operates only on logical expressions.public static final AggregateExpandDistinctAggregatesRule AGGREGATE_EXPAND_DISTINCT_AGGREGATES_TO_JOIN
AGGREGATE_EXPAND_DISTINCT_AGGREGATES but generates a Join.public static final AggregateExpandWithinDistinctRule AGGREGATE_EXPAND_WITHIN_DISTINCT
LogicalAggregate that contains
WITHIN DISTINCT aggregate functions to one that does not.public static final AggregateFilterTransposeRule AGGREGATE_FILTER_TRANSPOSE
public static final AggregateJoinJoinRemoveRule AGGREGATE_JOIN_JOIN_REMOVE
public static final AggregateJoinRemoveRule AGGREGATE_JOIN_REMOVE
public static final AggregateJoinTransposeRule AGGREGATE_JOIN_TRANSPOSE
public static final AggregateJoinTransposeRule AGGREGATE_JOIN_TRANSPOSE_EXTENDED
AGGREGATE_JOIN_TRANSPOSE, but extended to push down aggregate
functions.public static final AggregateUnionTransposeRule AGGREGATE_UNION_TRANSPOSE
public static final AggregateUnionAggregateRule AGGREGATE_UNION_AGGREGATE
Aggregate whose input is a Union
one of whose inputs is an Aggregate.
Because it matches RelNode for each input of Union, it
will create O(N ^ 2) matches, which may cost too much during the popMatch
phase in VolcanoPlanner. If efficiency is a concern, we recommend that you
use AGGREGATE_UNION_AGGREGATE_FIRST
and AGGREGATE_UNION_AGGREGATE_SECOND instead.
public static final AggregateUnionAggregateRule AGGREGATE_UNION_AGGREGATE_FIRST
public static final AggregateUnionAggregateRule AGGREGATE_UNION_AGGREGATE_SECOND
public static final AggregateCaseToFilterRule AGGREGATE_CASE_TO_FILTER
public static final CalcMergeRule CALC_MERGE
Calc onto a Calc.public static final CalcRemoveRule CALC_REMOVE
LogicalCalc.public static final ReduceDecimalsRule CALC_REDUCE_DECIMALS
public static final ReduceExpressionsRule.CalcReduceExpressionsRule CALC_REDUCE_EXPRESSIONS
LogicalCalc.FILTER_REDUCE_EXPRESSIONSpublic static final CalcSplitRule CALC_SPLIT
public static final ProjectToWindowRule.CalcToWindowRule CALC_TO_WINDOW
Calc
that contains windowed aggregates to a mixture of
LogicalWindow and Calc.public static final CoerceInputsRule COERCE_INPUTS
public static final ExchangeRemoveConstantKeysRule EXCHANGE_REMOVE_CONSTANT_KEYS
LogicalExchange.public static final ExchangeRemoveConstantKeysRule SORT_EXCHANGE_REMOVE_CONSTANT_KEYS
LogicalSortExchange.public static final FilterJoinRule.FilterIntoJoinRule FILTER_INTO_JOIN
public static final FilterJoinRule.FilterIntoJoinRule FILTER_INTO_JOIN_DUMB
FILTER_INTO_JOIN. Not intended for production
use, but keeps some tests working for which FILTER_INTO_JOIN is too
smart.public static final FilterMergeRule FILTER_MERGE
LogicalFilters.public static final FilterCalcMergeRule FILTER_CALC_MERGE
Filter and a LogicalCalc. The
result is a LogicalCalc whose filter condition is the logical AND
of the two.PROJECT_CALC_MERGEpublic static final FilterToCalcRule FILTER_TO_CALC
LogicalFilter to a LogicalCalc.PROJECT_TO_CALCpublic static final FilterAggregateTransposeRule FILTER_AGGREGATE_TRANSPOSE
AGGREGATE_FILTER_TRANSPOSEpublic static final FilterProjectTransposeRule FILTER_PROJECT_TRANSPOSE
FilterProjectTransposeRule.
It does not allow a Filter to be pushed past the Project if
there is a correlation condition)
anywhere in the Filter, since in some cases it can prevent a
Correlate from being de-correlated.
public static final FilterTableFunctionTransposeRule FILTER_TABLE_FUNCTION_TRANSPOSE
LogicalFilter
past a LogicalTableFunctionScan.public static final FilterTableScanRule FILTER_SCAN
public static final FilterTableScanRule FILTER_INTERPRETER_SCAN
public static final FilterCorrelateRule FILTER_CORRELATE
public static final FilterMultiJoinMergeRule FILTER_MULTI_JOIN_MERGE
PROJECT_MULTI_JOIN_MERGEpublic static final FilterRemoveIsNotDistinctFromRule FILTER_EXPAND_IS_NOT_DISTINCT_FROM
IS NOT DISTINCT FROM
in a Filter with logically equivalent operations.public static final FilterSetOpTransposeRule FILTER_SET_OP_TRANSPOSE
public static final ReduceExpressionsRule.FilterReduceExpressionsRule FILTER_REDUCE_EXPRESSIONS
LogicalFilter.public static final UnionMergeRule INTERSECT_MERGE
public static final IntersectToDistinctRule INTERSECT_TO_DISTINCT
public static final MatchRule MATCH
LogicalMatch to the result of calling
LogicalMatch.copy(org.apache.calcite.plan.RelTraitSet, java.util.List<org.apache.calcite.rel.RelNode>).public static final UnionMergeRule MINUS_MERGE
public static final ProjectAggregateMergeRule PROJECT_AGGREGATE_MERGE
public static final ProjectCalcMergeRule PROJECT_CALC_MERGE
LogicalProject and a LogicalCalc.FILTER_CALC_MERGEpublic static final ProjectCorrelateTransposeRule PROJECT_CORRELATE_TRANSPOSE
public static final ProjectFilterTransposeRule PROJECT_FILTER_TRANSPOSE
public static final ProjectFilterTransposeRule PROJECT_FILTER_TRANSPOSE_WHOLE_EXPRESSIONS
PROJECT_FILTER_TRANSPOSE, but pushes down project and filter
expressions whole, not field references.public static final ProjectFilterTransposeRule PROJECT_FILTER_TRANSPOSE_WHOLE_PROJECT_EXPRESSIONS
PROJECT_FILTER_TRANSPOSE,
pushes down field references for filters,
but pushes down project expressions whole.public static final ReduceExpressionsRule.ProjectReduceExpressionsRule PROJECT_REDUCE_EXPRESSIONS
LogicalProject.FILTER_REDUCE_EXPRESSIONSpublic static final SubQueryRemoveRule PROJECT_SUB_QUERY_TO_CORRELATE
Correlate instances.public static final SubQueryRemoveRule FILTER_SUB_QUERY_TO_CORRELATE
Correlate instances.public static final SubQueryRemoveRule JOIN_SUB_QUERY_TO_CORRELATE
Correlate instances.public static final ProjectToWindowRule.ProjectToLogicalProjectAndWindowRule PROJECT_TO_LOGICAL_PROJECT_AND_WINDOW
public static final SemiJoinRule.ProjectToSemiJoinRule PROJECT_TO_SEMI_JOIN
JOIN_TO_SEMI_JOINpublic static final ProjectJoinJoinRemoveRule PROJECT_JOIN_JOIN_REMOVE
public static final ProjectJoinRemoveRule PROJECT_JOIN_REMOVE
public static final ProjectJoinTransposeRule PROJECT_JOIN_TRANSPOSE
LogicalProject past a LogicalJoin
by splitting the projection into a projection on top of each child of
the join.public static final ProjectMergeRule PROJECT_MERGE
public static final ProjectSetOpTransposeRule PROJECT_SET_OP_TRANSPOSE
LogicalProject past a SetOp.
The children of the SetOp will project
only the RexInputRefs referenced in the original
LogicalProject.
public static final ProjectMultiJoinMergeRule PROJECT_MULTI_JOIN_MERGE
FILTER_MULTI_JOIN_MERGEpublic static final ProjectRemoveRule PROJECT_REMOVE
Project node that merely returns its input,
converts the node into its input.public static final ProjectTableScanRule PROJECT_TABLE_SCAN
Project on a TableScan
of a ProjectableFilterableTable
to a Bindables.BindableTableScan.PROJECT_INTERPRETER_TABLE_SCANpublic static final ProjectTableScanRule PROJECT_INTERPRETER_TABLE_SCAN
PROJECT_TABLE_SCAN, but with an intervening
EnumerableInterpreter.public static final ProjectToCalcRule PROJECT_TO_CALC
LogicalProject to a LogicalCalc.FILTER_TO_CALCpublic static final ProjectWindowTransposeRule PROJECT_WINDOW_TRANSPOSE
LogicalProject past a LogicalWindow.public static final FilterJoinRule.JoinConditionPushRule JOIN_CONDITION_PUSH
public static final JoinAddRedundantSemiJoinRule JOIN_ADD_REDUNDANT_SEMI_JOIN
Join.public static final JoinAssociateRule JOIN_ASSOCIATE
public static final JoinCommuteRule JOIN_COMMUTE
Join.public static final JoinCommuteRule JOIN_COMMUTE_OUTER
JOIN_COMMUTE but swaps outer joins as well as inner joins.public static final JoinExtractFilterRule JOIN_EXTRACT_FILTER
public static final JoinProjectTransposeRule JOIN_PROJECT_BOTH_TRANSPOSE
LogicalJoin whose inputs are
LogicalProjects, and pulls the project expressions up.public static final JoinProjectTransposeRule JOIN_PROJECT_LEFT_TRANSPOSE
JOIN_PROJECT_BOTH_TRANSPOSE but only the left input is
a LogicalProject.public static final JoinProjectTransposeRule JOIN_PROJECT_RIGHT_TRANSPOSE
JOIN_PROJECT_BOTH_TRANSPOSE but only the right input is
a LogicalProject.public static final JoinProjectTransposeRule JOIN_PROJECT_BOTH_TRANSPOSE_INCLUDE_OUTER
JOIN_PROJECT_BOTH_TRANSPOSE but match outer as well as
inner join.public static final JoinProjectTransposeRule JOIN_PROJECT_LEFT_TRANSPOSE_INCLUDE_OUTER
JOIN_PROJECT_LEFT_TRANSPOSE but match outer as well as
inner join.public static final JoinProjectTransposeRule JOIN_PROJECT_RIGHT_TRANSPOSE_INCLUDE_OUTER
JOIN_PROJECT_RIGHT_TRANSPOSE but match outer as well as
inner join.public static final JoinPushExpressionsRule JOIN_PUSH_EXPRESSIONS
Join and pushes down expressions on either
side of "equal" conditions.public static final JoinPushTransitivePredicatesRule JOIN_PUSH_TRANSITIVE_PREDICATES
public static final JoinDeriveIsNotNullFilterRule JOIN_DERIVE_IS_NOT_NULL_FILTER_RULE
public static final ReduceExpressionsRule.JoinReduceExpressionsRule JOIN_REDUCE_EXPRESSIONS
Join.public static final SemiJoinRule.JoinOnUniqueToSemiJoinRule JOIN_ON_UNIQUE_TO_SEMI_JOIN
public static final JoinToCorrelateRule JOIN_TO_CORRELATE
LogicalJoin
into a LogicalCorrelate.public static final JoinToMultiJoinRule JOIN_TO_MULTI_JOIN
LogicalJoins
into a single MultiJoin with N inputs.public static final SemiJoinRule.JoinToSemiJoinRule JOIN_TO_SEMI_JOIN
PROJECT_TO_SEMI_JOINpublic static final JoinUnionTransposeRule JOIN_LEFT_UNION_TRANSPOSE
public static final JoinUnionTransposeRule JOIN_RIGHT_UNION_TRANSPOSE
public static final LoptOptimizeJoinRule MULTI_JOIN_OPTIMIZE
Join using a heuristic planner.
It is triggered by the pattern
LogicalProject (MultiJoin).
JOIN_TO_MULTI_JOIN,
MULTI_JOIN_OPTIMIZE_BUSHYpublic static final MultiJoinOptimizeBushyRule MULTI_JOIN_OPTIMIZE_BUSHY
It is triggered by the pattern
LogicalProject (MultiJoin).
MULTI_JOIN_OPTIMIZEpublic static final MultiJoinProjectTransposeRule MULTI_JOIN_BOTH_PROJECT
LogicalJoin whose inputs are both a
MultiJoin with intervening LogicalProjects,
and pulls the Projects up above the Join.public static final MultiJoinProjectTransposeRule MULTI_JOIN_LEFT_PROJECT
MULTI_JOIN_BOTH_PROJECT but only the left input has
an intervening Project.public static final MultiJoinProjectTransposeRule MULTI_JOIN_RIGHT_PROJECT
MULTI_JOIN_BOTH_PROJECT but only the right input has
an intervening Project.public static final SemiJoinFilterTransposeRule SEMI_JOIN_FILTER_TRANSPOSE
public static final SemiJoinProjectTransposeRule SEMI_JOIN_PROJECT_TRANSPOSE
public static final SemiJoinJoinTransposeRule SEMI_JOIN_JOIN_TRANSPOSE
public static final SemiJoinRemoveRule SEMI_JOIN_REMOVE
semi-join from a join tree.public static final SortUnionTransposeRule SORT_UNION_TRANSPOSE
Sort past a Union.
This rule instance is for a Union implementation that does not preserve
the ordering of its inputs. Thus, it makes no sense to match this rule
if the Sort does not have a limit, i.e., Sort.fetch is null.
SORT_UNION_TRANSPOSE_MATCH_NULL_FETCHpublic static final SortUnionTransposeRule SORT_UNION_TRANSPOSE_MATCH_NULL_FETCH
SORT_UNION_TRANSPOSE, but for a Union implementation that
preserves the ordering of its inputs. It is still worth applying this rule
even if the Sort does not have a limit, for the merge of already sorted
inputs that the Union can do is usually cheap.public static final SortJoinCopyRule SORT_JOIN_COPY
Sort past a Join without its limit and
offset. The original Sort is preserved but can potentially be
removed by SORT_REMOVE if redundant.public static final SortRemoveRule SORT_REMOVE
Sort if its input is already sorted.public static final SortRemoveConstantKeysRule SORT_REMOVE_CONSTANT_KEYS
Sort
if those keys are known to be constant, or removes the entire Sort if all
keys are constant.public static final SortJoinTransposeRule SORT_JOIN_TRANSPOSE
public static final SortProjectTransposeRule SORT_PROJECT_TRANSPOSE
public static final UnionMergeRule UNION_MERGE
public static final UnionEliminatorRule UNION_REMOVE
Union if it has only one input.PruneEmptyRules.UNION_INSTANCEpublic static final UnionPullUpConstantsRule UNION_PULL_UP_CONSTANTS
public static final UnionToDistinctRule UNION_TO_DISTINCT
public static final AggregateValuesRule AGGREGATE_VALUES
public static final ValuesReduceRule FILTER_VALUES_MERGE
Filter onto an underlying
LogicalValues,
resulting in a Values with potentially fewer rows.public static final ValuesReduceRule PROJECT_VALUES_MERGE
Project onto an underlying
LogicalValues,
resulting in a Values with different columns.public static final ValuesReduceRule PROJECT_FILTER_VALUES_MERGE
Project
on top of a Filter onto an underlying
LogicalValues,
resulting in a Values with different columns
and potentially fewer rows.public static final ReduceExpressionsRule.WindowReduceExpressionsRule WINDOW_REDUCE_EXPRESSIONS
LogicalWindow.FILTER_REDUCE_EXPRESSIONSCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.