org.eigenbase.oj.rel
Interface JavaSelfRel

All Superinterfaces:
Cloneable, JavaRel, RelNode

public interface JavaSelfRel
extends JavaRel

A relational expression which implements this interface can generate a java expression which represents the current row of the expression.

Since:
May 24, 2004
Version:
$Id: //open/dev/farrago/src/org/eigenbase/oj/rel/JavaSelfRel.java#9 $
Author:
jhyde

Field Summary
 
Fields inherited from interface org.eigenbase.rel.RelNode
emptyArray
 
Method Summary
 Expression implementSelf(JavaRelImplementor implementor)
          Returns a Java expression which yields the current row of this relational expression.
 
Methods inherited from interface org.eigenbase.oj.rel.JavaRel
implement
 
Methods inherited from interface org.eigenbase.rel.RelNode
childrenAccept, clone, collectVariablesSet, collectVariablesUsed, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, replaceInput, setCorrelVariable
 

Method Detail

implementSelf

Expression implementSelf(JavaRelImplementor implementor)
Returns a Java expression which yields the current row of this relational expression. This method is called by the JavaRelImplementor the first time a piece of Java code wants to refer to this relation. The implementor then uses this expression to initialize a variable.

If no code needs to refer to this relation, then the expression is never generated. This prevents generating useless code like

Dummy_12f614.Ojp_1 oj_var8 = new Dummy_12f614.Ojp_1();
.

If a relational expression has one input relational expression which has the same row type, you may be able to share its variable. Call Implementor#bind(Rel,Rel) to do this.

See Also:
JavaRelImplementor.bind(org.eigenbase.rel.RelNode,org.eigenbase.rel.RelNode)