saffron.rel
Class Filter

java.lang.Object
  |
  +--saffron.rel.Rel
        |
        +--saffron.rel.SingleRel
              |
              +--saffron.rel.Filter
Direct Known Subclasses:
JavaFilter, PlanFilter

public class Filter
extends SingleRel

A Filter is a relational expression which iterates over its input, and returns elements for which condition evaluates to true.


Nested Class Summary
private static class Filter.ConvertToJavaRule
           
private static class Filter.ConvertToPlanRule
           
 
Nested classes inherited from class saffron.rel.Rel
 
Field Summary
 Expression condition
           
 
Fields inherited from class saffron.rel.SingleRel
child
 
Fields inherited from class saffron.rel.Rel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
Filter(Cluster cluster, Rel child, Expression condition)
          Creates a filter.
 
Method Summary
 Object clone()
           
 Cost computeSelfCost(Planner planner)
          Returns the cost of this plan (not including children).
 void explain(PlanWriter pw)
           
 Expression[] getChildExps()
          Returns an array of this Rel's child expressions (not including the inputs returned by SingleRel.getInputs().
static void register(Planner planner)
          See Rel.register(saffron.Planner).
 
Methods inherited from class saffron.rel.SingleRel
childrenAccept, deriveRowType, getInputs, replaceInput
 
Methods inherited from class saffron.rel.Rel
computeDigest, 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

condition

public Expression condition
Constructor Detail

Filter

public Filter(Cluster cluster,
              Rel child,
              Expression condition)
Creates a filter.

Parameters:
cluster - Cluster this relational expression belongs to
child - input relational expression
condition - boolean expression which determines whether a row is allowed to pass
Method Detail

clone

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

getChildExps

public Expression[] getChildExps()
Description copied from class: Rel
Returns an array of this Rel's child expressions (not including the inputs returned by Rel.getInputs(). If there are no child expressions, returns an empty array, not null.

Overrides:
getChildExps in class Rel

explain

public void explain(PlanWriter pw)
Overrides:
explain 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