net.sf.farrago.query
Class FarragoIndexBuilderRel

java.lang.Object
  extended by org.eigenbase.rel.AbstractRelNode
      extended by org.eigenbase.rel.SingleRel
          extended by net.sf.farrago.query.FarragoIndexBuilderRel
All Implemented Interfaces:
Cloneable, RelNode, RelStructuredTypeFlattener.SelfFlatteningRel

public class FarragoIndexBuilderRel
extends SingleRel
implements RelStructuredTypeFlattener.SelfFlatteningRel

FarragoIndexBuilderRel is the abstract relational expression corresponding to building an index on a table. It is declared here rather than in org.eigenbase.rel because indexes are not part of pure relational algebra.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoIndexBuilderRel.java#8 $
Author:
John V. Sichi

Field Summary
private  FemLocalIndex index
          Index to be built.
private  RelOptTable table
          Table index belongs to
 
Fields inherited from class org.eigenbase.rel.AbstractRelNode
digest, id, rowType, traits
 
Fields inherited from interface org.eigenbase.rel.RelNode
emptyArray
 
Constructor Summary
FarragoIndexBuilderRel(RelOptCluster cluster, RelOptTable table, RelNode child, FemLocalIndex index)
           
 
Method Summary
 FarragoIndexBuilderRel clone()
          Clones this RelNode.
 RelDataType deriveRowType()
           
 void explain(RelOptPlanWriter pw)
           
 void flattenRel(RelStructuredTypeFlattener flattener)
           
 FemLocalIndex getIndex()
           
 RelOptTable getTable()
          If this relational expression represents an access to a table, returns that table, otherwise returns null.
 
Methods inherited from class org.eigenbase.rel.SingleRel
childrenAccept, getChild, getInputs, getRows, replaceInput
 
Methods inherited from class org.eigenbase.rel.AbstractRelNode
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eigenbase.rel.RelNode
childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, replaceInput, setCorrelVariable
 

Field Detail

index

private final FemLocalIndex index
Index to be built.


table

private final RelOptTable table
Table index belongs to

Constructor Detail

FarragoIndexBuilderRel

public FarragoIndexBuilderRel(RelOptCluster cluster,
                              RelOptTable table,
                              RelNode child,
                              FemLocalIndex index)
Method Detail

getIndex

public FemLocalIndex getIndex()

getTable

public RelOptTable getTable()
Description copied from interface: RelNode
If this relational expression represents an access to a table, returns that table, otherwise returns null.

Specified by:
getTable in interface RelNode
Overrides:
getTable in class AbstractRelNode

clone

public FarragoIndexBuilderRel clone()
Description copied from interface: RelNode
Clones this RelNode.

Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode), as the RelNode may have traits of which it has no knowledge. Example implementation:

     public MyRelNode clone()
     {
         MyRelNode clone = new MyRelNode(...);
         clone.inheritTraitsFrom(this);
         return clone;
     }
 
N.B.: This method must be overridden whenever an existing, concrete RelNode is extended. Otherwise, calling clone() will produce a differently typed RelNode, resulting in invalid or incorrect query plans.

Specified by:
clone in interface RelNode
Specified by:
clone in class AbstractRelNode
Returns:
a clone of this RelNode

deriveRowType

public RelDataType deriveRowType()
Overrides:
deriveRowType in class SingleRel

explain

public void explain(RelOptPlanWriter pw)
Specified by:
explain in interface RelNode
Overrides:
explain in class SingleRel

flattenRel

public void flattenRel(RelStructuredTypeFlattener flattener)
Specified by:
flattenRel in interface RelStructuredTypeFlattener.SelfFlatteningRel