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).


Nested Class Summary
private static class RelImplementor.Translator.WhichInputResult
          Result of call to whichInput(int, net.sf.saffron.rel.SaffronRel), contains the input relational expression, its index, and the index of the field within that relational expression.
 
Field Summary
(package private)  RelImplementor implementor
           
(package private)  SaffronRel rel
           
 
Constructor Summary
(package private) RelImplementor.Translator(RelImplementor implementor, SaffronRel rel)
           
 
Method Summary
private  Expression convertCall(RexCall call, Expression[] operands)
           
 Expression go(RexNode rex)
           
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

implementor

RelImplementor implementor

rel

SaffronRel rel
Constructor Detail

RelImplementor.Translator

RelImplementor.Translator(RelImplementor implementor,
                          SaffronRel rel)
Method Detail

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 field
rel - Relational expression
Returns:
a RelImplementor.Translator.WhichInputResult if found, otherwise null.

convertCall

private Expression convertCall(RexCall call,
                               Expression[] operands)

SourceForge.net_Logo