|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.rel.AbstractRelNode org.eigenbase.rel.SingleRel org.eigenbase.rel.AggregateRelBase
public abstract class AggregateRelBase
AggregateRelBase
is an abstract base class for implementations
of AggregateRel
.
Nested Class Summary | |
---|---|
static class |
AggregateRelBase.AggCallBinding
Implementation of the SqlOperatorBinding interface for an aggregate call applied to a set of operands in the context
of a AggregateRel . |
Field Summary | |
---|---|
protected List<AggregateCall> |
aggCalls
|
protected int |
groupCount
|
Fields inherited from class org.eigenbase.rel.AbstractRelNode |
---|
digest, id, nextId, rowType, traits |
Fields inherited from interface org.eigenbase.rel.RelNode |
---|
emptyArray |
Constructor Summary | |
---|---|
protected |
AggregateRelBase(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
int groupCount,
List<AggregateCall> aggCalls)
Creates an AggregateRelBase. |
Method Summary | |
---|---|
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children). |
boolean |
containsDistinctCall()
Returns whether any of the aggregates are DISTINCT. |
protected RelDataType |
deriveRowType()
|
void |
explain(RelOptPlanWriter pw)
|
List<AggregateCall> |
getAggCallList()
Returns a list of calls to aggregate functions. |
int |
getGroupCount()
Returns the number of grouping fields. |
double |
getRows()
Returns an estimate of the number of rows this relational expression will return. |
boolean |
isDistinct()
Returns whether the same value will not come out twice. |
private boolean |
typeMatchesInferred(AggregateCall aggCall,
boolean fail)
Returns whether the inferred type of an AggregateCall matches the
type it was given when it was created. |
Methods inherited from class org.eigenbase.rel.SingleRel |
---|
childrenAccept, getChild, getInputs, replaceInput |
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
---|
clone, cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List<AggregateCall> aggCalls
protected int groupCount
Constructor Detail |
---|
protected AggregateRelBase(RelOptCluster cluster, RelTraitSet traits, RelNode child, int groupCount, List<AggregateCall> aggCalls)
cluster
- Clustertraits
- Traitschild
- ChildgroupCount
- Size of grouping keyaggCalls
- Collection of calls to aggregate functionsMethod Detail |
---|
public boolean isDistinct()
RelNode
false
, derived classes should override.
isDistinct
in interface RelNode
isDistinct
in class AbstractRelNode
public List<AggregateCall> getAggCallList()
public int getGroupCount()
public void explain(RelOptPlanWriter pw)
explain
in interface RelNode
explain
in class SingleRel
public double getRows()
RelNode
NOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getRowCount(org.eigenbase.rel.RelNode)
, which gives plugins a chance to
override the rel's default ideas about row count.
getRows
in interface RelNode
getRows
in class SingleRel
public RelOptCost computeSelfCost(RelOptPlanner planner)
RelNode
NOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getNonCumulativeCost(org.eigenbase.rel.RelNode)
, which gives plugins a
chance to override the rel's default ideas about cost.
computeSelfCost
in interface RelNode
computeSelfCost
in class AbstractRelNode
protected RelDataType deriveRowType()
deriveRowType
in class SingleRel
private boolean typeMatchesInferred(AggregateCall aggCall, boolean fail)
AggregateCall
matches the
type it was given when it was created.
aggCall
- Aggregate callfail
- Whether to fail if the types do not match
public boolean containsDistinctCall()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |