| Package | Description |
|---|---|
| org.apache.calcite.adapter.enumerable |
Query optimizer rules for Java calling convention.
|
| org.apache.calcite.adapter.jdbc |
Query provider based on a JDBC data source.
|
| org.apache.calcite.interpreter |
Provides an implementation of relational expressions using an interpreter.
|
| org.apache.calcite.jdbc |
JDBC driver for Calcite.
|
| org.apache.calcite.plan |
Defines interfaces for constructing rule-based optimizers of
relational expressions.
|
| org.apache.calcite.plan.hep |
Provides a heuristic planner implementation for the interfaces in
org.apache.calcite.plan. |
| org.apache.calcite.plan.volcano |
Optimizes relational expressions.
|
| org.apache.calcite.prepare |
Preparation of queries (parsing, planning and implementation).
|
| org.apache.calcite.rel |
Defines relational expressions.
|
| org.apache.calcite.rel.convert |
Defines relational expressions and rules for converting between calling
conventions.
|
| org.apache.calcite.rel.core |
Defines core relational expressions.
|
| org.apache.calcite.rel.externalize |
Facilities to externalize
RelNodes to and from
XML and JSON format. |
| org.apache.calcite.rel.logical |
Defines logical relational expressions.
|
| org.apache.calcite.rel.metadata |
Defines metadata interfaces and utilities for relational
expressions.
|
| org.apache.calcite.rel.rules |
Provides a core set of planner rules.
|
| org.apache.calcite.rel.stream |
Defines relational expressions for streaming.
|
| org.apache.calcite.rex |
Provides a language for representing row-expressions.
|
| org.apache.calcite.schema |
Schema SPI.
|
| org.apache.calcite.schema.impl |
Utilities to help implement Calcite's SPIs.
|
| org.apache.calcite.sql2rel |
Translates a SQL parse tree to relational expression.
|
| org.apache.calcite.tools |
Provides utility classes.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
EnumerableRel
A relational expression of one of the
EnumerableConvention calling
conventions. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
EnumerableTableScanRule.convert(RelNode rel) |
RelNode |
EnumerableTableFunctionScanRule.convert(RelNode rel) |
RelNode |
EnumerableValuesRule.convert(RelNode rel) |
RelNode |
EnumerableCorrelateRule.convert(RelNode rel) |
RelNode |
EnumerableInterpreterRule.convert(RelNode rel) |
RelNode |
EnumerableTableModifyRule.convert(RelNode rel) |
RelNode |
EnumerableBindable.EnumerableToBindableConverterRule.convert(RelNode rel) |
RelNode |
EnumerableWindow.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableTableModify.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableInterpreter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
EnumerableTableScanRule.convert(RelNode rel) |
RelNode |
EnumerableTableFunctionScanRule.convert(RelNode rel) |
RelNode |
EnumerableValuesRule.convert(RelNode rel) |
RelNode |
EnumerableCorrelateRule.convert(RelNode rel) |
RelNode |
EnumerableInterpreterRule.convert(RelNode rel) |
RelNode |
EnumerableTableModifyRule.convert(RelNode rel) |
RelNode |
EnumerableBindable.EnumerableToBindableConverterRule.convert(RelNode rel) |
EnumerableCollect |
EnumerableCollect.copy(RelTraitSet traitSet,
RelNode newInput) |
EnumerableUncollect |
EnumerableUncollect.copy(RelTraitSet traitSet,
RelNode newInput) |
EnumerableAggregate |
EnumerableAggregate.copy(RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
EnumerableProject |
EnumerableProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
EnumerableSort |
EnumerableSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
EnumerableCorrelate |
EnumerableCorrelate.copy(RelTraitSet traitSet,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType) |
EnumerableFilter |
EnumerableFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
EnumerableCalc |
EnumerableCalc.copy(RelTraitSet traitSet,
RelNode child,
RexProgram program) |
EnumerableJoin |
EnumerableJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
SemiJoin |
EnumerableSemiJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
EnumerableMergeJoin |
EnumerableMergeJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
EnumerableThetaJoin |
EnumerableThetaJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static EnumerableInterpreter |
EnumerableInterpreter.create(RelNode input,
double factor)
Creates an EnumerableInterpreter.
|
static EnumerableProject |
EnumerableProject.create(RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
|
static EnumerableSort |
EnumerableSort.create(RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates an EnumerableSort.
|
static EnumerableMergeJoin |
EnumerableMergeJoin.create(RelNode left,
RelNode right,
RexLiteral condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType) |
static EnumerableJoin |
EnumerableJoin.create(RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Creates an EnumerableJoin.
|
static EnumerableFilter |
EnumerableFilter.create(RelNode input,
RexNode condition)
Creates an EnumerableFilter.
|
static EnumerableLimit |
EnumerableLimit.create(RelNode input,
RexNode offset,
RexNode fetch)
Creates an EnumerableLimit.
|
static EnumerableCalc |
EnumerableCalc.create(RelNode input,
RexProgram program)
Creates an EnumerableCalc.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
EnumerableWindow.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
EnumerableLimit |
EnumerableLimit.copy(RelTraitSet traitSet,
List<RelNode> newInputs) |
RelNode |
EnumerableTableModify.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
EnumerableInterpretable |
EnumerableInterpretable.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableInterpreter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
EnumerableValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
EnumerableBindable |
EnumerableBindable.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
EnumerableIntersect |
EnumerableIntersect.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
EnumerableUnion |
EnumerableUnion.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
EnumerableMinus |
EnumerableMinus.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
EnumerableTableFunctionScan |
EnumerableTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
| Constructor and Description |
|---|
EnumerableAggregate(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
EnumerableBindable(RelOptCluster cluster,
RelNode input) |
EnumerableCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexProgram program)
Creates an EnumerableCalc.
|
EnumerableCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
EnumerableCollect(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
String fieldName) |
EnumerableCorrelate(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType) |
EnumerableFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition)
Creates an EnumerableFilter.
|
EnumerableInterpretable(RelOptCluster cluster,
RelNode input) |
EnumerableInterpreter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
double factor)
Creates an EnumerableInterpreter.
|
EnumerableLimit(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode offset,
RexNode fetch)
Creates an EnumerableLimit.
|
EnumerableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates an EnumerableProject.
|
EnumerableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
EnumerableSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates an EnumerableSort.
|
EnumerableTableModify(RelOptCluster cluster,
RelTraitSet traits,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened) |
EnumerableThetaJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped) |
EnumerableUncollect(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child) |
| Constructor and Description |
|---|
EnumerableIntersect(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
EnumerableMinus(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
EnumerableTableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
Type elementType,
RelDataType rowType,
RexNode call,
Set<RelColumnMapping> columnMappings) |
EnumerableUnion(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
JdbcRel
Relational expression that uses JDBC calling convention.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
JdbcRules.JdbcAggregate
Aggregate operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcCalc
Calc operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcFilter
Implementation of
Filter in
jdbc calling convention. |
static class |
JdbcRules.JdbcIntersect
Intersect operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcJoin
Join operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcMinus
Minus operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcProject
Implementation of
LogicalProject in
jdbc calling convention. |
static class |
JdbcRules.JdbcSort
Sort operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcTableModify
Table-modification operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcUnion
Union operator implemented in JDBC convention.
|
static class |
JdbcRules.JdbcValues
Values operator implemented in JDBC convention.
|
class |
JdbcTableScan
Relational expression representing a scan of a table in a JDBC data source.
|
class |
JdbcToEnumerableConverter
Relational expression representing a scan of a table in a JDBC data source.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
JdbcRules.JdbcTableModificationRule.convert(RelNode rel) |
RelNode |
JdbcRules.JdbcValuesRule.convert(RelNode rel) |
RelNode |
JdbcToEnumerableConverterRule.convert(RelNode rel) |
RelNode |
JdbcToEnumerableConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcCalc.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcTableModify.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
JdbcRules.JdbcTableModificationRule.convert(RelNode rel) |
RelNode |
JdbcRules.JdbcValuesRule.convert(RelNode rel) |
RelNode |
JdbcToEnumerableConverterRule.convert(RelNode rel) |
JdbcRules.JdbcAggregate |
JdbcRules.JdbcAggregate.copy(RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
JdbcRules.JdbcProject |
JdbcRules.JdbcProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
JdbcRules.JdbcSort |
JdbcRules.JdbcSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
JdbcRules.JdbcFilter |
JdbcRules.JdbcFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
JdbcRules.JdbcJoin |
JdbcRules.JdbcJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
JdbcImplementor.Result |
JdbcImplementor.result(SqlNode node,
Collection<org.apache.calcite.adapter.jdbc.JdbcImplementor.Clause> clauses,
RelNode rel)
Creates a result based on a single relational expression.
|
JdbcImplementor.Result |
JdbcImplementor.visitChild(int i,
RelNode e) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
JdbcToEnumerableConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcCalc.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcTableModify.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcRules.JdbcValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
JdbcTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
JdbcRules.JdbcUnion |
JdbcRules.JdbcUnion.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
JdbcRules.JdbcIntersect |
JdbcRules.JdbcIntersect.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
JdbcRules.JdbcMinus |
JdbcRules.JdbcMinus.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
| Constructor and Description |
|---|
JdbcRules.JdbcIntersect(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
JdbcRules.JdbcMinus(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
JdbcRules.JdbcUnion(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BindableRel
Relational expression that can implement itself in Bindable
convention.
|
interface |
InterpretableRel
Relational expression that can implement itself using an interpreter.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
Bindables.BindableAggregate
Implementation of
Aggregate
in bindable calling convention. |
static class |
Bindables.BindableFilter
Implementation of
Filter
in bindable convention. |
static class |
Bindables.BindableJoin
Implementation of
Join in
bindable calling convention. |
static class |
Bindables.BindableProject
Implementation of
Project in
bindable calling convention. |
static class |
Bindables.BindableSort
Implementation of
Sort
bindable calling convention. |
static class |
Bindables.BindableTableScan
Scan of a table that implements
ScannableTable and therefore can
be converted into an Enumerable. |
static class |
Bindables.BindableUnion
Implementation of
Union in
bindable calling convention. |
static class |
Bindables.BindableValues
Implementation of
Values
in bindable calling convention. |
static class |
Bindables.BindableWindow
Implementation of
Window
in bindable convention. |
class |
InterpretableConverter
Relational expression that converts any relational expression input to
InterpretableConvention, by wrapping
it in an interpreter. |
| Modifier and Type | Field and Description |
|---|---|
protected RelNode |
Interpreter.Compiler.rel |
protected RelNode |
Interpreter.Compiler.rootRel |
| Modifier and Type | Field and Description |
|---|---|
Map<RelNode,List<Sink>> |
InterpretableRel.InterpreterImplementor.relSinks |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
NoneToBindableConverterRule.convert(RelNode rel) |
RelNode |
InterpretableConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Bindables.BindableValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Bindables.BindableWindow.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Interpreter.Compiler.visitRoot(RelNode p) |
| Modifier and Type | Method and Description |
|---|---|
static ArrayBindable |
Interpreters.bindable(RelNode rel)
Creates a
Bindable that interprets a
given relational expression. |
RelNode |
NoneToBindableConverterRule.convert(RelNode rel) |
Bindables.BindableAggregate |
Bindables.BindableAggregate.copy(RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
Bindables.BindableProject |
Bindables.BindableProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
Bindables.BindableSort |
Bindables.BindableSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
Bindables.BindableFilter |
Bindables.BindableFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
Bindables.BindableJoin |
Bindables.BindableJoin.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static Bindables.BindableFilter |
Bindables.BindableFilter.create(RelNode input,
RexNode condition)
Creates a BindableFilter.
|
void |
Interpreter.Compiler.rewrite(RelNode r)
Fallback rewrite method.
|
Sink |
Interpreter.sink(RelNode rel) |
Source |
Interpreter.source(RelNode rel,
int ordinal) |
void |
Interpreter.Compiler.visit(RelNode p,
int ordinal,
RelNode parent) |
RelNode |
Interpreter.Compiler.visitRoot(RelNode p) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
InterpretableConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Bindables.BindableValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Bindables.BindableWindow.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
Bindables.BindableUnion |
Bindables.BindableUnion.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
| Constructor and Description |
|---|
Bindables.BindableAggregate(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
Bindables.BindableFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode condition) |
Bindables.BindableJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped) |
Bindables.BindableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
Bindables.BindableSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
InterpretableConverter(RelOptCluster cluster,
RelTraitSet traits,
RelNode input) |
Interpreter(DataContext dataContext,
RelNode rootRel) |
| Constructor and Description |
|---|
Bindables.BindableUnion(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
| Modifier and Type | Field and Description |
|---|---|
RelNode |
CalcitePrepare.ConvertResult.relNode |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
CalcitePrepare.SparkHandler.flattenTypes(RelOptPlanner planner,
RelNode rootRel,
boolean restructure) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
CalcitePrepare.SparkHandler.flattenTypes(RelOptPlanner planner,
RelNode rootRel,
boolean restructure) |
| Constructor and Description |
|---|
CalcitePrepare.ConvertResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelNode relNode) |
| Modifier and Type | Field and Description |
|---|---|
RelNode |
RelOptMaterialization.queryRel |
RelNode[] |
RelOptRuleCall.rels |
RelNode |
RelOptMaterialization.tableRel |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RelNode> |
RelOptUtil.addTrait(T rel,
RelTrait trait) |
static <R extends RelNode> |
RelOptRule.operand(Class<R> clazz,
RelOptRuleOperandChildren operandList)
Creates an operand that matches a relational expression that has no
children.
|
static <R extends RelNode> |
RelOptRule.operand(Class<R> clazz,
RelOptRuleOperand first,
RelOptRuleOperand... rest)
Creates an operand that matches a relational expression with a given
list of children.
|
static <R extends RelNode> |
RelOptRule.operand(Class<R> clazz,
RelTrait trait,
com.google.common.base.Predicate<? super R> predicate,
RelOptRuleOperandChildren operandList)
Creates an operand that matches a relational expression that has a
particular trait and predicate.
|
static <R extends RelNode> |
RelOptRule.operand(Class<R> clazz,
RelTrait trait,
com.google.common.base.Predicate<? super R> predicate,
RelOptRuleOperand first,
RelOptRuleOperand... rest)
Creates an operand that matches a relational expression that has no
children.
|
static <R extends RelNode> |
RelOptRule.operand(Class<R> clazz,
RelTrait trait,
RelOptRuleOperandChildren operandList)
Creates an operand that matches a relational expression that has no
children.
|
<T extends RelNode> |
RelOptRuleCall.rel(int ordinal)
Retrieves the
ordinalth matched relational expression. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
RelOptPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits)
Changes a relational expression to an equivalent one with a different set
of traits.
|
static RelNode |
RelOptRule.convert(RelNode rel,
RelTrait toTrait)
Converts one trait of a relational expression, if it does not
already have that trait.
|
static RelNode |
RelOptRule.convert(RelNode rel,
RelTraitSet toTraits)
Converts a relation expression to a given set of traits, if it does not
already have those traits.
|
RelNode |
ConventionTraitDef.convert(RelOptPlanner planner,
RelNode rel,
Convention toConvention,
boolean allowInfiniteCostConverters) |
abstract RelNode |
RelTraitDef.convert(RelOptPlanner planner,
RelNode rel,
T toTrait,
boolean allowInfiniteCostConverters)
Converts the given RelNode to the given RelTrait.
|
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename,
RelFactories.ProjectFactory projectFactory)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createDistinctRel(RelNode rel)
Creates a LogicalAggregate that removes all duplicates from the result of
an underlying relational expression.
|
static RelNode |
RelOptUtil.createExistsPlan(RelOptCluster cluster,
RelNode seekRel,
List<RexNode> conditions,
RexLiteral extraExpr,
String extraName)
Creates a plan suitable for use in
EXISTS or IN
statements. |
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions)
Creates a filter, using the default filter factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions,
RelFactories.FilterFactory filterFactory)
Creates a filter using the default factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition)
Creates a relational expression which filters according to a given
condition, returning the same fields as its input, using the default
filter factory.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition,
RelFactories.FilterFactory filterFactory)
Creates a relational expression which filters according to a given
condition, returning the same fields as its input.
|
static RelNode |
RelOptUtil.createNullFilter(RelNode rel,
Integer[] fieldOrdinals)
Creates a filter which will remove rows containing NULL values.
|
static RelNode |
RelOptUtil.createProject(RelFactories.ProjectFactory factory,
RelNode child,
List<Integer> posList)
Creates a relational expression that projects the given fields of the
input.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprList,
List<String> fieldNameList)
Creates a relational expression which projects a list of expressions.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprs,
List<String> fieldNames,
boolean optimize)
Creates a relational expression which projects an array of expressions,
and optionally optimizes.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<Integer> posList)
Creates a relational expression that projects the given fields of the
input.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<Pair<RexNode,String>> projectList,
boolean optimize)
Creates a relational expression which projects a list of (expression, name)
pairs.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
Mappings.TargetMapping mapping)
Creates a
LogicalProject that
projects particular fields of its input, according to a mapping. |
static RelNode |
RelOptUtil.createProjectJoinRel(List<Integer> outputProj,
RelNode joinRel)
Creates a projection on top of a join, if the desired projection is a
subset of the join columns
|
static RelNode |
RelOptUtil.createRename(RelNode rel,
List<String> fieldNames)
Returns a relational expression which has the same fields as the
underlying expression, but the fields have different names.
|
static RelNode |
RelOptUtil.createRenameRel(RelDataType outputType,
RelNode rel)
Creates a LogicalProject which accomplishes a rename.
|
static RelNode |
RelOptUtil.createSingleValueAggRel(RelOptCluster cluster,
RelNode rel)
Creates a LogicalAggregate that removes all duplicates from the result of
an underlying relational expression.
|
RelNode |
RelOptPlanner.ensureRegistered(RelNode rel,
RelNode equivRel)
Registers a relational expression if it is not already registered.
|
RelNode |
RelOptTable.ViewExpander.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath) |
RelNode |
RelOptPlanner.findBestExp()
Finds the most efficient expression to implement this query.
|
RelNode |
RelOptListener.RelEvent.getRel() |
RelNode[] |
RelOptRuleCall.getRels()
Deprecated.
|
RelNode |
RelOptPlanner.getRoot()
Returns the root node of this query.
|
RelNode |
SubstitutionVisitor.go(RelNode replacement_) |
RelNode |
SubstitutionVisitor.go0(RelNode replacement_) |
RelNode |
RelOptQuery.lookupCorrel(String name)
Returns the relational expression which populates a correlating variable.
|
static RelNode |
RelOptUtil.permute(RelNode rel,
Permutation permutation,
List<String> fieldNames)
Creates a relational expression which permutes the output fields of a
relational expression according to a permutation.
|
static RelNode |
RelOptUtil.projectMapping(RelNode rel,
Mapping mapping,
List<String> fieldNames,
RelFactories.ProjectFactory projectFactory)
Creates a relational expression which projects the output fields of a
relational expression according to a partial mapping.
|
RelNode |
RelOptPlanner.register(RelNode rel,
RelNode equivRel)
Registers a relational expression in the expression bank.
|
static RelNode |
RelOptUtil.renameIfNecessary(RelNode rel,
RelDataType desiredRowType)
Renames a relational expression to make its field names the same as
another row type.
|
static RelNode |
RelOptUtil.replace(RelNode query,
RelNode find,
RelNode replace)
Within a relational expression
query, replaces occurrences of
find with replace. |
static RelNode |
RelOptUtil.replaceInput(RelNode parent,
int ordinal,
RelNode newInput)
Returns a shallow copy of a relational expression with a particular
input replaced.
|
RelNode |
RelOptLattice.rewrite(RelNode node)
Rewrites a relational expression to use a lattice.
|
static RelNode |
RelOptMaterialization.toLeafJoinForm(RelNode rel)
Converts a relational expression to a form where
LogicalJoins are
as close to leaves as possible. |
RelNode |
RelOptAbstractTable.toRel(RelOptTable.ToRelContext context) |
RelNode |
RelOptTable.toRel(RelOptTable.ToRelContext context)
Converts this table into a
relational expression. |
static RelNode |
RelOptMaterialization.tryUseStar(RelNode rel,
RelOptTable starRelOptTable)
Converts a relational expression to one that uses a
StarTable. |
| Modifier and Type | Method and Description |
|---|---|
static List<RelNode> |
RelOptRule.convertList(List<RelNode> rels,
RelTrait trait)
Converts a list of relational expressions.
|
static Pair<RelNode,Boolean> |
RelOptUtil.createExistsPlan(RelNode seekRel,
RelOptUtil.SubqueryType subqueryType,
RelOptUtil.Logic logic,
boolean needsOuterJoin)
Creates a plan suitable for use in
EXISTS or IN
statements. |
List<RelNode> |
RelOptRuleCall.getChildRels(RelNode rel)
Returns the children of a given relational expression node matched in a
rule.
|
Class<? extends RelNode> |
RelOptRuleOperand.getMatchedClass() |
List<RelNode> |
RelOptRuleCall.getParents() |
List<RelNode> |
RelOptRuleCall.getRelList()
Returns a list of matched relational expressions.
|
Iterable<Class<? extends RelNode>> |
AbstractRelOptPlanner.subClasses(Class<? extends RelNode> clazz)
Returns sub-classes of relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
RelOptPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits)
Changes a relational expression to an equivalent one with a different set
of traits.
|
static boolean |
RelOptUtil.classifyFilters(RelNode joinRel,
List<RexNode> filters,
JoinRelType joinType,
boolean pushInto,
boolean pushLeft,
boolean pushRight,
List<RexNode> joinFilters,
List<RexNode> leftFilters,
List<RexNode> rightFilters)
Classifies filters according to where they should be processed.
|
static boolean |
RelOptUtil.contains(RelNode ancestor,
RelNode target)
Returns whether relational expression
target occurs within a
relational expression ancestor. |
static RelNode |
RelOptRule.convert(RelNode rel,
RelTrait toTrait)
Converts one trait of a relational expression, if it does not
already have that trait.
|
static RelNode |
RelOptRule.convert(RelNode rel,
RelTraitSet toTraits)
Converts a relation expression to a given set of traits, if it does not
already have those traits.
|
RelNode |
ConventionTraitDef.convert(RelOptPlanner planner,
RelNode rel,
Convention toConvention,
boolean allowInfiniteCostConverters) |
abstract RelNode |
RelTraitDef.convert(RelOptPlanner planner,
RelNode rel,
T toTrait,
boolean allowInfiniteCostConverters)
Converts the given RelNode to the given RelTrait.
|
static int |
RelOptUtil.countJoins(RelNode rootRel)
Returns the number of
Join nodes in a
tree. |
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename,
RelFactories.ProjectFactory projectFactory)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createDistinctRel(RelNode rel)
Creates a LogicalAggregate that removes all duplicates from the result of
an underlying relational expression.
|
static RexNode |
RelOptUtil.createEquiJoinCondition(RelNode left,
List<Integer> leftKeys,
RelNode right,
List<Integer> rightKeys,
RexBuilder rexBuilder)
Builds an equi-join condition from a set of left and right keys.
|
static Pair<RelNode,Boolean> |
RelOptUtil.createExistsPlan(RelNode seekRel,
RelOptUtil.SubqueryType subqueryType,
RelOptUtil.Logic logic,
boolean needsOuterJoin)
Creates a plan suitable for use in
EXISTS or IN
statements. |
static RelNode |
RelOptUtil.createExistsPlan(RelOptCluster cluster,
RelNode seekRel,
List<RexNode> conditions,
RexLiteral extraExpr,
String extraName)
Creates a plan suitable for use in
EXISTS or IN
statements. |
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions)
Creates a filter, using the default filter factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions,
RelFactories.FilterFactory filterFactory)
Creates a filter using the default factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition)
Creates a relational expression which filters according to a given
condition, returning the same fields as its input, using the default
filter factory.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition,
RelFactories.FilterFactory filterFactory)
Creates a relational expression which filters according to a given
condition, returning the same fields as its input.
|
static RelNode |
RelOptUtil.createNullFilter(RelNode rel,
Integer[] fieldOrdinals)
Creates a filter which will remove rows containing NULL values.
|
static RelNode |
RelOptUtil.createProject(RelFactories.ProjectFactory factory,
RelNode child,
List<Integer> posList)
Creates a relational expression that projects the given fields of the
input.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprList,
List<String> fieldNameList)
Creates a relational expression which projects a list of expressions.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprs,
List<String> fieldNames,
boolean optimize)
Creates a relational expression which projects an array of expressions,
and optionally optimizes.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<Integer> posList)
Creates a relational expression that projects the given fields of the
input.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<Pair<RexNode,String>> projectList,
boolean optimize)
Creates a relational expression which projects a list of (expression, name)
pairs.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
Mappings.TargetMapping mapping)
Creates a
LogicalProject that
projects particular fields of its input, according to a mapping. |
static RelNode |
RelOptUtil.createProjectJoinRel(List<Integer> outputProj,
RelNode joinRel)
Creates a projection on top of a join, if the desired projection is a
subset of the join columns
|
static RelNode |
RelOptUtil.createRename(RelNode rel,
List<String> fieldNames)
Returns a relational expression which has the same fields as the
underlying expression, but the fields have different names.
|
static RelNode |
RelOptUtil.createRenameRel(RelDataType outputType,
RelNode rel)
Creates a LogicalProject which accomplishes a rename.
|
static RelNode |
RelOptUtil.createSingleValueAggRel(RelOptCluster cluster,
RelNode rel)
Creates a LogicalAggregate that removes all duplicates from the result of
an underlying relational expression.
|
static List<RexNode> |
RelOptUtil.createSwappedJoinExprs(RelNode newJoin,
Join origJoin,
boolean origOrder)
Creates projection expressions reflecting the swapping of a join's input.
|
static String |
RelOptUtil.dumpPlan(String header,
RelNode rel,
boolean asXml,
SqlExplainLevel detailLevel)
Dumps a plan as a string.
|
RelNode |
RelOptPlanner.ensureRegistered(RelNode rel,
RelNode equivRel)
Registers a relational expression if it is not already registered.
|
static boolean |
RelOptUtil.equalType(String desc0,
RelNode rel0,
String desc1,
RelNode rel1,
boolean fail)
Returns whether two relational expressions have the same row-type.
|
List<RelNode> |
RelOptRuleCall.getChildRels(RelNode rel)
Returns the children of a given relational expression node matched in a
rule.
|
RelOptCost |
AbstractRelOptPlanner.getCost(RelNode rel) |
RelOptCost |
RelOptPlanner.getCost(RelNode rel)
Computes the cost of a RelNode.
|
long |
AbstractRelOptPlanner.getRelMetadataTimestamp(RelNode rel) |
long |
RelOptPlanner.getRelMetadataTimestamp(RelNode rel)
Gets a timestamp for a given rel's metadata.
|
static Set<String> |
RelOptUtil.getVariablesSet(RelNode rel)
Returns a list of variables set by a relational expression or its
descendants.
|
static List<String> |
RelOptUtil.getVariablesSetAndUsed(RelNode rel0,
RelNode rel1)
Returns a set of distinct variables set by
rel0 and used by
rel1. |
static Set<String> |
RelOptUtil.getVariablesUsed(RelNode rel)
Returns a set of variables used by a relational expression or its
descendants.
|
RelNode |
SubstitutionVisitor.go(RelNode replacement_) |
static void |
RelOptUtil.go(RelVisitor visitor,
RelNode p)
Sets a
RelVisitor going on a given relational expression, and
returns the result. |
RelNode |
SubstitutionVisitor.go0(RelNode replacement_) |
static boolean |
RelOptUtil.isEqui(RelNode left,
RelNode right,
RexNode condition)
Returns whether a join condition is an "equi-join" condition.
|
boolean |
RelOptPlanner.isRegistered(RelNode rel)
Determines whether a relational expression has been registered.
|
void |
RelOptQuery.mapCorrel(String name,
RelNode rel)
Maps a correlating variable to a
RelNode. |
boolean |
RelOptRuleOperand.matches(RelNode rel)
Returns whether a relational expression matches this operand.
|
protected void |
AbstractRelOptPlanner.notifyChosen(RelNode rel)
Takes care of tracing and listener notification when a rel is chosen as
part of the final plan.
|
protected void |
AbstractRelOptPlanner.notifyDiscard(RelNode rel)
Takes care of tracing and listener notification when a rel is discarded
|
protected void |
AbstractRelOptPlanner.notifyEquivalence(RelNode rel,
Object equivalenceClass,
boolean physical)
Takes care of tracing and listener notification when a rel equivalence is
detected.
|
protected void |
AbstractRelOptPlanner.notifyTransformation(RelOptRuleCall ruleCall,
RelNode newRel,
boolean before)
Takes care of tracing and listener notification when a rule's
transformation is applied.
|
void |
AbstractRelOptPlanner.onCopy(RelNode rel,
RelNode newRel) |
void |
RelOptPlanner.onCopy(RelNode rel,
RelNode newRel)
Called when a relational expression is copied to a similar expression.
|
protected void |
AbstractRelOptPlanner.onNewClass(RelNode node)
Called when a new class of
RelNode is seen. |
static RelNode |
RelOptUtil.permute(RelNode rel,
Permutation permutation,
List<String> fieldNames)
Creates a relational expression which permutes the output fields of a
relational expression according to a permutation.
|
static void |
RelOptUtil.projectJoinInputs(RelNode[] inputRels,
List<RexNode> leftJoinKeys,
List<RexNode> rightJoinKeys,
int systemColCount,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Integer> outputProj)
Adding projection to the inputs of a join to produce the required join
keys.
|
static RelNode |
RelOptUtil.projectMapping(RelNode rel,
Mapping mapping,
List<String> fieldNames,
RelFactories.ProjectFactory projectFactory)
Creates a relational expression which projects the output fields of a
relational expression according to a partial mapping.
|
RelNode |
RelOptPlanner.register(RelNode rel,
RelNode equivRel)
Registers a relational expression in the expression bank.
|
void |
AbstractRelOptPlanner.registerClass(RelNode node) |
void |
RelOptPlanner.registerClass(RelNode node)
Registers a class of RelNode.
|
static RelNode |
RelOptUtil.renameIfNecessary(RelNode rel,
RelDataType desiredRowType)
Renames a relational expression to make its field names the same as
another row type.
|
static RelNode |
RelOptUtil.replace(RelNode query,
RelNode find,
RelNode replace)
Within a relational expression
query, replaces occurrences of
find with replace. |
static RelNode |
RelOptUtil.replaceInput(RelNode parent,
int ordinal,
RelNode newInput)
Returns a shallow copy of a relational expression with a particular
input replaced.
|
RelNode |
RelOptLattice.rewrite(RelNode node)
Rewrites a relational expression to use a lattice.
|
void |
AbstractRelOptPlanner.setImportance(RelNode rel,
double importance) |
void |
RelOptPlanner.setImportance(RelNode rel,
double importance)
Sets the importance of a relational expression.
|
void |
RelOptPlanner.setRoot(RelNode rel)
Sets the root node of this query.
|
static JoinRelType |
RelOptUtil.simplifyJoin(RelNode joinRel,
com.google.common.collect.ImmutableList<RexNode> aboveFilters,
JoinRelType joinType)
Simplifies outer joins if filter above would reject nulls.
|
static RexNode |
RelOptUtil.splitJoinCondition(List<RelDataTypeField> sysFieldList,
RelNode leftRel,
RelNode rightRel,
RexNode condition,
List<RexNode> leftJoinKeys,
List<RexNode> rightJoinKeys,
List<Integer> filterNulls,
List<SqlOperator> rangeOp)
Splits out the equi-join (and optionally, a single non-equi) components
of a join condition, and returns what's left.
|
static RexNode |
RelOptUtil.splitJoinCondition(RelNode left,
RelNode right,
RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys)
Splits out the equi-join components of a join condition, and returns
what's left.
|
static RelNode |
RelOptMaterialization.toLeafJoinForm(RelNode rel)
Converts a relational expression to a form where
LogicalJoins are
as close to leaves as possible. |
static String |
RelOptUtil.toString(RelNode rel)
Converts a relational expression to a string, showing just basic
attributes.
|
static String |
RelOptUtil.toString(RelNode rel,
SqlExplainLevel detailLevel)
Converts a relational expression to a string.
|
void |
RelOptRuleCall.transformTo(RelNode rel)
Registers that a rule has produced an equivalent relational expression,
but no other equivalences.
|
abstract void |
RelOptRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv)
Registers that a rule has produced an equivalent relational expression.
|
static RelNode |
RelOptMaterialization.tryUseStar(RelNode rel,
RelOptTable starRelOptTable)
Converts a relational expression to one that uses a
StarTable. |
static void |
RelOptUtil.verifyTypeEquivalence(RelNode originalRel,
RelNode newRel,
Object equivalenceClass)
Verifies that a row type being added to an equivalence class matches the
existing type, raising an assertion if this is not the case.
|
void |
RelTraitPropagationVisitor.visit(RelNode rel,
int ordinal,
RelNode parent) |
| Modifier and Type | Method and Description |
|---|---|
static List<RelNode> |
RelOptRule.convertList(List<RelNode> rels,
RelTrait trait)
Converts a list of relational expressions.
|
static RexNode |
RelOptUtil.splitJoinCondition(List<RelDataTypeField> sysFieldList,
List<RelNode> inputs,
RexNode condition,
List<List<RexNode>> joinKeys,
List<Integer> filterNulls,
List<SqlOperator> rangeOp)
Splits out the equi-join (and optionally, a single non-equi) components
of a join condition, and returns what's left.
|
Iterable<Class<? extends RelNode>> |
AbstractRelOptPlanner.subClasses(Class<? extends RelNode> clazz)
Returns sub-classes of relational expression.
|
abstract void |
RelOptRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv)
Registers that a rule has produced an equivalent relational expression.
|
abstract void |
RelOptRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv)
Registers that a rule has produced an equivalent relational expression.
|
| Constructor and Description |
|---|
RelOptListener.RelChosenEvent(Object eventSource,
RelNode rel) |
RelOptListener.RelDiscardedEvent(Object eventSource,
RelNode rel) |
RelOptListener.RelEquivalenceEvent(Object eventSource,
RelNode rel,
Object equivalenceClass,
boolean isPhysical) |
RelOptListener.RelEvent(Object eventSource,
RelNode rel) |
RelOptListener.RuleAttemptedEvent(Object eventSource,
RelNode rel,
RelOptRuleCall ruleCall,
boolean before) |
RelOptListener.RuleEvent(Object eventSource,
RelNode rel,
RelOptRuleCall ruleCall) |
RelOptListener.RuleProductionEvent(Object eventSource,
RelNode rel,
RelOptRuleCall ruleCall,
boolean before) |
RelOptMaterialization(RelNode tableRel,
RelNode queryRel,
RelOptTable starRelOptTable)
Creates a RelOptMaterialization.
|
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs) |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs,
List<RelNode> parents)
Creates a RelOptRuleCall.
|
SubstitutionVisitor(RelNode target_,
RelNode query_) |
TableAccessMap(RelNode rel)
Constructs a TableAccessMap for all tables accessed by a RelNode and its
descendants.
|
| Constructor and Description |
|---|
Convention.Impl(String name,
Class<? extends RelNode> relClass) |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs) |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs) |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs,
List<RelNode> parents)
Creates a RelOptRuleCall.
|
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs,
List<RelNode> parents)
Creates a RelOptRuleCall.
|
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeInputs,
List<RelNode> parents)
Creates a RelOptRuleCall.
|
| Modifier and Type | Class and Description |
|---|---|
class |
HepRelVertex
HepRelVertex wraps a real
RelNode as a vertex in a DAG representing
the entire query expression. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
HepPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits) |
RelNode |
HepRelVertex.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
HepPlanner.ensureRegistered(RelNode rel,
RelNode equivRel) |
RelNode |
HepPlanner.findBestExp() |
RelNode |
HepRelVertex.getCurrentRel() |
RelNode |
HepPlanner.getRoot() |
RelNode |
HepPlanner.register(RelNode rel,
RelNode equivRel) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
HepPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits) |
RelNode |
HepPlanner.ensureRegistered(RelNode rel,
RelNode equivRel) |
long |
HepPlanner.getRelMetadataTimestamp(RelNode rel) |
boolean |
HepPlanner.isRegistered(RelNode rel) |
void |
HepPlanner.onCopy(RelNode rel,
RelNode newRel) |
RelNode |
HepPlanner.register(RelNode rel,
RelNode equivRel) |
void |
HepPlanner.setRoot(RelNode rel) |
void |
HepRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
HepRelVertex.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
void |
HepRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
void |
HepRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
| Constructor and Description |
|---|
HepPlanner(HepProgram program,
Context context,
boolean noDAG,
Function2<RelNode,RelNode,Void> onCopyHook,
RelOptCostFactory costFactory)
Creates a new HepPlanner with the option to keep the graph a
tree(noDAG=true) or allow DAG(noDAG=false).
|
HepPlanner(HepProgram program,
Context context,
boolean noDAG,
Function2<RelNode,RelNode,Void> onCopyHook,
RelOptCostFactory costFactory)
Creates a new HepPlanner with the option to keep the graph a
tree(noDAG=true) or allow DAG(noDAG=false).
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractConverter
Converts a relational expression to any given output convention.
|
class |
RelSubset
Subset of an equivalence class where all relational expressions have the
same physical properties.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
VolcanoPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits) |
RelNode |
AbstractConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
RelSubset.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
VolcanoPlanner.findBestExp()
Finds the most efficient expression to implement the query given via
RelOptPlanner.setRoot(org.apache.calcite.rel.RelNode). |
RelNode |
RelSubset.getBest() |
RelNode |
VolcanoPlanner.getRoot() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<RelNode,Metadata> |
VolcanoRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
Collection<RelNode> |
RelSubset.getParentRels()
Returns a list of relational expressions one of whose children is this
subset.
|
List<RelNode> |
RelSubset.getRelList()
As
RelSubset.getRels() but returns a list. |
Iterable<RelNode> |
RelSubset.getRels()
Returns the rel nodes in this rel subset.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
VolcanoPlanner.changeTraits(RelNode rel,
RelTraitSet toTraits) |
RelSubset |
VolcanoPlanner.ensureRegistered(RelNode rel,
RelNode equivRel) |
void |
VolcanoPlanner.ensureRegistered(RelNode rel,
RelNode equivRel,
VolcanoRuleCall ruleCall) |
RelOptCost |
VolcanoPlanner.getCost(RelNode rel) |
long |
VolcanoPlanner.getRelMetadataTimestamp(RelNode rel) |
org.apache.calcite.plan.volcano.RelSet |
VolcanoPlanner.getSet(RelNode rel)
Finds an expression's equivalence set.
|
RelSubset |
VolcanoPlanner.getSubset(RelNode rel)
Returns the subset that a relational expression belongs to.
|
RelSubset |
VolcanoPlanner.getSubset(RelNode rel,
RelTraitSet traits) |
RelSubset |
VolcanoPlanner.getSubset(RelNode rel,
RelTraitSet traits,
boolean createIfMissing) |
boolean |
VolcanoPlanner.isRegistered(RelNode rel) |
protected void |
VolcanoPlanner.onNewClass(RelNode node) |
RelSubset |
VolcanoPlanner.register(RelNode rel,
RelNode equivRel) |
void |
VolcanoPlanner.setImportance(RelNode rel,
double importance) |
void |
VolcanoPlanner.setRoot(RelNode rel) |
void |
VolcanoRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<RelNode,Metadata> |
VolcanoRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
RelNode |
AbstractConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
RelSubset.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
void |
VolcanoRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
void |
VolcanoRuleCall.transformTo(RelNode rel,
Map<RelNode,RelNode> equiv) |
| Constructor and Description |
|---|
VolcanoRuleCall(VolcanoPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels)
Creates a rule call, internal, with array to hold bindings.
|
| Modifier and Type | Field and Description |
|---|---|
protected RelNode |
Prepare.PreparedResultImpl.rootRel |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
PlannerImpl.convert(SqlNode sql) |
protected abstract RelNode |
Prepare.decorrelate(SqlToRelConverter sqlToRelConverter,
SqlNode query,
RelNode rootRel) |
RelNode |
PlannerImpl.ViewExpanderImpl.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath) |
RelNode |
Prepare.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath)
Returns a relational expression which is to be substituted for an access
to a SQL view.
|
abstract RelNode |
Prepare.flattenTypes(RelNode rootRel,
boolean restructure) |
RelNode |
Prepare.PreparedExplain.getRel() |
RelNode |
Prepare.PreparedResultImpl.getRootRel() |
protected RelNode |
Prepare.optimize(RelNode rootRel,
List<Prepare.Materialization> materializations,
List<CalciteSchema.LatticeEntry> lattices)
Optimizes a query plan.
|
RelNode |
RelOptTableImpl.toRel(RelOptTable.ToRelContext context) |
RelNode |
PlannerImpl.transform(int ruleSetIndex,
RelTraitSet requiredOutputTraits,
RelNode rel) |
protected RelNode |
Prepare.trimUnusedFields(RelNode rootRel)
Walks over a tree of relational expressions, replacing each
RelNode with a 'slimmed down' relational
expression that projects
only the columns required by its consumer. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Prepare.PreparedResult |
Prepare.createPreparedExplanation(RelDataType resultType,
RelDataType parameterRowType,
RelNode rootRel,
boolean explainAsXml,
SqlExplainLevel detailLevel) |
protected abstract RelNode |
Prepare.decorrelate(SqlToRelConverter sqlToRelConverter,
SqlNode query,
RelNode rootRel) |
abstract RelNode |
Prepare.flattenTypes(RelNode rootRel,
boolean restructure) |
protected RelTraitSet |
Prepare.getDesiredRootTraitSet(RelNode rootRel) |
protected abstract Prepare.PreparedResult |
Prepare.implement(RelDataType rowType,
RelNode rootRel,
SqlKind sqlKind)
Implements a physical query plan.
|
void |
Prepare.Materialization.materialize(RelNode queryRel,
RelOptTable starRelOptTable) |
protected RelNode |
Prepare.optimize(RelNode rootRel,
List<Prepare.Materialization> materializations,
List<CalciteSchema.LatticeEntry> lattices)
Optimizes a query plan.
|
RelNode |
PlannerImpl.transform(int ruleSetIndex,
RelTraitSet requiredOutputTraits,
RelNode rel) |
protected RelNode |
Prepare.trimUnusedFields(RelNode rootRel)
Walks over a tree of relational expressions, replacing each
RelNode with a 'slimmed down' relational
expression that projects
only the columns required by its consumer. |
| Constructor and Description |
|---|
Prepare.PreparedExplain(RelDataType rowType,
RelDataType parameterRowType,
RelNode rel,
boolean asXml,
SqlExplainLevel detailLevel) |
Prepare.PreparedResultImpl(RelDataType rowType,
RelDataType parameterRowType,
List<List<String>> fieldOrigins,
RelNode rootRel,
TableModify.Operation tableModOp,
boolean isDml) |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractRelNode
Base class for every relational expression (
RelNode). |
class |
BiRel
Abstract base class for relational expressions with a two inputs.
|
class |
SingleRel
Abstract base class for relational expressions with a single input.
|
| Modifier and Type | Field and Description |
|---|---|
protected RelNode |
BiRel.left |
protected RelNode |
BiRel.right |
| Modifier and Type | Field and Description |
|---|---|
static Comparator<RelNode> |
RelNodes.COMPARATOR
Comparator that provides an arbitrary but stable ordering to
RelNodes. |
static com.google.common.collect.Ordering<RelNode> |
RelNodes.ORDERING
Ordering for
RelNodes. |
protected List<RelNode> |
RelShuttleImpl.stack |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
AbstractRelNode.accept(RelShuttle shuttle) |
RelNode |
RelNode.accept(RelShuttle shuttle)
Accepts a visit from a shuttle.
|
RelNode |
AbstractRelNode.accept(RexShuttle shuttle) |
RelNode |
RelNode.accept(RexShuttle shuttle)
Accepts a visit from a shuttle.
|
RelNode |
RelCollationTraitDef.convert(RelOptPlanner planner,
RelNode rel,
RelCollation toCollation,
boolean allowInfiniteCostConverters) |
RelNode |
RelDistributionTraitDef.convert(RelOptPlanner planner,
RelNode rel,
RelDistribution toDistribution,
boolean allowInfiniteCostConverters) |
RelNode |
AbstractRelNode.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
RelNode.copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
RelNode |
SingleRel.getInput() |
RelNode |
RelInput.getInput()
Returns the input relational expression.
|
RelNode |
AbstractRelNode.getInput(int i) |
RelNode |
RelNode.getInput(int i)
Returns the
ith input relational expression. |
RelNode |
BiRel.getLeft() |
RelNode |
BiRel.getRight() |
RelNode |
RelVisitor.go(RelNode p)
Starts an iteration.
|
RelNode |
AbstractRelNode.onRegister(RelOptPlanner planner) |
RelNode |
RelNode.onRegister(RelOptPlanner planner)
Receives notification that this expression is about to be registered.
|
RelNode |
RelShuttleImpl.visit(LogicalAggregate aggregate) |
RelNode |
RelHomogeneousShuttle.visit(LogicalAggregate aggregate) |
RelNode |
RelShuttle.visit(LogicalAggregate aggregate) |
RelNode |
RelShuttleImpl.visit(LogicalCorrelate correlate) |
RelNode |
RelHomogeneousShuttle.visit(LogicalCorrelate correlate) |
RelNode |
RelShuttle.visit(LogicalCorrelate correlate) |
RelNode |
RelShuttleImpl.visit(LogicalExchange exchange) |
RelNode |
RelHomogeneousShuttle.visit(LogicalExchange exchange) |
RelNode |
RelShuttle.visit(LogicalExchange exchange) |
RelNode |
RelShuttleImpl.visit(LogicalFilter filter) |
RelNode |
RelHomogeneousShuttle.visit(LogicalFilter filter) |
RelNode |
RelShuttle.visit(LogicalFilter filter) |
RelNode |
RelShuttleImpl.visit(LogicalIntersect intersect) |
RelNode |
RelHomogeneousShuttle.visit(LogicalIntersect intersect) |
RelNode |
RelShuttle.visit(LogicalIntersect intersect) |
RelNode |
RelShuttleImpl.visit(LogicalJoin join) |
RelNode |
RelHomogeneousShuttle.visit(LogicalJoin join) |
RelNode |
RelShuttle.visit(LogicalJoin join) |
RelNode |
RelShuttleImpl.visit(LogicalMinus minus) |
RelNode |
RelHomogeneousShuttle.visit(LogicalMinus minus) |
RelNode |
RelShuttle.visit(LogicalMinus minus) |
RelNode |
RelShuttleImpl.visit(LogicalProject project) |
RelNode |
RelHomogeneousShuttle.visit(LogicalProject project) |
RelNode |
RelShuttle.visit(LogicalProject project) |
RelNode |
RelShuttleImpl.visit(LogicalSort sort) |
RelNode |
RelHomogeneousShuttle.visit(LogicalSort sort) |
RelNode |
RelShuttle.visit(LogicalSort sort) |
RelNode |
RelShuttleImpl.visit(LogicalUnion union) |
RelNode |
RelHomogeneousShuttle.visit(LogicalUnion union) |
RelNode |
RelShuttle.visit(LogicalUnion union) |
RelNode |
RelShuttleImpl.visit(LogicalValues values) |
RelNode |
RelHomogeneousShuttle.visit(LogicalValues values) |
RelNode |
RelShuttle.visit(LogicalValues values) |
RelNode |
RelShuttleImpl.visit(RelNode other) |
RelNode |
RelShuttle.visit(RelNode other) |
RelNode |
RelShuttleImpl.visit(TableFunctionScan scan) |
RelNode |
RelHomogeneousShuttle.visit(TableFunctionScan scan) |
RelNode |
RelShuttle.visit(TableFunctionScan scan) |
RelNode |
RelShuttleImpl.visit(TableScan scan) |
RelNode |
RelHomogeneousShuttle.visit(TableScan scan) |
RelNode |
RelShuttle.visit(TableScan scan) |
protected RelNode |
RelShuttleImpl.visitChild(RelNode parent,
int i,
RelNode child)
Visits a particular child of a parent.
|
protected RelNode |
RelShuttleImpl.visitChildren(RelNode rel) |
| Modifier and Type | Method and Description |
|---|---|
List<RelNode> |
AbstractRelNode.getInputs() |
List<RelNode> |
SingleRel.getInputs() |
List<RelNode> |
BiRel.getInputs() |
List<RelNode> |
RelNode.getInputs()
Returns an array of this relational expression's inputs.
|
List<RelNode> |
RelInput.getInputs() |
| Modifier and Type | Method and Description |
|---|---|
static int |
RelNodes.compareRels(RelNode[] rels0,
RelNode[] rels1)
Compares arrays of
RelNode. |
static int |
RelNodes.compareRels(RelNode[] rels0,
RelNode[] rels1)
Compares arrays of
RelNode. |
RelNode |
RelCollationTraitDef.convert(RelOptPlanner planner,
RelNode rel,
RelCollation toCollation,
boolean allowInfiniteCostConverters) |
RelNode |
RelDistributionTraitDef.convert(RelOptPlanner planner,
RelNode rel,
RelDistribution toDistribution,
boolean allowInfiniteCostConverters) |
RelWriter |
RelWriter.done(RelNode node)
Writes the completed explanation.
|
void |
RelWriter.explain(RelNode rel,
List<Pair<String,Object>> valueList)
Prints an explanation of a node, with a list of (term, value) pairs.
|
RelNode |
RelVisitor.go(RelNode p)
Starts an iteration.
|
RelWriter |
RelWriter.input(String term,
RelNode input)
Adds an input to the explanation of the current node.
|
void |
AbstractRelNode.replaceInput(int ordinalInParent,
RelNode p) |
void |
SingleRel.replaceInput(int ordinalInParent,
RelNode rel) |
void |
BiRel.replaceInput(int ordinalInParent,
RelNode p) |
void |
RelNode.replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParentth input. |
void |
RelVisitor.replaceRoot(RelNode node)
Replaces the root node of this traversal.
|
RelNode |
RelShuttleImpl.visit(RelNode other) |
RelNode |
RelShuttle.visit(RelNode other) |
void |
RelVisitor.visit(RelNode node,
int ordinal,
RelNode parent)
Visits a node during a traversal.
|
protected RelNode |
RelShuttleImpl.visitChild(RelNode parent,
int i,
RelNode child)
Visits a particular child of a parent.
|
protected RelNode |
RelShuttleImpl.visitChildren(RelNode rel) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
AbstractRelNode.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
RelNode.copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
| Constructor and Description |
|---|
BiRel(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right) |
SingleRel(RelOptCluster cluster,
RelTraitSet traits,
RelNode input)
Creates a
SingleRel. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Converter
A relational expression implements the interface
Converter to
indicate that it converts a physical attribute, or
trait, of a relational expression
from one value to another. |
| Modifier and Type | Class and Description |
|---|---|
class |
ConverterImpl
Abstract implementation of
Converter. |
class |
NoneConverter
|
| Modifier and Type | Method and Description |
|---|---|
abstract RelNode |
ConverterRule.convert(RelNode rel) |
RelNode |
NoneConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Converter.getInput()
Returns the sole input relational expression
|
| Modifier and Type | Method and Description |
|---|---|
abstract RelNode |
ConverterRule.convert(RelNode rel) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
NoneConverter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Constructor and Description |
|---|
ConverterImpl(RelOptCluster cluster,
RelTraitDef traitDef,
RelTraitSet traits,
RelNode child)
Creates a ConverterImpl.
|
NoneConverter(RelOptCluster cluster,
RelNode child) |
| Constructor and Description |
|---|
ConverterRule(Class<? extends RelNode> clazz,
RelTrait in,
RelTrait out,
String description)
Creates a
ConverterRule. |
| Modifier and Type | Class and Description |
|---|---|
class |
Aggregate
Relational operator that eliminates
duplicates and computes totals.
|
class |
Calc
Calc is an abstract base class for implementations of
LogicalCalc. |
class |
Collect
A relational expression that collapses multiple rows into one.
|
class |
Correlate
A relational operator that performs nested-loop joins.
|
class |
EquiJoin
Base class for any join whose condition is based on column equality.
|
class |
Exchange
Relational expression that imposes a particular distribution on its input
without otherwise changing its content.
|
class |
Filter
Relational expression that iterates over its input
and returns elements for which
condition evaluates to
true. |
class |
Intersect
Relational expression that returns the intersection of the rows of its
inputs.
|
class |
Join
Relational expression that combines two relational expressions according to
some condition.
|
class |
Minus
Relational expression that returns the rows of its first input minus any
matching rows from its other inputs.
|
class |
Project
Relational expression that computes a set of
'select expressions' from its input relational expression.
|
class |
Sample
Relational expression that returns a sample of the rows from its input.
|
class |
SemiJoin
Relational expression that joins two relational expressions according to some
condition, but outputs only columns from the left input, and eliminates
duplicates.
|
class |
SetOp
SetOp is an abstract base for relational set operators such
as UNION, MINUS (aka EXCEPT), and INTERSECT. |
class |
Sort
Relational expression that imposes a particular sort order on its input
without otherwise changing its content.
|
class |
SortExchange
|
class |
TableFunctionScan
Relational expression that calls a table-valued function.
|
class |
TableModify
Relational expression that modifies a table.
|
class |
TableScan
Relational operator that returns the contents of a table.
|
class |
Uncollect
Relational expression that unnests its input's sole column into a
relation.
|
class |
Union
Relational expression that returns the union of the rows of its inputs,
optionally eliminating duplicates.
|
class |
Values
Relational expression whose value is a sequence of zero or more literal row
values.
|
class |
Window
A relational expression representing a set of window aggregates.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.ImmutableList<RelNode> |
SetOp.inputs |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
TableScan.accept(RelShuttle shuttle) |
RelNode |
Sort.accept(RexShuttle shuttle) |
RelNode |
TableFunctionScan.accept(RexShuttle shuttle) |
RelNode |
Join.accept(RexShuttle shuttle) |
RelNode |
Calc.accept(RexShuttle shuttle) |
RelNode |
Filter.accept(RexShuttle shuttle) |
RelNode |
Project.accept(RexShuttle shuttle) |
RelNode |
Uncollect.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Collect.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Aggregate.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Filter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Project.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Sample.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Uncollect.copy(RelTraitSet traitSet,
RelNode input) |
RelNode |
Collect.copy(RelTraitSet traitSet,
RelNode input) |
RelNode |
RelFactories.AggregateFactory.createAggregate(RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates an aggregate.
|
RelNode |
RelFactories.FilterFactory.createFilter(RelNode child,
RexNode condition)
Creates a filter.
|
RelNode |
RelFactories.JoinFactory.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone)
Creates a join.
|
RelNode |
RelFactories.ProjectFactory.createProject(RelNode child,
List<? extends RexNode> childExprs,
List<String> fieldNames)
Creates a project.
|
RelNode |
RelFactories.SemiJoinFactory.createSemiJoin(RelNode left,
RelNode right,
RexNode condition)
Creates a semi-join.
|
RelNode |
RelFactories.SetOpFactory.createSetOp(SqlKind kind,
List<RelNode> inputs,
boolean all)
Creates a set operation.
|
RelNode |
RelFactories.SortFactory.createSort(RelTraitSet traits,
RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a sort.
|
RelNode |
TableScan.project(ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields,
RelFactories.ProjectFactory projectFactory)
Projects a subset of the fields of the table, and also asks for "extra"
fields that were not included in the table's official type.
|
| Modifier and Type | Method and Description |
|---|---|
List<RelNode> |
TableFunctionScan.getInputs() |
List<RelNode> |
SetOp.getInputs() |
| Modifier and Type | Method and Description |
|---|---|
AggregateCall |
AggregateCall.adaptTo(RelNode input,
List<Integer> aggArgs,
int oldGroupKeyCount,
int newGroupKeyCount)
Creates equivalent AggregateCall that is adapted to a new input types
and/or number of columns in GROUP BY.
|
RelNode |
Uncollect.copy(RelTraitSet traitSet,
RelNode input) |
RelNode |
Collect.copy(RelTraitSet traitSet,
RelNode input) |
abstract Aggregate |
Aggregate.copy(RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates a copy of this aggregate.
|
abstract Project |
Project.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType)
Copies a project.
|
Project |
Project.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
Sort |
Sort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation) |
abstract Sort |
Sort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
abstract Exchange |
Exchange.copy(RelTraitSet traitSet,
RelNode newInput,
RelDistribution newDistribution) |
SortExchange |
SortExchange.copy(RelTraitSet traitSet,
RelNode newInput,
RelDistribution newDistribution) |
abstract SortExchange |
SortExchange.copy(RelTraitSet traitSet,
RelNode newInput,
RelDistribution newDistribution,
RelCollation newCollation) |
abstract Correlate |
Correlate.copy(RelTraitSet traitSet,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType) |
abstract Filter |
Filter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
abstract Calc |
Calc.copy(RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a copy of this
Calc. |
Calc |
Calc.copy(RelTraitSet traitSet,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
abstract Join |
Join.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone)
Creates a copy of this join, overriding condition, system fields and
inputs.
|
SemiJoin |
SemiJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static AggregateCall |
AggregateCall.create(SqlAggFunction aggFunction,
boolean distinct,
List<Integer> argList,
int groupCount,
RelNode input,
RelDataType type,
String name)
Creates an AggregateCall, inferring its type if
type is null. |
RelNode |
RelFactories.AggregateFactory.createAggregate(RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates an aggregate.
|
RelNode |
RelFactories.FilterFactory.createFilter(RelNode child,
RexNode condition)
Creates a filter.
|
RelNode |
RelFactories.JoinFactory.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone)
Creates a join.
|
RelNode |
RelFactories.ProjectFactory.createProject(RelNode child,
List<? extends RexNode> childExprs,
List<String> fieldNames)
Creates a project.
|
RelNode |
RelFactories.SemiJoinFactory.createSemiJoin(RelNode left,
RelNode right,
RexNode condition)
Creates a semi-join.
|
RelNode |
RelFactories.SortFactory.createSort(RelTraitSet traits,
RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a sort.
|
static RelDataType |
Uncollect.deriveUncollectRowType(RelNode rel)
Returns the row type returned by applying the 'UNNEST' operation to a
relational expression.
|
static double |
Filter.estimateFilteredRows(RelNode child,
RexNode condition) |
static double |
Filter.estimateFilteredRows(RelNode child,
RexProgram program) |
static double |
Union.estimateRowCount(RelNode rel)
Helper method for computing row count for UNION ALL.
|
RexNode |
JoinInfo.getEquiCondition(RelNode left,
RelNode right,
RexBuilder rexBuilder) |
static JoinInfo |
JoinInfo.of(RelNode left,
RelNode right,
RexNode condition)
Creates a
JoinInfo by analyzing a condition. |
void |
TableFunctionScan.replaceInput(int ordinalInParent,
RelNode p) |
void |
SetOp.replaceInput(int ordinalInParent,
RelNode p) |
| Modifier and Type | Method and Description |
|---|---|
Exchange |
Exchange.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Uncollect.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
Sort |
Sort.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Collect.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Aggregate.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
TableFunctionScan |
TableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
Join |
Join.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
SetOp |
SetOp.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
Correlate |
Correlate.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
Calc |
Calc.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Filter.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Project.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
Sample.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
abstract SetOp |
SetOp.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
abstract TableFunctionScan |
TableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Copies this relational expression, substituting traits and
inputs.
|
RelNode |
RelFactories.SetOpFactory.createSetOp(SqlKind kind,
List<RelNode> inputs,
boolean all)
Creates a set operation.
|
| Constructor and Description |
|---|
Aggregate(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates an Aggregate.
|
Calc(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program)
Creates a Calc.
|
Calc(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
Collect(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
String fieldName)
Creates a Collect.
|
Correlate(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType)
Creates a Correlate.
|
EquiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Creates an EquiJoin.
|
Exchange(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDistribution distribution)
Creates an Exchange.
|
Filter(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexNode condition)
Creates a filter.
|
Join(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Creates a Join.
|
Project(RelOptCluster cluster,
RelTraitSet traits,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a Project.
|
Project(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
Sample(RelOptCluster cluster,
RelNode child,
RelOptSamplingParameters params) |
SemiJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates a SemiJoin.
|
Sort(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RelCollation collation)
Creates a Sort.
|
Sort(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a Sort.
|
SortExchange(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDistribution distribution,
RelCollation collation)
Creates a SortExchange.
|
TableModify(RelOptCluster cluster,
RelTraitSet traits,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened) |
Uncollect(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child)
Creates an Uncollect.
|
Window(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
List<RexLiteral> constants,
RelDataType rowType,
List<Window.Group> groups)
Creates a window relational expression.
|
| Constructor and Description |
|---|
Intersect(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
boolean all)
Creates an Intersect.
|
Minus(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
boolean all) |
SetOp(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
SqlKind kind,
boolean all)
Creates a SetOp.
|
TableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a
TableFunctionScan. |
Union(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
boolean all) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
RelJson.create(Map<String,Object> map) |
RelNode |
RelJsonReader.read(String s) |
| Modifier and Type | Method and Description |
|---|---|
RelWriter |
RelWriterImpl.done(RelNode node) |
RelWriter |
RelJsonWriter.done(RelNode node) |
protected void |
RelWriterImpl.explain_(RelNode rel,
List<Pair<String,Object>> values) |
protected void |
RelJsonWriter.explain_(RelNode rel,
List<Pair<String,Object>> values) |
protected void |
RelXmlWriter.explain_(RelNode rel,
List<Pair<String,Object>> values) |
void |
RelWriterImpl.explain(RelNode rel,
List<Pair<String,Object>> valueList) |
void |
RelJsonWriter.explain(RelNode rel,
List<Pair<String,Object>> valueList) |
RelWriter |
RelWriterImpl.input(String term,
RelNode input) |
RelWriter |
RelJsonWriter.input(String term,
RelNode input) |
| Modifier and Type | Method and Description |
|---|---|
String |
RelJson.classToTypeName(Class<? extends RelNode> class_)
Inverse of
RelJson.typeNameToClass(java.lang.String). |
| Modifier and Type | Class and Description |
|---|---|
class |
LogicalAggregate
LogicalAggregate is a relational operator which eliminates
duplicates and computes totals. |
class |
LogicalCalc
A relational expression which computes project expressions and also filters.
|
class |
LogicalCorrelate
A relational operator that performs nested-loop joins.
|
class |
LogicalExchange
Sub-class of
Exchange not
targeted at any particular engine or calling convention. |
class |
LogicalFilter
Sub-class of
Filter
not targeted at any particular engine or calling convention. |
class |
LogicalIntersect
Sub-class of
Intersect
not targeted at any particular engine or calling convention. |
class |
LogicalJoin
Sub-class of
Join
not targeted at any particular engine or calling convention. |
class |
LogicalMinus
Sub-class of
Minus
not targeted at any particular engine or calling convention. |
class |
LogicalProject
Sub-class of
Project not
targeted at any particular engine or calling convention. |
class |
LogicalSort
Sub-class of
Sort not
targeted at any particular engine or calling convention. |
class |
LogicalTableFunctionScan
Sub-class of
TableFunctionScan
not targeted at any particular engine or calling convention. |
class |
LogicalTableModify
Sub-class of
TableModify
not targeted at any particular engine or calling convention. |
class |
LogicalTableScan
A
LogicalTableScan reads all the rows from a
RelOptTable. |
class |
LogicalUnion
Sub-class of
Union
not targeted at any particular engine or calling convention. |
class |
LogicalValues
Sub-class of
Values
not targeted at any particular engine or calling convention. |
class |
LogicalWindow
Sub-class of
Window
not targeted at any particular engine or calling convention. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
LogicalUnion.accept(RelShuttle shuttle) |
RelNode |
LogicalAggregate.accept(RelShuttle shuttle) |
RelNode |
LogicalIntersect.accept(RelShuttle shuttle) |
RelNode |
LogicalExchange.accept(RelShuttle shuttle) |
RelNode |
LogicalValues.accept(RelShuttle shuttle) |
RelNode |
LogicalFilter.accept(RelShuttle shuttle) |
RelNode |
LogicalCorrelate.accept(RelShuttle shuttle) |
RelNode |
LogicalSort.accept(RelShuttle shuttle) |
RelNode |
LogicalProject.accept(RelShuttle shuttle) |
RelNode |
LogicalMinus.accept(RelShuttle shuttle) |
RelNode |
LogicalJoin.accept(RelShuttle shuttle) |
RelNode |
LogicalValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
LogicalTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
static RelNode |
LogicalWindow.create(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a LogicalWindow.
|
| Modifier and Type | Method and Description |
|---|---|
LogicalAggregate |
LogicalAggregate.copy(RelTraitSet traitSet,
RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls) |
LogicalProject |
LogicalProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
Sort |
LogicalSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
Exchange |
LogicalExchange.copy(RelTraitSet traitSet,
RelNode newInput,
RelDistribution newDistribution) |
LogicalCorrelate |
LogicalCorrelate.copy(RelTraitSet traitSet,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType) |
LogicalFilter |
LogicalFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
LogicalCalc |
LogicalCalc.copy(RelTraitSet traitSet,
RelNode child,
RexProgram program) |
LogicalJoin |
LogicalJoin.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static LogicalAggregate |
LogicalAggregate.create(RelNode input,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates a LogicalAggregate.
|
static LogicalProject |
LogicalProject.create(RelNode input,
List<? extends RexNode> projects,
List<String> fieldNames)
Creates a LogicalProject.
|
static LogicalProject |
LogicalProject.create(RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
|
static LogicalSort |
LogicalSort.create(RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a LogicalSort.
|
static LogicalExchange |
LogicalExchange.create(RelNode input,
RelDistribution distribution)
Creates a LogicalExchange.
|
static LogicalCorrelate |
LogicalCorrelate.create(RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType)
Creates a LogicalCorrelate.
|
static LogicalJoin |
LogicalJoin.create(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Creates a LogicalJoin.
|
static LogicalJoin |
LogicalJoin.create(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Creates a LogicalJoin, flagged with whether it has been translated to a
semi-join.
|
static LogicalFilter |
LogicalFilter.create(RelNode input,
RexNode condition)
Creates a LogicalFilter.
|
static LogicalCalc |
LogicalCalc.create(RelNode input,
RexProgram program) |
static RelNode |
LogicalWindow.create(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a LogicalWindow.
|
static LogicalTableModify |
LogicalTableModify.create(RelOptTable table,
Prepare.CatalogReader schema,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened)
Creates a LogicalTableModify.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
LogicalValues.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
LogicalWindow |
LogicalWindow.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
LogicalTableScan.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
LogicalTableModify |
LogicalTableModify.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
LogicalUnion |
LogicalUnion.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
LogicalIntersect |
LogicalIntersect.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
LogicalMinus |
LogicalMinus.copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
LogicalTableFunctionScan |
LogicalTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
static LogicalUnion |
LogicalUnion.create(List<RelNode> inputs,
boolean all)
Creates a LogicalUnion.
|
static LogicalIntersect |
LogicalIntersect.create(List<RelNode> inputs,
boolean all)
Creates a LogicalIntersect.
|
static LogicalMinus |
LogicalMinus.create(List<RelNode> inputs,
boolean all)
Creates a LogicalMinus.
|
static LogicalTableFunctionScan |
LogicalTableFunctionScan.create(RelOptCluster cluster,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a LogicalTableFunctionScan.
|
| Constructor and Description |
|---|
LogicalAggregate(RelOptCluster cluster,
RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Deprecated.
|
LogicalAggregate(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates a LogicalAggregate.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a LogicalCalc.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
LogicalCorrelate(RelOptCluster cluster,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType)
Deprecated.
|
LogicalCorrelate(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
CorrelationId correlationId,
ImmutableBitSet requiredColumns,
SemiJoinType joinType)
Creates a LogicalCorrelate.
|
LogicalFilter(RelOptCluster cluster,
RelNode child,
RexNode condition)
Deprecated.
|
LogicalFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition)
Creates a LogicalFilter.
|
LogicalJoin(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
LogicalJoin(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Deprecated.
|
LogicalJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Creates a LogicalJoin.
|
LogicalProject(RelOptCluster cluster,
RelNode input,
List<RexNode> projects,
List<String> fieldNames,
int flags)
Deprecated.
|
LogicalProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject.
|
LogicalProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
LogicalTableModify(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader schema,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened)
Deprecated.
|
LogicalTableModify(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table,
Prepare.CatalogReader schema,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened)
Creates a LogicalTableModify.
|
LogicalWindow(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
List<RexLiteral> constants,
RelDataType rowType,
List<Window.Group> groups)
Creates a LogicalWindow.
|
| Constructor and Description |
|---|
LogicalIntersect(RelOptCluster cluster,
List<RelNode> inputs,
boolean all)
Deprecated.
|
LogicalIntersect(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all)
Creates a LogicalIntersect.
|
LogicalMinus(RelOptCluster cluster,
List<RelNode> inputs,
boolean all)
Deprecated.
|
LogicalMinus(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all)
Creates a LogicalMinus.
|
LogicalTableFunctionScan(RelOptCluster cluster,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Deprecated.
|
LogicalTableFunctionScan(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a
LogicalTableFunctionScan. |
LogicalUnion(RelOptCluster cluster,
List<RelNode> inputs,
boolean all)
Deprecated.
|
LogicalUnion(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
boolean all)
Creates a LogicalUnion.
|
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Function<RelNode,Metadata> |
MetadataFactoryImpl.DUMMY |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
Metadata.rel()
Returns the relational expression that this metadata is about.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<RelNode,Metadata> |
CachingRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
ReflectiveRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
ChainedRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
RelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass)
Retrieves metadata of a particular type and for a particular sub-class
of relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
RelMdUtil.areColumnsDefinitelyUnique(RelNode rel,
ImmutableBitSet colMask)
Returns true if the columns represented in a bit mask are definitely
known to form a unique column set.
|
static boolean |
RelMdUtil.areColumnsDefinitelyUnique(RelNode rel,
List<RexInputRef> columnRefs) |
static boolean |
RelMdUtil.areColumnsDefinitelyUniqueWhenNullsFiltered(RelNode rel,
ImmutableBitSet colMask)
Returns true if the columns represented in a bit mask are definitely
known to form a unique column set, when nulls have been filtered from
the columns.
|
static boolean |
RelMdUtil.areColumnsDefinitelyUniqueWhenNullsFiltered(RelNode rel,
List<RexInputRef> columnRefs) |
static Boolean |
RelMetadataQuery.areColumnsUnique(RelNode rel,
ImmutableBitSet columns)
|
Boolean |
RelMdColumnUniqueness.areColumnsUnique(RelNode rel,
ImmutableBitSet columns,
boolean ignoreNulls) |
static Boolean |
RelMetadataQuery.areColumnsUnique(RelNode rel,
ImmutableBitSet columns,
boolean ignoreNulls)
|
static Boolean |
RelMdUtil.areColumnsUnique(RelNode rel,
List<RexInputRef> columnRefs) |
static Boolean |
RelMdUtil.areColumnsUniqueWhenNullsFiltered(RelNode rel,
List<RexInputRef> columnRefs) |
List<Double> |
RelMdSize.averageColumnSizes(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Size.averageColumnSizes(),
invoked using reflection. |
Double |
RelMdSize.averageRowSize(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Size.averageRowSize(),
invoked using reflection. |
static List<RelCollation> |
RelMdCollation.calc(RelNode input,
RexProgram program)
Helper method to determine a
Calc's collation. |
static RelDistribution |
RelMdDistribution.calc(RelNode input,
RexProgram program)
Helper method to determine a
Calc's distribution. |
com.google.common.collect.ImmutableList<RelCollation> |
RelMdCollation.collations(RelNode rel)
Fallback method to deduce collations for any relational expression not
handled by a more specific method.
|
static com.google.common.collect.ImmutableList<RelCollation> |
RelMetadataQuery.collations(RelNode rel)
Returns the
BuiltInMetadata.Collation.collations()
statistic. |
static double |
RelMdUtil.computeSemiJoinSelectivity(RelNode factRel,
RelNode dimRel,
List<Integer> factKeyList,
List<Integer> dimKeyList)
Computes the selectivity of a semijoin filter if it is applied on a fact
table.
|
static double |
RelMdUtil.computeSemiJoinSelectivity(RelNode factRel,
RelNode dimRel,
SemiJoin rel)
Computes the selectivity of a semijoin filter if it is applied on a fact
table.
|
Double |
RelMdMemory.cumulativeMemoryWithinPhase(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Memory.cumulativeMemoryWithinPhase(),
invoked using reflection. |
static Double |
RelMetadataQuery.cumulativeMemoryWithinPhase(RelNode rel)
Returns the
BuiltInMetadata.Memory.cumulativeMemoryWithinPhase()
statistic. |
Double |
RelMdMemory.cumulativeMemoryWithinPhaseSplit(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Memory.cumulativeMemoryWithinPhaseSplit(),
invoked using reflection. |
static Double |
RelMetadataQuery.cumulativeMemoryWithinPhaseSplit(RelNode rel)
Returns the
BuiltInMetadata.Memory.cumulativeMemoryWithinPhaseSplit()
statistic. |
static RelDistribution |
RelMetadataQuery.distribution(RelNode rel)
Returns the
BuiltInMetadata.Distribution.distribution()
statistic. |
RelDistribution |
RelMdDistribution.distribution(RelNode rel)
Fallback method to deduce distribution for any relational expression not
handled by a more specific method.
|
static List<RelCollation> |
RelMdCollation.filter(RelNode input)
Helper method to determine a
Filter's collation. |
static RelDistribution |
RelMdDistribution.filter(RelNode input)
Helper method to determine a
Filter's distribution. |
static List<Double> |
RelMetadataQuery.getAverageColumnSizes(RelNode rel)
Returns the
BuiltInMetadata.Size.averageColumnSizes()
statistic. |
static List<Double> |
RelMetadataQuery.getAverageColumnSizesNotNull(RelNode rel)
As
RelMetadataQuery.getAverageColumnSizes(org.apache.calcite.rel.RelNode) but
never returns a null list, only ever a list of nulls. |
static Double |
RelMetadataQuery.getAverageRowSize(RelNode rel)
Returns the
BuiltInMetadata.Size.averageRowSize()
statistic. |
static RelColumnOrigin |
RelMetadataQuery.getColumnOrigin(RelNode rel,
int column)
Determines the origin of a column, provided the column maps to a single
column that isn't derived.
|
Set<RelColumnOrigin> |
RelMdColumnOrigins.getColumnOrigins(RelNode rel,
int iOutputColumn) |
static Set<RelColumnOrigin> |
RelMetadataQuery.getColumnOrigins(RelNode rel,
int column)
Returns the
BuiltInMetadata.ColumnOrigin.getColumnOrigins(int)
statistic. |
RelOptCost |
RelMdPercentageOriginalRows.getCumulativeCost(RelNode rel) |
static RelOptCost |
RelMetadataQuery.getCumulativeCost(RelNode rel)
Returns the
BuiltInMetadata.CumulativeCost.getCumulativeCost()
statistic. |
Double |
RelMdDistinctRowCount.getDistinctRowCount(RelNode rel,
ImmutableBitSet groupKey,
RexNode predicate) |
static Double |
RelMetadataQuery.getDistinctRowCount(RelNode rel,
ImmutableBitSet groupKey,
RexNode predicate)
|
static Double |
RelMdUtil.getJoinDistinctRowCount(RelNode joinRel,
JoinRelType joinType,
ImmutableBitSet groupKey,
RexNode predicate,
boolean useMaxNdv)
Computes the number of distinct rows for a set of keys returned from a
join.
|
static Double |
RelMdUtil.getJoinPopulationSize(RelNode joinRel,
ImmutableBitSet groupKey)
Computes the population size for a set of keys returned from a join
|
RelOptCost |
RelMdPercentageOriginalRows.getNonCumulativeCost(RelNode rel) |
static RelOptCost |
RelMetadataQuery.getNonCumulativeCost(RelNode rel)
Returns the
BuiltInMetadata.NonCumulativeCost.getNonCumulativeCost()
statistic. |
Double |
RelMdPercentageOriginalRows.getPercentageOriginalRows(RelNode rel) |
static Double |
RelMetadataQuery.getPercentageOriginalRows(RelNode rel)
Returns the
BuiltInMetadata.PercentageOriginalRows.getPercentageOriginalRows()
statistic. |
Double |
RelMdPopulationSize.getPopulationSize(RelNode rel,
ImmutableBitSet groupKey) |
static Double |
RelMetadataQuery.getPopulationSize(RelNode rel,
ImmutableBitSet groupKey)
Returns the
BuiltInMetadata.PopulationSize.getPopulationSize(org.apache.calcite.util.ImmutableBitSet)
statistic. |
RelOptPredicateList |
RelMdPredicates.getPredicates(RelNode rel) |
static RelOptPredicateList |
RelMetadataQuery.getPulledUpPredicates(RelNode rel)
Returns the
BuiltInMetadata.Predicates.getPredicates()
statistic. |
Double |
RelMdRowCount.getRowCount(RelNode rel) |
static Double |
RelMetadataQuery.getRowCount(RelNode rel)
Returns the
BuiltInMetadata.RowCount.getRowCount()
statistic. |
static Double |
RelMetadataQuery.getSelectivity(RelNode rel,
RexNode predicate)
Returns the
BuiltInMetadata.Selectivity.getSelectivity(RexNode)
statistic. |
Double |
RelMdSelectivity.getSelectivity(RelNode rel,
RexNode predicate) |
static RelOptTable |
RelMetadataQuery.getTableOrigin(RelNode rel)
Determines the origin of a
RelNode, provided it maps to a single
table, optionally with filtering and projection. |
static Set<ImmutableBitSet> |
RelMetadataQuery.getUniqueKeys(RelNode rel)
Returns the
BuiltInMetadata.UniqueKeys.getUniqueKeys(boolean)
statistic. |
Set<ImmutableBitSet> |
RelMdUniqueKeys.getUniqueKeys(RelNode rel,
boolean ignoreNulls) |
static Set<ImmutableBitSet> |
RelMetadataQuery.getUniqueKeys(RelNode rel,
boolean ignoreNulls)
Returns the
BuiltInMetadata.UniqueKeys.getUniqueKeys(boolean)
statistic. |
protected Set<RelColumnOrigin> |
RelMdColumnOrigins.invokeGetColumnOrigins(RelNode rel,
int iOutputColumn) |
Boolean |
RelMdParallelism.isPhaseTransition(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Parallelism.isPhaseTransition(),
invoked using reflection. |
static Boolean |
RelMetadataQuery.isPhaseTransition(RelNode rel)
Returns the
BuiltInMetadata.Parallelism.isPhaseTransition()
statistic. |
Boolean |
RelMdExplainVisibility.isVisibleInExplain(RelNode rel,
SqlExplainLevel explainLevel) |
static boolean |
RelMetadataQuery.isVisibleInExplain(RelNode rel,
SqlExplainLevel explainLevel)
Returns the
BuiltInMetadata.ExplainVisibility.isVisibleInExplain(SqlExplainLevel)
statistic. |
static List<RelCollation> |
RelMdCollation.limit(RelNode input)
Helper method to determine a
limit's collation.
|
static RelDistribution |
RelMdDistribution.limit(RelNode input)
Helper method to determine a
limit's distribution.
|
Double |
RelMdMemory.memory(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Memory.memory(),
invoked using reflection. |
static Double |
RelMetadataQuery.memory(RelNode rel)
Returns the
BuiltInMetadata.Memory.memory()
statistic. |
static List<RelCollation> |
RelMdCollation.mergeJoin(RelNode left,
RelNode right,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Helper method to determine a
Join's collation assuming that it
uses a merge-join algorithm. |
static List<RelCollation> |
RelMdCollation.project(RelNode input,
List<? extends RexNode> projects)
Helper method to determine a
Project's collation. |
static RelDistribution |
RelMdDistribution.project(RelNode input,
List<? extends RexNode> projects)
Helper method to determine a
Project's collation. |
<T extends Metadata> |
MetadataFactory.query(RelNode rel,
Class<T> clazz)
Returns a metadata interface to get a particular kind of metadata
from a particular relational expression.
|
<T extends Metadata> |
MetadataFactoryImpl.query(RelNode rel,
Class<T> clazz) |
static RelDistribution |
RelMdDistribution.sort(RelNode input)
Helper method to determine a
Sort's distribution. |
Integer |
RelMdParallelism.splitCount(RelNode rel)
Catch-all implementation for
BuiltInMetadata.Parallelism.splitCount(),
invoked using reflection. |
static Integer |
RelMetadataQuery.splitCount(RelNode rel)
Returns the
BuiltInMetadata.Parallelism.splitCount()
statistic. |
static List<RelCollation> |
RelMdCollation.window(RelNode input,
com.google.common.collect.ImmutableList<Window.Group> groups)
Helper method to determine a
Window's collation. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<RelNode,Metadata> |
CachingRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
ReflectiveRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
ChainedRelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass) |
com.google.common.base.Function<RelNode,Metadata> |
RelMetadataProvider.apply(Class<? extends RelNode> relClass,
Class<? extends Metadata> metadataClass)
Retrieves metadata of a particular type and for a particular sub-class
of relational expression.
|
| Constructor and Description |
|---|
ReflectiveRelMetadataProvider(Map<Class<RelNode>,com.google.common.base.Function<RelNode,Metadata>> map,
Class<?> metadataClass0)
Creates a ReflectiveRelMetadataProvider.
|
ReflectiveRelMetadataProvider(Map<Class<RelNode>,com.google.common.base.Function<RelNode,Metadata>> map,
Class<?> metadataClass0)
Creates a ReflectiveRelMetadataProvider.
|
| Modifier and Type | Class and Description |
|---|---|
class |
MultiJoin
A MultiJoin represents a join of N inputs, whereas regular Joins
represent strictly binary joins.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
MultiJoin.accept(RexShuttle shuttle) |
static RelNode |
AggregateProjectMergeRule.apply(Aggregate aggregate,
Project project) |
RelNode |
PushProjector.convertProject(RexNode defaultExpr)
Decomposes a projection to the input references referenced by a
projection and a filter, either of which is optional.
|
RelNode |
MultiJoin.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
RelNode |
PushProjector.createNewProject(RelNode projChild,
int[] adjustments)
Creates a new projection based on the original projection, adjusting all
input refs using an adjustment array passed in.
|
RelNode |
LoptSemiJoinOptimizer.getChosenSemiJoin(int factIdx) |
RelNode |
LoptMultiJoin.getJoinFactor(int factIdx) |
RelNode |
LoptJoinTree.getJoinTree() |
protected RelNode |
MultiJoinProjectTransposeRule.getProjectChild(RelOptRuleCall call,
LogicalProject project,
boolean leftChild) |
protected RelNode |
JoinProjectTransposeRule.getProjectChild(RelOptRuleCall call,
Project project,
boolean leftChild)
Returns the child of the project that will be used as input into the new
LogicalJoin once the projects are pulled above the LogicalJoin.
|
protected RelNode |
CalcRelSplitter.handle(RelNode rel)
Opportunity to further refine the relational expression created for a
given level.
|
protected RelNode |
CalcRelSplitter.RelType.makeRel(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program) |
static RelNode |
ProjectRemoveRule.strip(Project project)
Returns the child of a project if the project is trivial, otherwise
the project itself.
|
static RelNode |
JoinCommuteRule.swap(Join join)
Returns a relational expression with the inputs switched round.
|
static RelNode |
JoinCommuteRule.swap(Join join,
boolean swapOuterJoins) |
| Modifier and Type | Method and Description |
|---|---|
List<RelNode> |
MultiJoin.getInputs() |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
PushProjector.createNewProject(RelNode projChild,
int[] adjustments)
Creates a new projection based on the original projection, adjusting all
input refs using an adjustment array passed in.
|
LogicalProject |
PushProjector.createProjectRefsAndExprs(RelNode projChild,
boolean adjust,
boolean rightSide)
Creates a projection based on the inputs specified in a bitmap and the
expressions that need to be preserved.
|
protected RelNode |
CalcRelSplitter.handle(RelNode rel)
Opportunity to further refine the relational expression created for a
given level.
|
protected RelNode |
CalcRelSplitter.RelType.makeRel(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program) |
protected Aggregate |
AggregateReduceFunctionsRule.newAggregateRel(Aggregate oldAggregate,
RelNode input,
List<AggregateCall> newCalls)
Do a shallow clone of oldAggRel and update aggCalls.
|
void |
MultiJoin.replaceInput(int ordinalInParent,
RelNode p) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
MultiJoin.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Constructor and Description |
|---|
EquiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
LoptJoinTree(RelNode joinTree,
int factorId)
Creates a join-tree consisting of a single node.
|
LoptJoinTree(RelNode joinTree,
LoptJoinTree.BinaryTree factorTree,
boolean removableSelfJoin)
Associates the factor ids with a join-tree.
|
LoptJoinTree(RelNode joinTree,
LoptJoinTree.BinaryTree leftFactorTree,
LoptJoinTree.BinaryTree rightFactorTree)
Associates the factor ids with a join-tree given the factors corresponding
to the left and right subtrees of the join.
|
LoptJoinTree(RelNode joinTree,
LoptJoinTree.BinaryTree leftFactorTree,
LoptJoinTree.BinaryTree rightFactorTree,
boolean removableSelfJoin)
Associates the factor ids with a join-tree given the factors corresponding
to the left and right subtrees of the join.
|
PushProjector(LogicalProject origProj,
RexNode origFilter,
RelNode childRel,
PushProjector.ExprCondition preserveExprCondition)
Creates a PushProjector object for pushing projects past a RelNode.
|
| Constructor and Description |
|---|
CoerceInputsRule(Class<? extends RelNode> consumerRelClass,
boolean coerceNames)
Constructs the rule.
|
MultiJoin(RelOptCluster cluster,
List<RelNode> inputs,
RexNode joinFilter,
RelDataType rowType,
boolean isFullOuterJoin,
List<RexNode> outerJoinConditions,
List<JoinRelType> joinTypes,
List<ImmutableBitSet> projFields,
com.google.common.collect.ImmutableMap<Integer,ImmutableIntList> joinFieldRefCountsMap,
RexNode postJoinFilter)
Constructs a MultiJoin.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Chi
Relational operator that converts a stream to a relation.
|
class |
Delta
Relational operator that converts a relation to a stream.
|
class |
LogicalChi
Sub-class of
Chi
not targeted at any particular engine or calling convention. |
class |
LogicalDelta
Sub-class of
Delta
not targeted at any particular engine or calling convention. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
LogicalDelta.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Modifier and Type | Method and Description |
|---|---|
static LogicalDelta |
LogicalDelta.create(RelNode input)
Creates a LogicalDelta.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
LogicalDelta.copy(RelTraitSet traitSet,
List<RelNode> inputs) |
| Constructor and Description |
|---|
Chi(RelOptCluster cluster,
RelTraitSet traits,
RelNode input) |
Delta(RelOptCluster cluster,
RelTraitSet traits,
RelNode input) |
LogicalChi(RelOptCluster cluster,
RelTraitSet traits,
RelNode input) |
LogicalDelta(RelOptCluster cluster,
RelTraitSet traits,
RelNode input)
Creates a LogicalDelta.
|
| Modifier and Type | Method and Description |
|---|---|
RexInputRef |
RexBuilder.makeInputRef(RelNode input,
int i)
Creates a reference to a given field of the input relational expression.
|
RexNode |
RexBuilder.makeRangeReference(RelNode input)
Creates a reference to all the fields in the row.
|
| Constructor and Description |
|---|
RexPermuteInputsShuttle(Mappings.TargetMapping mapping,
RelNode... inputs)
Creates a RexPermuteInputsShuttle.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
TranslatableTable.toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable)
Converts this table into a
relational expression. |
| Modifier and Type | Method and Description |
|---|---|
TableModify |
ModifiableTable.toModificationRel(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
boolean flattened)
Creates a relational expression that modifies this table.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
StarTable.StarTableScan
Relational expression that scans a
StarTable. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
MaterializedViewTable.toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable) |
RelNode |
StarTable.toRel(RelOptTable.ToRelContext context,
RelOptTable table) |
RelNode |
ViewTable.toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable) |
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RelStructuredTypeFlattener.SelfFlatteningRel
Mix-in interface for relational expressions that know how to
flatten themselves.
|
| Modifier and Type | Field and Description |
|---|---|
RelNode |
SqlToRelConverter.Blackboard.root |
| Modifier and Type | Field and Description |
|---|---|
protected List<RelNode> |
SqlToRelConverter.leaves |
| Modifier and Type | Method and Description |
|---|---|
protected RelNode |
SqlToRelConverter.convertColumnList(SqlInsert call,
RelNode sourceRel)
Creates a source for an INSERT statement.
|
protected RelNode |
SqlToRelConverter.convertInsert(SqlInsert call) |
RelNode |
SqlToRelConverter.convertQuery(SqlNode query,
boolean needsValidation,
boolean top)
Converts an unvalidated query's parse tree into a relational expression.
|
protected RelNode |
SqlToRelConverter.convertQueryRecursive(SqlNode query,
boolean top,
RelDataType targetRowType)
Recursively converts a query to a relational expression.
|
RelNode |
SqlToRelConverter.convertSelect(SqlSelect select)
Converts a SELECT statement's parse tree into a relational expression.
|
protected RelNode |
SqlToRelConverter.convertSetOp(SqlCall call)
Converts a set operation (UNION, INTERSECT, MINUS) into relational
expressions.
|
RelNode |
SqlToRelConverter.convertToSingleValueSubq(SqlNode query,
RelNode plan)
Converts the RelNode tree for a select statement to a select that
produces a single value.
|
RelNode |
SqlToRelConverter.convertValues(SqlCall values,
RelDataType targetRowType)
Converts a SELECT statement's parse tree into a relational expression.
|
RelNode |
SqlToRelConverter.convertWith(SqlWith with)
Converts a WITH sub-query into a relational expression.
|
protected RelNode |
SqlToRelConverter.createAggregate(SqlToRelConverter.Blackboard bb,
boolean indicator,
ImmutableBitSet groupSet,
com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Creates an Aggregate.
|
protected RelNode |
SqlToRelConverter.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Factory method that creates a join.
|
protected RelNode |
SqlToRelConverter.createJoin(SqlToRelConverter.Blackboard bb,
RelNode leftRel,
RelNode rightRel,
RexNode joinCond,
JoinRelType joinType) |
RelNode |
SqlToRelConverter.decorrelate(SqlNode query,
RelNode rootRel)
If subquery is correlated and decorrelation is enabled, performs
decorrelation.
|
static RelNode |
RelDecorrelator.decorrelateQuery(RelNode rootRel)
Decorrelates a query.
|
protected RelNode |
SqlToRelConverter.decorrelateQuery(RelNode rootRel) |
RelNode |
SqlToRelConverter.flattenTypes(RelNode rootRel,
boolean restructure) |
protected RelNode |
RelStructuredTypeFlattener.getNewForOldRel(RelNode oldRel) |
RelNode |
RelDecorrelator.removeCorrelationViaRule(RelNode root) |
RelNode |
RelStructuredTypeFlattener.rewrite(RelNode root,
boolean restructure) |
RelNode |
SqlToRelConverter.toRel(RelOptTable table) |
RelNode |
RelFieldTrimmer.trim(RelNode root)
Trims unused fields from a relational expression.
|
RelNode |
SqlToRelConverter.trimUnusedFields(RelNode rootRel)
Walks over a tree of relational expressions, replacing each
RelNode with a 'slimmed down' relational expression that projects
only the fields required by its consumer. |
RelNode |
DeduplicateCorrelateVariables.visit(RelNode other) |
| Modifier and Type | Method and Description |
|---|---|
protected RelNode |
SqlToRelConverter.convertColumnList(SqlInsert call,
RelNode sourceRel)
Creates a source for an INSERT statement.
|
RelNode |
SqlToRelConverter.convertToSingleValueSubq(SqlNode query,
RelNode plan)
Converts the RelNode tree for a select statement to a select that
produces a single value.
|
protected RelNode |
SqlToRelConverter.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Factory method that creates a join.
|
protected RelNode |
SqlToRelConverter.createJoin(SqlToRelConverter.Blackboard bb,
RelNode leftRel,
RelNode rightRel,
RexNode joinCond,
JoinRelType joinType) |
RelNode |
SqlToRelConverter.decorrelate(SqlNode query,
RelNode rootRel)
If subquery is correlated and decorrelation is enabled, performs
decorrelation.
|
static RelNode |
RelDecorrelator.decorrelateQuery(RelNode rootRel)
Decorrelates a query.
|
protected RelNode |
SqlToRelConverter.decorrelateQuery(RelNode rootRel) |
void |
RelDecorrelator.decorrelateRelGeneric(RelNode rel) |
protected RelFieldTrimmer.TrimResult |
RelFieldTrimmer.dispatchTrimFields(RelNode rel,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields)
Invokes
RelFieldTrimmer.trimFields(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet, java.util.Set<org.apache.calcite.rel.type.RelDataTypeField>), or the appropriate method for the type
of the rel parameter, using multi-method dispatch. |
RelNode |
SqlToRelConverter.flattenTypes(RelNode rootRel,
boolean restructure) |
protected RelNode |
RelStructuredTypeFlattener.getNewForOldRel(RelNode oldRel) |
RexNode |
SqlToRelConverter.Blackboard.register(RelNode rel,
JoinRelType joinType) |
RexNode |
SqlToRelConverter.Blackboard.register(RelNode rel,
JoinRelType joinType,
List<RexNode> leftKeys)
Registers a relational expression.
|
RelNode |
RelDecorrelator.removeCorrelationViaRule(RelNode root) |
RelNode |
RelStructuredTypeFlattener.rewrite(RelNode root,
boolean restructure) |
void |
RelStructuredTypeFlattener.rewriteGeneric(RelNode rel) |
protected void |
RelStructuredTypeFlattener.setNewForOldRel(RelNode oldRel,
RelNode newRel) |
void |
SqlToRelConverter.Blackboard.setRoot(RelNode root,
boolean leaf)
Sets a new root relational expression, as the translation process
backs its way further up the tree.
|
RelNode |
RelFieldTrimmer.trim(RelNode root)
Trims unused fields from a relational expression.
|
protected RelFieldTrimmer.TrimResult |
RelFieldTrimmer.trimChild(RelNode rel,
RelNode input,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields)
Trims the fields of an input relational expression.
|
protected RelFieldTrimmer.TrimResult |
RelFieldTrimmer.trimChildRestore(RelNode rel,
RelNode input,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields)
Trims a child relational expression, then adds back a dummy project to
restore the fields that were removed.
|
RelFieldTrimmer.TrimResult |
RelFieldTrimmer.trimFields(RelNode rel,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields)
Visit method, per
ReflectiveVisitor. |
RelNode |
SqlToRelConverter.trimUnusedFields(RelNode rootRel)
Walks over a tree of relational expressions, replacing each
RelNode with a 'slimmed down' relational expression that projects
only the fields required by its consumer. |
RelNode |
DeduplicateCorrelateVariables.visit(RelNode other) |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlToRelConverter.Blackboard.flatten(List<RelNode> rels,
int systemFieldCount,
int[] start,
List<Pair<RelNode,Integer>> relOffsetList) |
void |
SqlToRelConverter.Blackboard.flatten(List<RelNode> rels,
int systemFieldCount,
int[] start,
List<Pair<RelNode,Integer>> relOffsetList) |
void |
RelStructuredTypeFlattener.updateRelInMap(com.google.common.collect.SortedSetMultimap<RelNode,CorrelationId> mapRefRelToCorVar) |
| Constructor and Description |
|---|
RelFieldTrimmer.TrimResult(RelNode left,
Mapping right)
Creates a TrimResult.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
Planner.convert(SqlNode sql)
Converts a SQL parse tree into a tree of relational expressions.
|
RelNode |
Program.run(RelOptPlanner planner,
RelNode rel,
RelTraitSet requiredOutputTraits) |
RelNode |
Planner.transform(int ruleSetIndex,
RelTraitSet requiredOutputTraits,
RelNode rel)
Converts one relational expression tree into another relational expression
based on a particular rule set and requires set of traits.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
Program.run(RelOptPlanner planner,
RelNode rel,
RelTraitSet requiredOutputTraits) |
RelNode |
Planner.transform(int ruleSetIndex,
RelTraitSet requiredOutputTraits,
RelNode rel)
Converts one relational expression tree into another relational expression
based on a particular rule set and requires set of traits.
|
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.