|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saffron.sql2rel.SqlToRelConverter.Blackboard
Workspace for translating an individual SELECT statement (or sub-SELECT).
Field Summary | |
private SaffronRel[] |
inputs
|
private HashMap |
mapSubqueryToExpr
Maps IN and EXISTS sub-queries to the expressions
which will be used to access them. |
private SaffronRel |
root
|
(package private) SqlValidator.Scope |
scope
Collection of SaffronRel objects which correspond to a
SELECT statement. |
private ArrayList |
subqueries
List of IN and EXISTS nodes inside this
SELECT statement (but not inside sub-queries). |
Constructor Summary | |
(package private) |
SqlToRelConverter.Blackboard(SqlValidator.Scope scope)
Creates a Blackboard |
Method Summary | |
private ArrayList |
flatten(SaffronRel[] rels)
|
private void |
flatten(SaffronRel[] rels,
ArrayList list)
|
(package private) RexNode |
lookup(int offset,
SaffronRel[] inputs,
boolean isParent,
String varName)
Creates an expression with which to reference expression , whose offset in its from-list is
offset . |
(package private) RexNode |
lookupExp(String name)
Returns an expression with which to reference a from-list item. |
RexNode |
register(SaffronRel rel)
Registers a relational expression |
void |
registerSubquery(SqlNode node)
|
(package private) void |
setRoot(SaffronRel root)
|
(package private) void |
setRoot(SaffronRel[] inputs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
final SqlValidator.Scope scope
SaffronRel
objects which correspond to a
SELECT statement.
private SaffronRel root
private SaffronRel[] inputs
private final ArrayList subqueries
IN
and EXISTS
nodes inside this
SELECT
statement (but not inside sub-queries).
private final HashMap mapSubqueryToExpr
sub-queries
to the expressions
which will be used to access them.
Constructor Detail |
SqlToRelConverter.Blackboard(SqlValidator.Scope scope)
Method Detail |
public RexNode register(SaffronRel rel)
rel
- Relational expression
void setRoot(SaffronRel root)
void setRoot(SaffronRel[] inputs)
RexNode lookupExp(String name)
name
- the alias of the from item
Variable
or FieldAccess
RexNode lookup(int offset, SaffronRel[] inputs, boolean isParent, String varName)
expression
, whose offset in its from-list is
offset
.
private ArrayList flatten(SaffronRel[] rels)
private void flatten(SaffronRel[] rels, ArrayList list)
public void registerSubquery(SqlNode node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |