org.eigenbase.oj.rel
Class JavaRelImplementor.TranslationTester

java.lang.Object
  extended by org.eigenbase.oj.rel.JavaRelImplementor.TranslationTester
Enclosing class:
JavaRelImplementor

public static class JavaRelImplementor.TranslationTester
extends Object

Similar to RexToOJTranslator, but instead of translating, merely tests whether an expression can be translated.


Nested Class Summary
private static class JavaRelImplementor.TranslationTester.CannotTranslate
          Thrown when we encounter an expression which cannot be translated.
 
Field Summary
private  boolean deep
           
private  RexToOJTranslator translator
           
 
Constructor Summary
JavaRelImplementor.TranslationTester(RexToOJTranslator translator, boolean deep)
           
 
Method Summary
 boolean canTranslate(RexNode rex)
          Returns whether an expression can be translated.
protected  void go(RexNode rex)
          Walks over an expression, and throws CannotTranslate if expression cannot be translated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translator

private final RexToOJTranslator translator

deep

private final boolean deep
Constructor Detail

JavaRelImplementor.TranslationTester

public JavaRelImplementor.TranslationTester(RexToOJTranslator translator,
                                            boolean deep)
Method Detail

canTranslate

public boolean canTranslate(RexNode rex)
Returns whether an expression can be translated.


go

protected void go(RexNode rex)
           throws JavaRelImplementor.TranslationTester.CannotTranslate
Walks over an expression, and throws CannotTranslate if expression cannot be translated.

Parameters:
rex - Expression
Throws:
JavaRelImplementor.TranslationTester.CannotTranslate - if expression or a sub-expression cannot be translated