public static class Interpreter.Compiler extends RelVisitor implements ReflectiveVisitor
RelNode and, for each,
creates a Node that can be
executed in the interpreter.
The compiler looks for methods of the form "visit(XxxRel)".
A "visit" method must create an appropriate Node and put it into
the node field.
If you wish to handle more kinds of relational expressions, add extra "visit" methods in this or a sub-class, and they will be found and called via reflection.
| Modifier and Type | Field and Description |
|---|---|
protected Interpreter |
interpreter |
protected Node |
node |
protected RelNode |
rel |
protected RelNode |
rootRel |
| Modifier and Type | Method and Description |
|---|---|
void |
rewrite(RelNode r)
Fallback rewrite method.
|
void |
visit(RelNode p,
int ordinal,
RelNode parent)
Visits a node during a traversal.
|
RelNode |
visitRoot(RelNode p) |
go, replaceRootprotected final Interpreter interpreter
protected RelNode rootRel
protected RelNode rel
protected Node node
public void visit(RelNode p, int ordinal, RelNode parent)
RelVisitorvisit in class RelVisitorp - Node to visitordinal - Ordinal of node within its parentparent - Parent of the node, or null if it is the root of the
traversalpublic void rewrite(RelNode r)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.