org.eigenbase.rel
Class ProjectRel
java.lang.Object
org.eigenbase.rel.AbstractRelNode
org.eigenbase.rel.SingleRel
org.eigenbase.rel.ProjectRelBase
org.eigenbase.rel.ProjectRel
- All Implemented Interfaces:
- Cloneable, RelNode
public final class ProjectRel
- extends ProjectRelBase
ProjectRel
is a relational expression which computes a set of
'select expressions' from its input relational expression.
The result is usually 'boxed' as a record with one named field for each
column; if there is precisely one expression, the result may be 'unboxed',
and consist of the raw value type.
- Since:
- March, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/rel/ProjectRel.java#18 $
- Author:
- jhyde
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
ProjectRel
public ProjectRel(RelOptCluster cluster,
RelNode child,
RexNode[] exps,
String[] fieldNames,
int flags)
- Creates a ProjectRel with no sort keys.
- Parameters:
cluster
- Cluster this relational expression belongs tochild
- input relational expressionexps
- set of expressions for the input columnsfieldNames
- aliases of the expressionsflags
- values as in ProjectRelBase.Flags
ProjectRel
public ProjectRel(RelOptCluster cluster,
RelNode child,
RexNode[] exps,
RelDataType rowType,
int flags,
List<RelCollation> collationList)
- Creates a ProjectRel.
- Parameters:
cluster
- Cluster this relational expression belongs tochild
- input relational expressionexps
- set of expressions for the input columnsrowType
- output row typeflags
- values as in ProjectRelBase.Flags
collationList
- List of sort keys
clone
public ProjectRel clone()
- Description copied from interface:
RelNode
- Clones this RelNode.
Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode)
, as the RelNode may
have traits of which it has no knowledge. Example implementation:
public MyRelNode clone()
{
MyRelNode clone = new MyRelNode(...);
clone.inheritTraitsFrom(this);
return clone;
}
N.B.: This method must be overridden whenever an existing,
concrete RelNode is extended. Otherwise, calling clone() will produce a
differently typed RelNode, resulting in invalid or incorrect query plans.
- Specified by:
clone
in interface RelNode
- Specified by:
clone
in class AbstractRelNode
- Returns:
- a clone of this RelNode
getPermutation
public Permutation getPermutation()
- Returns a permutation, if this projection is merely a permutation of its
input fields, otherwise null.