| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.relopt.RelOptQuery
public class RelOptQuery
A RelOptQuery represents a set of relational
 expressions which derive from the same select statement.
| Nested Class Summary | |
|---|---|
| static interface | RelOptQuery.DeferredLookupContains the information necessary to repeat a call to SqlToRelConverter.Blackboard.lookup(int, org.eigenbase.sql2rel.SqlToRelConverter.LookupContext). | 
| Field Summary | |
|---|---|
| static String | correlPrefixPrefix to the name of correlating variables. | 
| (package private)  Map<String,RelNode> | mapCorrelToRelMaps name of correlating variable (e.g. | 
| private  Map<RelOptQuery.DeferredLookup,String> | mapDeferredToCorrelMaps a from-list expression to the name of the correlating variable which references it. | 
| private  int | nextCorrel | 
| private  RelOptPlanner | planner | 
| Constructor Summary | |
|---|---|
| RelOptQuery(RelOptPlanner planner)Creates a query. | |
| Method Summary | |
|---|---|
|  RelOptCluster | createCluster(Environment env,
              RelDataTypeFactory typeFactory,
              RexBuilder rexBuilder)Creates a cluster. | 
|  String | createCorrel()Constructs a new name for a correlating variable. | 
|  String | createCorrelUnresolved(RelOptQuery.DeferredLookup deferredLookup)Creates a name for a correlating variable for which no RelNodehas been created yet. | 
| static int | getCorrelOrdinal(String correlName)Converts a correlating variable name into an ordinal, unqiue within the query. | 
|  Map<RelOptQuery.DeferredLookup,String> | getMapDeferredToCorrel()Returns the map which identifies which correlating variable each RelOptQuery.DeferredLookupwill set. | 
|  RelNode | lookupCorrel(String name)Returns the relational expression which populates a correlating variable. | 
|  void | mapCorrel(String name,
          RelNode rel)Maps a correlating variable to a RelNode. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String correlPrefix
private final Map<RelOptQuery.DeferredLookup,String> mapDeferredToCorrel
RelNode.
final Map<String,RelNode> mapCorrelToRel
RelNode
 which implements it.
private final RelOptPlanner planner
private int nextCorrel
| Constructor Detail | 
|---|
public RelOptQuery(RelOptPlanner planner)
planner - Planner| Method Detail | 
|---|
public static int getCorrelOrdinal(String correlName)
correlName - Name of correlating variable
public Map<RelOptQuery.DeferredLookup,String> getMapDeferredToCorrel()
RelOptQuery.DeferredLookup will set.
public RelOptCluster createCluster(Environment env,
                                   RelDataTypeFactory typeFactory,
                                   RexBuilder rexBuilder)
env - OpenJava environmenttypeFactory - Type factoryrexBuilder - Expression builder
public String createCorrel()
public String createCorrelUnresolved(RelOptQuery.DeferredLookup deferredLookup)
RelNode
 has been created yet.
deferredLookup - contains the information required to resolve the
 variable laterpublic RelNode lookupCorrel(String name)
public void mapCorrel(String name,
                      RelNode rel)
RelNode.
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||