net.sf.farrago.fennel.rel
Class FennelDoubleRel

java.lang.Object
  extended by org.eigenbase.rel.AbstractRelNode
      extended by net.sf.farrago.fennel.rel.FennelDoubleRel
All Implemented Interfaces:
Cloneable, FennelRel, RelNode
Direct Known Subclasses:
FennelCartesianProductRel, FennelPullCorrelatorRel, LhxJoinRel

public abstract class FennelDoubleRel
extends AbstractRelNode
implements FennelRel

FennelDoubleRel is a FennelRel which takes two FennelRels as inputs.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/fennel/rel/FennelDoubleRel.java#1 $
Author:
John V. Sichi

Field Summary
protected  RelNode left
           
protected  RelNode right
           
 
Fields inherited from class org.eigenbase.rel.AbstractRelNode
digest, id, rowType, traits
 
Fields inherited from interface net.sf.farrago.query.FennelRel
FENNEL_EXEC_CONVENTION
 
Fields inherited from interface org.eigenbase.rel.RelNode
emptyArray
 
Constructor Summary
protected FennelDoubleRel(RelOptCluster cluster, RelNode left, RelNode right)
          Creates a new FennelDoubleRel object.
 
Method Summary
protected  RelDataType deriveRowType()
           
 RelFieldCollation[] getCollations()
          TODO: jhyde, 2006/3/28: unify with RelNode.getCollationList()
 FarragoTypeFactory getFarragoTypeFactory()
           
private  FennelRel getFennelLeftInput()
          NOTE: this method is intentionally private because interactions between FennelRels must be mediated by FarragoRelImplementor.
private  FennelRel getFennelRightInput()
          NOTE: this method is intentionally private because interactions between FennelRels must be mediated by FarragoRelImplementor.
 RelNode[] getInputs()
          Returns an array of this relational expression's inputs.
 Object implementFennelChild(FennelRelImplementor implementor)
          Visits this relational expression as part of the implementation process.
 void replaceInput(int ordinalInParent, RelNode p)
          Replaces the ordinalInParentth input.
 
Methods inherited from class org.eigenbase.rel.AbstractRelNode
childrenAccept, clone, cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTable, 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 net.sf.farrago.query.FennelRel
toStreamDef
 
Methods inherited from interface org.eigenbase.rel.RelNode
childrenAccept, clone, collectVariablesSet, collectVariablesUsed, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, setCorrelVariable
 

Field Detail

left

protected RelNode left

right

protected RelNode right
Constructor Detail

FennelDoubleRel

protected FennelDoubleRel(RelOptCluster cluster,
                          RelNode left,
                          RelNode right)
Creates a new FennelDoubleRel object.

Parameters:
cluster - RelOptCluster for this rel
left - left input
right - right input
Method Detail

getInputs

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

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

replaceInput

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

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

getFarragoTypeFactory

public FarragoTypeFactory getFarragoTypeFactory()

implementFennelChild

public Object implementFennelChild(FennelRelImplementor implementor)
Description copied from interface: FennelRel
Visits this relational expression as part of the implementation process. Fennel relational expressions are implemented in a two-phase process: first call this method, then call FennelRel.toStreamDef(net.sf.farrago.query.FennelRelImplementor).

Specified by:
implementFennelChild in interface FennelRel

deriveRowType

protected RelDataType deriveRowType()
Overrides:
deriveRowType in class AbstractRelNode

getFennelLeftInput

private FennelRel getFennelLeftInput()
NOTE: this method is intentionally private because interactions between FennelRels must be mediated by FarragoRelImplementor.

Returns:
this rel's left input, which must already have been converted to a FennelRel

getFennelRightInput

private FennelRel getFennelRightInput()
NOTE: this method is intentionally private because interactions between FennelRels must be mediated by FarragoRelImplementor.

Returns:
this rel's right input, which must already have been converted to a FennelRel

getCollations

public RelFieldCollation[] getCollations()
Description copied from interface: FennelRel

TODO: jhyde, 2006/3/28: unify with RelNode.getCollationList()

Specified by:
getCollations in interface FennelRel
Returns:
the sort order produced by this FennelRel, or an empty array if the output is not guaranteed to be in any particular order.