net.sf.farrago.fennel.rel
Class FennelValuesRel
java.lang.Object
org.eigenbase.rel.AbstractRelNode
org.eigenbase.rel.ValuesRelBase
net.sf.farrago.fennel.rel.FennelValuesRel
- All Implemented Interfaces:
- Cloneable, FennelRel, RelNode
public class FennelValuesRel
- extends ValuesRelBase
- implements FennelRel
FennelValuesRel is Fennel implementation of ValuesRel
. It corresponds
to fennel::ValuesExecStream
via FemValuesStreamDef
, and
guarantees the order of the tuples it produces, making it usable for such
purposes as the search input to an index scan, where order may matter for
both performance and correctness.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/fennel/rel/FennelValuesRel.java#1 $
- Author:
- John V. Sichi
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
childrenAccept, cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, replaceInput, setCorrelVariable, toString |
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 |
isVisibleInExplain
private final boolean isVisibleInExplain
FennelValuesRel
public FennelValuesRel(RelOptCluster cluster,
RelDataType rowType,
List<List<RexLiteral>> tuples,
boolean isVisibleInExplain)
- Creates a new FennelValuesRel. Note that tuples passed in become owned by
this rel (without a deep copy), so caller must not modify them after this
call, otherwise bad things will happen.
- Parameters:
cluster
- .rowType
- row type for tuples produced by this reltuples
- 2-dimensional array of tuple values to be produced; outer
list contains tuples; each inner list is one tuple; all tuples must be of
same length, conforming to rowTypeisVisibleInExplain
- whether the RelNode should appear in the
explain output
FennelValuesRel
public FennelValuesRel(RelOptCluster cluster,
RelDataType rowType,
List<List<RexLiteral>> tuples)
- Creates a new FennelValuesRel. Note that tuples passed in become owned by
this rel (without a deep copy), so caller must not modify them after this
call, otherwise bad things will happen.
- Parameters:
cluster
- .rowType
- row type for tuples produced by this reltuples
- 2-dimensional array of tuple values to be produced; outer
list contains tuples; each inner list is one tuple; all tuples must be of
same length, conforming to rowType
toStreamDef
public FemExecutionStreamDef toStreamDef(FennelRelImplementor implementor)
- Description copied from interface:
FennelRel
- Converts this relational expression to
FemExecutionStreamDef
form. In the process, the relational expression will almost certainly
call FennelRelImplementor.visitFennelChild(net.sf.farrago.query.FennelRel, int)
on each of its
children.
- Specified by:
toStreamDef
in interface FennelRel
- Parameters:
implementor
- for generating Java code
- Returns:
- generated FemExecutionStreamDef
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
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.
isVisibleInExplain
public boolean isVisibleInExplain()