| Package | Description |
|---|---|
| org.apache.calcite.plan |
Defines interfaces for constructing rule-based optimizers of
relational expressions.
|
| org.apache.calcite.rel.mutable |
Defines mutable relational expressions.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) MutableRel |
SubstitutionVisitor.Replacement.after |
(package private) MutableRel |
SubstitutionVisitor.Replacement.before |
MutableRel |
SubstitutionVisitor.UnifyRuleCall.query |
private MutableRel |
SubstitutionVisitor.UnifyResult.result |
protected MutableRel[] |
SubstitutionVisitor.slots
Workspace while rule is being matched.
|
private MutableRel |
SubstitutionVisitor.target |
MutableRel |
SubstitutionVisitor.UnifyRuleCall.target |
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends MutableRel> |
SubstitutionVisitor.Operand.clazz |
(package private) com.google.common.collect.Multimap<MutableRel,MutableRel> |
SubstitutionVisitor.equivalents |
(package private) com.google.common.collect.Multimap<MutableRel,MutableRel> |
SubstitutionVisitor.equivalents |
(package private) List<MutableRel> |
SubstitutionVisitor.queryLeaves
Nodes in
SubstitutionVisitor.query that have no children. |
(package private) Map<MutableRel,MutableRel> |
SubstitutionVisitor.replacementMap |
(package private) Map<MutableRel,MutableRel> |
SubstitutionVisitor.replacementMap |
protected com.google.common.collect.ImmutableList<MutableRel> |
SubstitutionVisitor.UnifyRuleCall.slots |
(package private) List<MutableRel> |
SubstitutionVisitor.targetLeaves
Nodes in
SubstitutionVisitor.target that have no children. |
| Modifier and Type | Method and Description |
|---|---|
protected MutableRel |
SubstitutionVisitor.FilterToProjectUnifyRule.invert(List<Pair<RexNode,String>> namedProjects,
MutableRel input,
RexShuttle shuttle) |
protected MutableRel |
SubstitutionVisitor.FilterToProjectUnifyRule.invert(MutableRel model,
MutableRel input,
MutableProject project) |
static MutableRel |
SubstitutionVisitor.unifyAggregates(MutableAggregate query,
MutableAggregate target) |
| Modifier and Type | Method and Description |
|---|---|
private List<SubstitutionVisitor.UnifyRule> |
SubstitutionVisitor.applicableRules(MutableRel query,
MutableRel target) |
private SubstitutionVisitor.UnifyResult |
SubstitutionVisitor.apply(SubstitutionVisitor.UnifyRule rule,
MutableRel query,
MutableRel target) |
SubstitutionVisitor.UnifyRuleCall |
SubstitutionVisitor.UnifyRuleCall.create(MutableRel query)
Creates a
SubstitutionVisitor.UnifyRuleCall based on the parent of query. |
static boolean |
SubstitutionVisitor.equalType(String desc0,
MutableRel rel0,
String desc1,
MutableRel rel1,
Litmus litmus)
Returns whether two relational expressions have the same row-type.
|
private List<List<SubstitutionVisitor.Replacement>> |
SubstitutionVisitor.go(MutableRel replacement)
Substitutes the query with replacement whenever possible but meanwhile
keeps track of all the substitutions and their original rel before
replacement, so that in later processing stage, the replacement can be
recovered individually to produce a list of all possible rels with
substitution in different places.
|
protected MutableRel |
SubstitutionVisitor.FilterToProjectUnifyRule.invert(List<Pair<RexNode,String>> namedProjects,
MutableRel input,
RexShuttle shuttle) |
protected MutableRel |
SubstitutionVisitor.FilterToProjectUnifyRule.invert(MutableRel model,
MutableRel input,
MutableProject project) |
protected boolean |
SubstitutionVisitor.isWeaker(MutableRel rel0,
MutableRel rel)
Returns if one rel is weaker than another.
|
boolean |
SubstitutionVisitor.Operand.isWeaker(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.InternalOperand.isWeaker(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.TargetOperand.isWeaker(SubstitutionVisitor visitor,
MutableRel rel) |
protected SubstitutionVisitor.UnifyRuleCall |
MaterializedViewSubstitutionVisitor.ProjectToProjectUnifyRule1.match(SubstitutionVisitor visitor,
MutableRel query,
MutableRel target) |
protected SubstitutionVisitor.UnifyRuleCall |
MaterializedViewSubstitutionVisitor.FilterToFilterUnifyRule1.match(SubstitutionVisitor visitor,
MutableRel query,
MutableRel target) |
protected SubstitutionVisitor.UnifyRuleCall |
MaterializedViewSubstitutionVisitor.FilterToProjectUnifyRule1.match(SubstitutionVisitor visitor,
MutableRel query,
MutableRel target) |
protected SubstitutionVisitor.UnifyRuleCall |
SubstitutionVisitor.UnifyRule.match(SubstitutionVisitor visitor,
MutableRel query,
MutableRel target) |
abstract boolean |
SubstitutionVisitor.Operand.matches(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.InternalOperand.matches(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.AnyOperand.matches(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.QueryOperand.matches(SubstitutionVisitor visitor,
MutableRel rel) |
boolean |
SubstitutionVisitor.TargetOperand.matches(SubstitutionVisitor visitor,
MutableRel rel) |
private SubstitutionVisitor.UnifyResult |
SubstitutionVisitor.matchRecurse(MutableRel target) |
static MutableAggregate |
SubstitutionVisitor.permute(MutableAggregate aggregate,
MutableRel input,
Mapping mapping) |
(package private) void |
SubstitutionVisitor.register(MutableRel result,
MutableRel query) |
static SubstitutionVisitor.Replacement |
SubstitutionVisitor.replace(MutableRel query,
MutableRel find,
MutableRel replace)
Within a relational expression
query, replaces occurrences of
find with replace. |
private static SubstitutionVisitor.Replacement |
SubstitutionVisitor.replaceRecurse(MutableRel query,
MutableRel find,
MutableRel replace)
|
SubstitutionVisitor.UnifyResult |
SubstitutionVisitor.UnifyRuleCall.result(MutableRel result) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
SubstitutionVisitor.InternalOperand.allMatch(SubstitutionVisitor visitor,
List<SubstitutionVisitor.Operand> operands,
List<MutableRel> rels) |
private static boolean |
SubstitutionVisitor.InternalOperand.allWeaker(SubstitutionVisitor visitor,
List<SubstitutionVisitor.Operand> operands,
List<MutableRel> rels) |
protected static SubstitutionVisitor.Operand |
SubstitutionVisitor.AbstractUnifyRule.any(Class<? extends MutableRel> clazz)
Creates an operand that doesn't check inputs.
|
protected static SubstitutionVisitor.Operand |
SubstitutionVisitor.AbstractUnifyRule.operand(Class<? extends MutableRel> clazz,
SubstitutionVisitor.Operand... inputOperands)
Creates an operand with given inputs.
|
| Constructor and Description |
|---|
Replacement(MutableRel before,
MutableRel after) |
UnifyResult(SubstitutionVisitor.UnifyRuleCall call,
MutableRel result) |
UnifyRuleCall(SubstitutionVisitor.UnifyRule rule,
MutableRel query,
MutableRel target,
com.google.common.collect.ImmutableList<MutableRel> slots) |
| Constructor and Description |
|---|
AnyOperand(Class<? extends MutableRel> clazz) |
InternalOperand(Class<? extends MutableRel> clazz,
List<SubstitutionVisitor.Operand> inputs) |
Operand(Class<? extends MutableRel> clazz) |
UnifyRuleCall(SubstitutionVisitor.UnifyRule rule,
MutableRel query,
MutableRel target,
com.google.common.collect.ImmutableList<MutableRel> slots) |
| Modifier and Type | Class and Description |
|---|---|
class |
Holder
Implementation of
MutableRel whose only purpose is to have a
child. |
class |
MutableAggregate
Mutable equivalent of
Aggregate. |
(package private) class |
MutableBiRel
Mutable equivalent of
BiRel. |
class |
MutableCalc
Mutable equivalent of
Calc. |
class |
MutableCollect
Mutable equivalent of
Collect. |
class |
MutableCorrelate
Mutable equivalent of
Correlate. |
class |
MutableExchange
Mutable equivalent of
Exchange. |
class |
MutableFilter
Mutable equivalent of
Filter. |
class |
MutableIntersect
Mutable equivalent of
Intersect. |
class |
MutableJoin
Mutable equivalent of
Join. |
(package private) class |
MutableLeafRel
Abstract base class for implementations of
MutableRel that have
no inputs. |
class |
MutableMinus
Mutable equivalent of
Minus. |
(package private) class |
MutableMultiRel
Base Class for relations with three or more inputs
|
class |
MutableProject
Mutable equivalent of
Project. |
class |
MutableSample
Mutable equivalent of
Sample. |
class |
MutableScan
Mutable equivalent of
TableScan. |
class |
MutableSemiJoin
Mutable equivalent of
SemiJoin. |
(package private) class |
MutableSetOp
Mutable equivalent of
SetOp. |
(package private) class |
MutableSingleRel
Mutable equivalent of
SingleRel. |
class |
MutableSort
Mutable equivalent of
Sort. |
class |
MutableTableFunctionScan
Mutable equivalent of
TableFunctionScan. |
class |
MutableTableModify
Mutable equivalent of
TableModify. |
class |
MutableUncollect
Mutable equivalent of
Uncollect. |
class |
MutableUnion
Mutable equivalent of
Union. |
class |
MutableValues
Mutable equivalent of
Values. |
class |
MutableWindow
Mutable equivalent of
Window. |
| Modifier and Type | Field and Description |
|---|---|
protected MutableRel |
MutableSingleRel.input |
protected MutableRel |
MutableBiRel.left |
protected MutableRel |
MutableRel.parent |
protected MutableRel |
MutableBiRel.right |
private MutableRel |
MutableRelVisitor.root |
| Modifier and Type | Field and Description |
|---|---|
protected List<MutableRel> |
MutableMultiRel.inputs |
| Modifier and Type | Method and Description |
|---|---|
MutableRel |
MutableValues.clone() |
MutableRel |
MutableCollect.clone() |
MutableRel |
MutableExchange.clone() |
MutableRel |
MutableWindow.clone() |
MutableRel |
MutableSample.clone() |
MutableRel |
MutableTableModify.clone() |
MutableRel |
MutableUnion.clone() |
MutableRel |
MutableAggregate.clone() |
MutableRel |
MutableSemiJoin.clone() |
abstract MutableRel |
MutableRel.clone() |
MutableRel |
MutableMinus.clone() |
MutableRel |
MutableUncollect.clone() |
MutableRel |
MutableScan.clone() |
MutableRel |
MutableCorrelate.clone() |
MutableRel |
MutableSort.clone() |
MutableRel |
MutableJoin.clone() |
MutableRel |
Holder.clone() |
MutableRel |
MutableTableFunctionScan.clone() |
MutableRel |
MutableCalc.clone() |
MutableRel |
MutableIntersect.clone() |
MutableRel |
MutableProject.clone() |
MutableRel |
MutableFilter.clone() |
static MutableRel |
MutableRels.createCastRel(MutableRel rel,
RelDataType castRowType,
boolean rename)
|
static MutableRel |
MutableRels.createProject(MutableRel child,
List<Integer> posList)
|
MutableRel |
MutableSingleRel.getInput() |
MutableRel |
MutableBiRel.getLeft() |
MutableRel |
MutableRel.getParent() |
MutableRel |
MutableBiRel.getRight() |
MutableRel |
MutableRelVisitor.go(MutableRel p) |
static MutableRel |
MutableProject.of(MutableRel input,
List<RexNode> exprList,
List<String> fieldNameList)
Creates a MutableProject.
|
static MutableRel |
MutableRels.preOrderTraverseNext(MutableRel node) |
MutableRel |
MutableRel.replaceInParent(MutableRel child)
Replaces this
MutableRel in its parent with another node at the
same position. |
static MutableRel |
MutableRels.strip(MutableProject project)
|
static MutableRel |
MutableRels.toMutable(RelNode rel) |
| Modifier and Type | Method and Description |
|---|---|
protected List<MutableRel> |
MutableMultiRel.cloneChildren() |
static List<MutableRel> |
MutableRels.descendants(MutableRel query) |
List<MutableRel> |
MutableSingleRel.getInputs() |
List<MutableRel> |
MutableMultiRel.getInputs() |
abstract List<MutableRel> |
MutableRel.getInputs() |
List<MutableRel> |
MutableLeafRel.getInputs() |
List<MutableRel> |
MutableBiRel.getInputs() |
private static List<MutableRel> |
MutableRels.toMutables(List<RelNode> nodes) |
| Modifier and Type | Method and Description |
|---|---|
String |
MutableRel.MutableRelDumper.apply(MutableRel rel) |
static boolean |
MutableRels.contains(MutableRel ancestor,
MutableRel target) |
static MutableRel |
MutableRels.createCastRel(MutableRel rel,
RelDataType castRowType,
boolean rename)
|
static MutableRel |
MutableRels.createProject(MutableRel child,
List<Integer> posList)
|
static List<MutableRel> |
MutableRels.descendants(MutableRel query) |
private static void |
MutableRels.descendantsRecurse(List<MutableRel> list,
MutableRel rel) |
static RelNode |
MutableRels.fromMutable(MutableRel node) |
static RelNode |
MutableRels.fromMutable(MutableRel node,
RelBuilder relBuilder) |
MutableRel |
MutableRelVisitor.go(MutableRel p) |
static Holder |
Holder.of(MutableRel input)
Creates a Holder.
|
static MutableAggregate |
MutableAggregate.of(MutableRel input,
ImmutableBitSet groupSet,
com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates a MutableAggregate.
|
static MutableRel |
MutableProject.of(MutableRel input,
List<RexNode> exprList,
List<String> fieldNameList)
Creates a MutableProject.
|
static MutableSort |
MutableSort.of(MutableRel input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a MutableSort.
|
static MutableExchange |
MutableExchange.of(MutableRel input,
RelDistribution distribution)
Creates a MutableExchange.
|
static MutableSample |
MutableSample.of(MutableRel input,
RelOptSamplingParameters params)
Creates a MutableSample.
|
static MutableFilter |
MutableFilter.of(MutableRel input,
RexNode condition)
Creates a MutableFilter.
|
static MutableCalc |
MutableCalc.of(MutableRel input,
RexProgram program)
Creates a MutableCalc
|
static MutableUncollect |
MutableUncollect.of(RelDataType rowType,
MutableRel input,
boolean withOrdinality)
Creates a MutableUncollect.
|
static MutableProject |
MutableProject.of(RelDataType rowType,
MutableRel input,
List<RexNode> projects)
Creates a MutableProject.
|
static MutableWindow |
MutableWindow.of(RelDataType rowType,
MutableRel input,
List<Window.Group> groups,
List<RexLiteral> constants)
Creates a MutableWindow.
|
static MutableCorrelate |
MutableCorrelate.of(RelDataType rowType,
MutableRel left,
MutableRel right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType)
Creates a MutableCorrelate.
|
static MutableSemiJoin |
MutableSemiJoin.of(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates a MutableSemiJoin.
|
static MutableJoin |
MutableJoin.of(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
JoinRelType joinType,
Set<CorrelationId> variablesStopped)
Creates a MutableJoin.
|
static MutableTableModify |
MutableTableModify.of(RelDataType rowType,
MutableRel input,
RelOptTable table,
Prepare.CatalogReader catalogReader,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a MutableTableModify.
|
static MutableCollect |
MutableCollect.of(RelDataType rowType,
MutableRel input,
String fieldName)
Creates a MutableCollect.
|
static MutableRel |
MutableRels.preOrderTraverseNext(MutableRel node) |
MutableRel |
MutableRel.replaceInParent(MutableRel child)
Replaces this
MutableRel in its parent with another node at the
same position. |
void |
MutableSingleRel.setInput(int ordinalInParent,
MutableRel input) |
void |
MutableMultiRel.setInput(int ordinalInParent,
MutableRel input) |
abstract void |
MutableRel.setInput(int ordinalInParent,
MutableRel input) |
void |
MutableLeafRel.setInput(int ordinalInParent,
MutableRel input) |
void |
MutableBiRel.setInput(int ordinalInParent,
MutableRel input) |
void |
MutableRelVisitor.visit(MutableRel node) |
void |
MutableRel.MutableRelDumper.visit(MutableRel node) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
MutableRels.descendantsRecurse(List<MutableRel> list,
MutableRel rel) |
private static List<RelNode> |
MutableRels.fromMutables(List<MutableRel> nodes,
RelBuilder relBuilder) |
static MutableUnion |
MutableUnion.of(RelDataType rowType,
List<MutableRel> inputs,
boolean all)
Creates a MutableUnion.
|
static MutableMinus |
MutableMinus.of(RelDataType rowType,
List<MutableRel> inputs,
boolean all)
Creates a MutableMinus.
|
static MutableIntersect |
MutableIntersect.of(RelDataType rowType,
List<MutableRel> inputs,
boolean all)
Creates a MutableIntersect.
|
static MutableTableFunctionScan |
MutableTableFunctionScan.of(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
RexNode rexCall,
Type elementType,
Set<RelColumnMapping> columnMappings)
Creates a MutableTableFunctionScan.
|
| Constructor and Description |
|---|
MutableIntersect(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
boolean all) |
MutableMinus(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
boolean all) |
MutableMultiRel(RelOptCluster cluster,
RelDataType rowType,
MutableRelType type,
List<MutableRel> inputs) |
MutableSetOp(RelOptCluster cluster,
RelDataType rowType,
MutableRelType type,
List<MutableRel> inputs,
boolean all) |
MutableTableFunctionScan(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
RexNode rexCall,
Type elementType,
Set<RelColumnMapping> columnMappings) |
MutableUnion(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
boolean all) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.