saffron.rel
Class Union

java.lang.Object
  |
  +--saffron.rel.Rel
        |
        +--saffron.rel.Union
Direct Known Subclasses:
Intersect, IterConcatenate, JavaUnionAll, Minus

public class Union
extends Rel

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

Since:
23 September, 2001
Version:
$Id: //open/saffron/src/main/saffron/rel/Union.java#6 $
Author:
jhyde

Nested Class Summary
private static class Union.ConvertToIteratorRule
          Rule to converts a Union to iterator calling convention.
private static class Union.ConvertToJavaRule
          Rule to converts a Union to Java calling convention.
 
Nested classes inherited from class saffron.rel.Rel
 
Field Summary
protected  boolean all
           
protected  Rel[] inputs
           
 
Fields inherited from class saffron.rel.Rel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
Union(Cluster cluster, Rel[] inputs, boolean all)
           
 
Method Summary
 Object clone()
           
protected  Type deriveRowType()
           
 void explain(PlanWriter pw)
           
 Rel[] getInputs()
          Returns an array of this Rel'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.
static void register(Planner planner)
          See Rel.register(saffron.Planner).
 void replaceInput(int ordinalInParent, Rel p)
          Replaces the ordinalInParentth input.
 
Methods inherited from class saffron.rel.Rel
childrenAccept, computeDigest, computeSelfCost, getChildExps, getCluster, getConvention, getCorelVariable, getEnvironment, getId, getInput, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, 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
 

Field Detail

inputs

protected Rel[] inputs

all

protected boolean all
Constructor Detail

Union

public Union(Cluster cluster,
             Rel[] inputs,
             boolean all)
Method Detail

clone

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

getInputs

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

Overrides:
getInputs in class Rel

explain

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

replaceInput

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

Overrides:
replaceInput in class Rel

deriveRowType

protected Type deriveRowType()
Specified by:
deriveRowType in class Rel

getRows

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

Overrides:
getRows 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

register

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


SourceForge.net_Logo