Package org.apache.calcite.rel.logical
Class LogicalProject
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.SingleRel
-
- org.apache.calcite.rel.core.Project
-
- org.apache.calcite.rel.logical.LogicalProject
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public final class LogicalProject extends Project
Sub-class ofProject
not targeted at any particular engine or calling convention.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.rel.core.Project
Project.Flags
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Constructor Summary
Constructors Constructor Description LogicalProject(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType)
Creates a LogicalProject.LogicalProject(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType, int flags)
Deprecated.LogicalProject(RelOptCluster cluster, RelNode input, java.util.List<RexNode> projects, java.util.List<java.lang.String> fieldNames, int flags)
Deprecated.LogicalProject(RelInput input)
Creates a LogicalProject by parsing serialized output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelNode
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.LogicalProject
copy(RelTraitSet traitSet, RelNode input, java.util.List<RexNode> projects, RelDataType rowType)
Copies a project.static LogicalProject
create(RelNode input, java.util.List<? extends RexNode> projects, java.util.List<java.lang.String> fieldNames)
Creates a LogicalProject.static LogicalProject
create(RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.-
Methods inherited from class org.apache.calcite.rel.core.Project
accept, computeSelfCost, copy, copy, explainTerms, getChildExps, getFlags, getMapping, getMapping, getNamedProjects, getPartialMapping, getPermutation, getPermutation, getProjects, isBoxed, isMapping, isValid
-
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Constructor Detail
-
LogicalProject
public LogicalProject(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType)
Creates a LogicalProject.Use
create(org.apache.calcite.rel.RelNode, java.util.List<? extends org.apache.calcite.rex.RexNode>, java.util.List<java.lang.String>)
unless you know what you're doing.- Parameters:
cluster
- Cluster this relational expression belongs totraitSet
- Traits of this relational expressioninput
- Input relational expressionprojects
- List of expressions for the input columnsrowType
- Output row type
-
LogicalProject
@Deprecated public LogicalProject(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType, int flags)
Deprecated.
-
LogicalProject
@Deprecated public LogicalProject(RelOptCluster cluster, RelNode input, java.util.List<RexNode> projects, java.util.List<java.lang.String> fieldNames, int flags)
Deprecated.
-
LogicalProject
public LogicalProject(RelInput input)
Creates a LogicalProject by parsing serialized output.
-
-
Method Detail
-
create
public static LogicalProject create(RelNode input, java.util.List<? extends RexNode> projects, java.util.List<java.lang.String> fieldNames)
Creates a LogicalProject.
-
create
public static LogicalProject create(RelNode input, java.util.List<? extends RexNode> projects, RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
-
copy
public LogicalProject copy(RelTraitSet traitSet, RelNode input, java.util.List<RexNode> projects, RelDataType rowType)
Description copied from class:Project
Copies a project.- Specified by:
copy
in classProject
- Parameters:
traitSet
- Traitsinput
- Inputprojects
- Project expressionsrowType
- Output row type- Returns:
- New
Project
if any parameter differs from the value of thisProject
, or justthis
if all the parameters are the same - See Also:
Project.copy(RelTraitSet, List)
-
accept
public RelNode accept(RelShuttle shuttle)
Description copied from interface:RelNode
Accepts a visit from a shuttle.- Specified by:
accept
in interfaceRelNode
- Overrides:
accept
in classAbstractRelNode
- Parameters:
shuttle
- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
-