net.sf.saffron.rel
Class ProjectRelBase
java.lang.Object
|
+--net.sf.saffron.rel.SaffronRel
|
+--net.sf.saffron.rel.SingleRel
|
+--net.sf.saffron.rel.ProjectRelBase
- Direct Known Subclasses:
- IterCalcRel, ProjectRel
- public abstract class ProjectRelBase
- extends SingleRel
ProjectRelBase
is an abstract base class for SaffronRels which
perform projection. SaffronRels which combine projection with other
operations should subclass ProjectRelBase rather than ProjectRel (which
represents pure projection).
Methods inherited from class net.sf.saffron.rel.SaffronRel |
clone, computeDigest, getCluster, getConvention, getCorrelVariable, getId, getInput, getOrCreateCorrelVariable, getQualifier, getQuery, getRelTypeName, getRowType, getTable, getVariablesStopped, implement, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
exps
protected RexNode[] exps
fieldNames
protected String[] fieldNames
flags
protected int flags
- Values defined in
ProjectRelBase.Flags
.
ProjectRelBase
protected ProjectRelBase(VolcanoCluster cluster,
SaffronRel child,
RexNode[] exps,
String[] fieldNames,
int flags)
- Creates a Project.
- Parameters:
cluster
- VolcanoCluster
this relational expression
belongs tochild
- input relational expressionexps
- set of expressions for the input columnsfieldNames
- aliases of the expressionsflags
- values as in ProjectRelBase.Flags
isBoxed
public boolean isBoxed()
getChildExps
public RexNode[] getChildExps()
- Description copied from class:
SaffronRel
- Returns an array of this
SaffronRel
's child expressions
(not including the inputs returned by SaffronRel.getInputs()
. If there
are no child expressions, returns an empty array, not
null
.
- Overrides:
getChildExps
in class SaffronRel
getFieldNames
public String[] getFieldNames()
getFlags
public int getFlags()
computeSelfCost
public PlanCost computeSelfCost(SaffronPlanner planner)
- Description copied from class:
SaffronRel
- Returns the cost of this plan (not including children). The base
implementation throws an error; derived classes should override.
- Overrides:
computeSelfCost
in class SaffronRel
defineTerms
protected void defineTerms(String[] terms)
explain
public void explain(PlanWriter pw)
- Overrides:
explain
in class SingleRel
implementFieldAccess
public SaffronRel implementFieldAccess(RelImplementor implementor,
String fieldName)
- Description copied from class:
SaffronRel
- Burrows into a synthetic record and returns the underlying relation
which provides the field called
fieldName
.
- Overrides:
implementFieldAccess
in class SaffronRel
deriveRowType
protected SaffronType deriveRowType()
- Overrides:
deriveRowType
in class SingleRel