net.sf.saffron.rel
Class UnionRel

java.lang.Object
  |
  +--net.sf.saffron.rel.SaffronRel
        |
        +--net.sf.saffron.rel.UnionRel
Direct Known Subclasses:
IntersectRel, IterConcatenateRel, JavaUnionAllRel, MinusRel

public class UnionRel
extends SaffronRel

UnionRel returns the union of the rows of its inputs, optionally eliminating duplicates.

Since:
23 September, 2001
Version:
$Id: //open/saffron/src/net/sf/saffron/rel/UnionRel.java#5 $
Author:
jhyde

Field Summary
protected  boolean all
           
protected  SaffronRel[] inputs
           
 
Fields inherited from class net.sf.saffron.rel.SaffronRel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
UnionRel(VolcanoCluster cluster, SaffronRel[] inputs, boolean all)
           
 
Method Summary
 Object clone()
           
protected  SaffronType deriveRowType()
           
 void explain(PlanWriter pw)
           
 SaffronRel[] getInputs()
          Returns an array of this SaffronRel's inputs.
 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.
 void replaceInput(int ordinalInParent, SaffronRel p)
          Replaces the ordinalInParentth input.
 
Methods inherited from class net.sf.saffron.rel.SaffronRel
childrenAccept, computeDigest, computeSelfCost, getChildExps, getCluster, getConvention, getCorrelVariable, getId, getInput, getOrCreateCorrelVariable, getQualifier, getQuery, getRelTypeName, getRowType, getTable, getVariablesStopped, implement, implementFieldAccess, isAccessTo, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputs

protected SaffronRel[] inputs

all

protected boolean all
Constructor Detail

UnionRel

public UnionRel(VolcanoCluster cluster,
                SaffronRel[] inputs,
                boolean all)
Method Detail

isDistinct

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

Overrides:
isDistinct in class SaffronRel

getInputs

public SaffronRel[] getInputs()
Description copied from class: SaffronRel
Returns an array of this SaffronRel's inputs. If there are no inputs, returns an empty array, not null.

Overrides:
getInputs in class SaffronRel

getRows

public double getRows()
Description copied from class: SaffronRel
Returns an estimate of the number of rows this relational expression will return.

Overrides:
getRows in class SaffronRel

clone

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

explain

public void explain(PlanWriter pw)
Overrides:
explain in class SaffronRel

replaceInput

public void replaceInput(int ordinalInParent,
                         SaffronRel p)
Description copied from class: SaffronRel
Replaces the ordinalInParentth input. You must override this method if you override SaffronRel.getInputs().

Overrides:
replaceInput in class SaffronRel

deriveRowType

protected SaffronType deriveRowType()
Specified by:
deriveRowType in class SaffronRel

SourceForge.net_Logo