net.sf.saffron.rel
Class FilterRel

java.lang.Object
  |
  +--net.sf.saffron.rel.SaffronRel
        |
        +--net.sf.saffron.rel.SingleRel
              |
              +--net.sf.saffron.rel.FilterRel
Direct Known Subclasses:
JavaFilterRel

public class FilterRel
extends SingleRel

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


Field Summary
 RexNode condition
           
 
Fields inherited from class net.sf.saffron.rel.SingleRel
child
 
Fields inherited from class net.sf.saffron.rel.SaffronRel
cluster, digest, emptyArray, id, nextId, rowType
 
Constructor Summary
FilterRel(VolcanoCluster cluster, SaffronRel child, RexNode condition)
          Creates a filter.
 
Method Summary
 Object clone()
           
 PlanCost computeSelfCost(SaffronPlanner planner)
          Returns the cost of this plan (not including children).
 void explain(PlanWriter pw)
           
 RexNode[] getChildExps()
          Returns an array of this SaffronRel's child expressions (not including the inputs returned by SingleRel.getInputs().
 double getRows()
          Returns an estimate of the number of rows this relational expression will return.
 
Methods inherited from class net.sf.saffron.rel.SingleRel
childrenAccept, deriveRowType, getInputs, replaceInput
 
Methods inherited from class net.sf.saffron.rel.SaffronRel
computeDigest, getCluster, getConvention, getCorrelVariable, getId, getInput, getOrCreateCorrelVariable, getQualifier, getQuery, getRelTypeName, getRowType, getTable, getVariablesStopped, implement, implementFieldAccess, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

condition

public RexNode condition
Constructor Detail

FilterRel

public FilterRel(VolcanoCluster cluster,
                 SaffronRel child,
                 RexNode condition)
Creates a filter.

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

getChildExps

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

Overrides:
getChildExps in class SaffronRel

clone

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

computeSelfCost

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

Overrides:
computeSelfCost 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 SingleRel

explain

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

SourceForge.net_Logo