saffron.rel
Class Aggregate

java.lang.Object
  |
  +--saffron.rel.Rel
        |
        +--saffron.rel.SingleRel
              |
              +--saffron.rel.Aggregate
Direct Known Subclasses:
JavaAggregate

public class Aggregate
extends SingleRel

Aggregate is a relational operator which eliminates duplicates and computes totals.

Since:
3 February, 2002
Version:
$Id: //open/saffron/src/main/saffron/rel/Aggregate.java#8 $
Author:
jhyde

Nested Class Summary
static class Aggregate.Call
           
private static class Aggregate.ConvertToJavaRule
           
 
Nested classes inherited from class saffron.rel.Rel
 
Field Summary
protected  Aggregate.Call[] aggCalls
           
protected  int groupCount
           
 
Fields inherited from class saffron.rel.SingleRel
child
 
Fields inherited from class saffron.rel.Rel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
Aggregate(Cluster cluster, Rel child, int groupCount, Aggregate.Call[] aggCalls)
           
 
Method Summary
 Object clone()
           
 Cost computeSelfCost(Planner planner)
          Returns the cost of this plan (not including children).
protected  Type deriveRowType()
           
 Aggregate.Call[] getAggCalls()
           
 int getGroupCount()
           
static void register(Planner planner)
          See Rel.register(saffron.Planner).
 
Methods inherited from class saffron.rel.SingleRel
childrenAccept, explain, getInputs, replaceInput
 
Methods inherited from class saffron.rel.Rel
computeDigest, getChildExps, getCluster, getConvention, getCorelVariable, getEnvironment, getId, getInput, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getTable, getType, getVariablesStopped, implement, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, isDistinct, onRegister, recomputeDigest, registerCorelVariable, setCorelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

groupCount

protected int groupCount

aggCalls

protected Aggregate.Call[] aggCalls
Constructor Detail

Aggregate

public Aggregate(Cluster cluster,
                 Rel child,
                 int groupCount,
                 Aggregate.Call[] aggCalls)
Method Detail

clone

public Object clone()
Specified by:
clone in class Rel

getGroupCount

public int getGroupCount()

getAggCalls

public Aggregate.Call[] getAggCalls()

deriveRowType

protected Type deriveRowType()
Overrides:
deriveRowType in class SingleRel

computeSelfCost

public Cost computeSelfCost(Planner planner)
Description copied from class: Rel
Returns the cost of this plan (not including children). The base implementation throws an error; derived classes should override.

Overrides:
computeSelfCost in class Rel

register

public static void register(Planner planner)
See Rel.register(saffron.Planner).


SourceForge.net_Logo