saffron.rel
Class InternalTranslator

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.EvaluationShuttle
              |
              +--saffron.rel.InternalTranslator
Direct Known Subclasses:
AggInternalTranslator

class InternalTranslator
extends EvaluationShuttle

Converts an expression into one which references only internal variables.

For example, the filter expression emp.sal > 50 from select * from emp where emp.sal > 50 becomes $input0.sal > 50. And emp.deptno == dept.deptno becomes $input.$0.deptno == $input.$1.deptno.


Field Summary
(package private)  Rel[] inputs
           
(package private)  QueryInfo queryInfo
           
 
Fields inherited from class openjava.ptree.util.EvaluationShuttle
 
Constructor Summary
(package private) InternalTranslator(QueryInfo queryInfo, Rel[] inputs)
           
 
Method Summary
 Expression evaluateDown(Variable p)
           
 Expression evaluateUp(AliasedExpression p)
           
(package private)  Expression lookupExp(String name)
          Returns an expression with which to reference a from-list item.
 void visit(QueryExpression p)
          Do not walk into a sub-query.
 
Methods inherited from class openjava.ptree.util.EvaluationShuttle
evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, getEnvironment, setEnvironment, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class openjava.ptree.util.ParseTreeVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryInfo

QueryInfo queryInfo

inputs

Rel[] inputs
Constructor Detail

InternalTranslator

InternalTranslator(QueryInfo queryInfo,
                   Rel[] inputs)
Method Detail

evaluateUp

public Expression evaluateUp(AliasedExpression p)
Overrides:
evaluateUp in class EvaluationShuttle

evaluateDown

public Expression evaluateDown(Variable p)
Overrides:
evaluateDown in class EvaluationShuttle

visit

public void visit(QueryExpression p)
Do not walk into a sub-query.

Overrides:
visit in class EvaluationShuttle

lookupExp

Expression lookupExp(String name)
Returns an expression with which to reference a from-list item.

Parameters:
name - the alias of the from item
Returns:
a Variable or FieldAccess

SourceForge.net_Logo