saffron.rel
Class Distinct

java.lang.Object
  |
  +--saffron.rel.Rel
        |
        +--saffron.rel.SingleRel
              |
              +--saffron.rel.Distinct
Direct Known Subclasses:
JavaDistinct, JavaExists

public class Distinct
extends SingleRel

Distinct is a Rel which eliminates duplicates from its input.

Since:
30 September, 2001
Version:
$Id: //open/saffron/src/main/saffron/rel/Distinct.java#5 $
Author:
jhyde

Nested Class Summary
private static class Distinct.ConvertDistinctToJavaRule
           
 
Nested classes inherited from class saffron.rel.Rel
 
Field Summary
 
Fields inherited from class saffron.rel.SingleRel
child
 
Fields inherited from class saffron.rel.Rel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
Distinct(Cluster cluster, Rel child)
           
 
Method Summary
 Object clone()
           
 Cost computeSelfCost(Planner planner)
          Returns the cost of this plan (not including children).
 boolean isDistinct()
          Returns whether the same value will not come out twice.
static void register(Planner planner)
          See Rel.register(saffron.Planner).
 
Methods inherited from class saffron.rel.SingleRel
childrenAccept, deriveRowType, 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, onRegister, recomputeDigest, registerCorelVariable, setCorelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Distinct

public Distinct(Cluster cluster,
                Rel child)
Method Detail

clone

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

isDistinct

public boolean isDistinct()
Description copied from class: Rel
Returns whether the same value will not come out twice. Default value is false, derived classes should override.

Overrides:
isDistinct in class Rel

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