net.sf.saffron.opt
Class RelImplementor.Translator
java.lang.Object
|
+--net.sf.saffron.opt.RelImplementor.Translator
- Enclosing class:
- RelImplementor
- private static class RelImplementor.Translator
- extends Object
Translator
is a shuttle used to implement
RelImplementor.translate(net.sf.saffron.rel.SaffronRel, net.sf.saffron.rex.RexNode)
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
implementor
RelImplementor implementor
rel
SaffronRel rel
RelImplementor.Translator
RelImplementor.Translator(RelImplementor implementor,
SaffronRel rel)
go
public Expression go(RexNode rex)
whichInput
private static RelImplementor.Translator.WhichInputResult whichInput(int fieldIndex,
SaffronRel rel)
- Returns the ordinal of the input relational expression which a given
column ordinal comes from.
For example, if rel
has inputs
I(a, b, c)
and J(d, e)
, then
whichInput(0, rel)
returns 0 (column a),
whichInput(2, rel)
returns 0 (column c),
whichInput(3, rel)
returns 1 (column d).
- Parameters:
fieldIndex
- Index of fieldrel
- Relational expression
- Returns:
- a
RelImplementor.Translator.WhichInputResult
if found, otherwise null.
convertCall
private Expression convertCall(RexCall call,
Expression[] operands)