Package org.apache.calcite.plan
Defines interfaces for constructing rule-based optimizers of
relational expressions.
-
Interface Summary Interface Description Context Provides library users a way to store data within the planner session and access it within rules.Convention Calling convention trait.RelImplementor This is a marker interface for a callback used to convert a tree ofrelational expressions
into a plan.RelMultipleTrait Trait for which a given relational expression can have multiple values.RelOptConnection The planner's view of a connection to a database.RelOptCost RelOptCost defines an interface for optimizer cost in terms of number of rows processed, CPU cost, and I/O cost.RelOptCostFactory Cost model for query planning.RelOptListener RelOptListener defines an interface for listening to events which occur during the optimization process.RelOptNode Node in a planner.RelOptPlanner ARelOptPlanner
is a query optimizer: it transforms a relational expression into a semantically equivalent relational expression, according to a given set of rules and a cost model.RelOptPlanner.Executor Deprecated. UseRexExecutor
RelOptSchema ARelOptSchema
is a set ofRelOptTable
objects.RelOptSchemaWithSampling Extension toRelOptSchema
with support for sample data-sets.RelOptTable Represents a relational dataset in aRelOptSchema
.RelOptTable.ToRelContext Contains the context needed to convert a a table into a relational expression.RelOptTable.ViewExpander Can expand a view into relational expressions.RelTrait RelTrait represents the manifestation of a relational expression trait within a trait definition. -
Class Summary Class Description AbstractRelOptPlanner Abstract base for implementations of theRelOptPlanner
interface.CommonRelSubExprRule ACommonRelSubExprRule
is an abstract base class for rules that are fired only on relational expressions that appear more than once in a query tree.Contexts Utilities forContext
.Contexts.ChainContext Context that wraps a chain of contexts.Contexts.EmptyContext Empty context.Contexts.WrapContext Context that wraps an object.Convention.Impl Default implementation.ConventionTraitDef Definition of the the convention trait.ConventionTraitDef.ConversionData Workspace for converting from one convention to another.MaterializedViewSubstitutionVisitor Extension toSubstitutionVisitor
.MaterializedViewSubstitutionVisitor.FilterToFilterUnifyRule1 Implementation ofSubstitutionVisitor.UnifyRule
that matches aMutableFilter
to aMutableFilter
where the condition of the target relation is weaker.MaterializedViewSubstitutionVisitor.FilterToProjectUnifyRule1 Implementation ofSubstitutionVisitor.UnifyRule
that matches aMutableFilter
to aMutableProject
on top of aMutableFilter
where the condition of the target relation is weaker.MaterializedViewSubstitutionVisitor.ProjectToProjectUnifyRule1 Implementation ofSubstitutionVisitor.UnifyRule
that matches aMutableProject
to aMutableProject
where the condition of the target relation is weaker.MulticastRelOptListener MulticastRelOptListener implements theRelOptListener
interface by forwarding events on to a collection of other listeners.RelCompositeTrait<T extends RelMultipleTrait> A trait that consists of a list of traits, all of the same type.RelOptAbstractTable Partial implementation ofRelOptTable
.RelOptCluster An environment for related relational expressions during the optimization of a query.RelOptCostImpl RelOptCostImpl provides a default implementation for theRelOptCost
interface.RelOptCostImpl.Factory Implementation ofRelOptCostFactory
that createsRelOptCostImpl
s.RelOptLattice Use of a lattice by the query optimizer.RelOptListener.RelChosenEvent Event indicating that a relational expression has been chosen.RelOptListener.RelDiscardedEvent Event indicating that a relational expression has been discarded.RelOptListener.RelEquivalenceEvent Event indicating that a relational expression has been found to be equivalent to an equivalence class.RelOptListener.RelEvent Event class for abstract event dealing with a relational expression.RelOptListener.RuleAttemptedEvent Event indicating that a planner rule has been attemptedd.RelOptListener.RuleEvent Event indicating that a planner rule has fired.RelOptListener.RuleProductionEvent Event indicating that a planner rule has produced a result.RelOptMaterialization Records that a particular query is materialized by a particular table.RelOptMaterialization.ProjectFilterTable A table scan and optional project mapping and filter condition.RelOptMaterializations Utility methods for using materialized views and lattices for queries.RelOptPredicateList Predicates that are known to hold in the output of a particular relational expression.RelOptQuery ARelOptQuery
represents a set ofrelational expressions
which derive from the sameselect
statement.RelOptRule ARelOptRule
transforms an expression into another.RelOptRule.ConverterRelOptRuleOperand Operand to an instance of the converter rule.RelOptRuleCall ARelOptRuleCall
is an invocation of aRelOptRule
with a set ofrelational expression
s as arguments.RelOptRuleOperand Operand that determines whether aRelOptRule
can be applied to a particular expression.RelOptRuleOperandChildren Children of aRelOptRuleOperand
and the policy for matching them.RelOptSamplingParameters RelOptSamplingParameters represents the parameters necessary to produce a sample of a relation.RelOptUtil RelOptUtil
defines static utility methods for use in optimizingRelNode
s.RelOptUtil.CorrelationCollector Shuttle that finds correlation variables inside a given relational expression, including those that are insidesub-queries
.RelOptUtil.Exists RelOptUtil.InputFinder Visitor which builds a bitmap of the inputs used by an expression.RelOptUtil.InputReferencedVisitor Shuttle that finds the set of inputs that are used.RelOptUtil.RexInputConverter Walks an expression tree, converting the index of RexInputRefs based on some adjustment factor.RelOptUtil.TypeDumper Converts types to descriptive strings.RelOptUtil.VariableSetVisitor Visitor that finds all variables used but not stopped in an expression.RelOptUtil.VariableUsedVisitor Visitor that finds all variables used in an expression.RelTraitDef<T extends RelTrait> RelTraitDef represents a class ofRelTrait
s.RelTraitPropagationVisitor RelTraitPropagationVisitor traverses a RelNode and its unregistered children, making sure that each has a full complement of traits.RelTraitSet RelTraitSet represents an ordered set ofRelTrait
s.RelTraitSet.Cache Cache of trait sets.RexImplicationChecker Checks whether one condition logically implies another.RexImplicationChecker.InputRefUsage<T1,T2> Usage of aRexInputRef
in an expression.RexImplicationChecker.InputUsageFinder Visitor that builds a usage map of inputs used by an expression.Strong Utilities for strong predicates.SubstitutionVisitor Substitutes part of a tree of relational expressions with another tree.SubstitutionVisitor.AbstractUnifyRule Abstract base class for implementingSubstitutionVisitor.UnifyRule
.SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule Implementation ofSubstitutionVisitor.UnifyRule
that matches aMutableAggregate
on aMutableProject
query to anMutableAggregate
target.SubstitutionVisitor.AggregateToAggregateUnifyRule Implementation ofSubstitutionVisitor.UnifyRule
that matches aLogicalAggregate
to aLogicalAggregate
, provided that they have the same child.SubstitutionVisitor.AnyOperand Operand to aSubstitutionVisitor.UnifyRule
that matches a relational expression of a given type.SubstitutionVisitor.FilterOnProjectRule Rule that converts aLogicalFilter
on top of aLogicalProject
into a trivial filter (on a boolean column).SubstitutionVisitor.FilterToFilterUnifyRule Implementation ofSubstitutionVisitor.UnifyRule
that matches aMutableFilter
.SubstitutionVisitor.FilterToProjectUnifyRule SubstitutionVisitor.InternalOperand Operand to aSubstitutionVisitor.UnifyRule
that matches a relational expression of a given type.SubstitutionVisitor.Operand Operand to aSubstitutionVisitor.UnifyRule
.SubstitutionVisitor.ProjectToFilterUnifyRule SubstitutionVisitor.ProjectToProjectUnifyRule Implementation ofSubstitutionVisitor.UnifyRule
that matchesLogicalProject
.SubstitutionVisitor.QueryOperand Operand that assigns a particular relational expression to a variable.SubstitutionVisitor.Replacement Represents a replacement action: before → after.SubstitutionVisitor.ScanToProjectUnifyRule Implementation ofSubstitutionVisitor.UnifyRule
that matchesLogicalTableScan
.SubstitutionVisitor.SlotCounter Visitor that counts how manySubstitutionVisitor.QueryOperand
andSubstitutionVisitor.TargetOperand
in an operand tree.SubstitutionVisitor.TargetOperand Operand that checks that a relational expression matches the corresponding relational expression that was passed to aSubstitutionVisitor.QueryOperand
.SubstitutionVisitor.TrivialRule Implementation ofSubstitutionVisitor.UnifyRule
that matches if the query is already equal to the target.SubstitutionVisitor.UnifyResult Result of an application of aSubstitutionVisitor.UnifyRule
indicating that the rule successfully matchedquery
againsttarget
and generated aresult
that is equivalent toquery
and containstarget
.SubstitutionVisitor.UnifyRule Rule that attempts to match a query relational expression against a target relational expression.TableAccessMap TableAccessMap
represents the tables accessed by a query plan, with READ/WRITE information.ViewExpanders Utilities forRelOptTable.ViewExpander
andRelOptTable.ToRelContext
.VisitorDataContext DataContext for evaluating an RexExpression -
Enum Summary Enum Description RelOptRuleOperandChildPolicy Policy by which operands will be matched by relational expressions with any number of children.RelOptUtil.Logic Policies for handling two- and three-valued boolean logic.RelOptUtil.Side Categorizes whether a bit set contains bits left and right of a line.RelOptUtil.SubQueryType What kind of sub-query.Strong.Policy How whether an operator's operands are null affects whether a call to that operator evaluates to null.TableAccessMap.Mode Access mode. -
Exception Summary Exception Description RelOptPlanner.CannotPlanException Thrown byRelOptPlanner.findBestExp()
.SubstitutionVisitor.MatchFailed Exception thrown to exit a matcher.