|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--saffron.rel.Rel
|
+--saffron.opt.RelSubset
A RelSubset is set of expressions in a set which have the same
calling convention. An expression may be in more than one sub-set of a set;
the same expression is used.
| Nested Class Summary | |
(package private) class |
RelSubset.CheapestPlanReplacer
Visitor which walks over a tree of RelSets,
replacing each node with the cheapest implementation of the expression. |
| Nested classes inherited from class saffron.rel.Rel |
|
| Field Summary | |
(package private) boolean |
active
whether findBestPlan is being called |
(package private) Rel |
best
best known plan |
(package private) Cost |
bestCost
cost of best known plan (it may have improved since) |
(package private) CallingConvention |
convention
|
(package private) ArrayList |
parents
List of the relational expressions for which this subset is an input. |
(package private) ArrayList |
rels
|
(package private) RelSet |
set
|
| Fields inherited from class saffron.rel.Rel |
cluster, digest, id, rowType |
| Constructor Summary | |
(package private) |
RelSubset(Cluster cluster,
RelSet set,
CallingConvention convention)
|
| Method Summary | |
(package private) void |
add(Rel rel)
Add expression rel to this subset. |
(package private) Rel |
buildCheapestPlan(Planner planner)
Recursively build a tree consisting of the cheapest plan at each node. |
Object |
clone()
An RelSet is its own clone. |
protected String |
computeDigest()
Computes the digest. |
Cost |
computeSelfCost(Planner planner)
Returns the cost of this plan (not including children). |
protected Type |
deriveRowType()
|
void |
explain(PlanWriter pw)
|
CallingConvention |
getConvention()
Returns a value from CallingConvention. |
Rel[] |
getInputs()
There are no children, as such. |
(package private) ArrayList |
getParentRels()
|
(package private) Set |
getParentSubsets()
|
(package private) RelSet |
getSet()
|
Set |
getVariablesSet()
|
Set |
getVariablesUsed()
|
private void |
propagateCostImprovements(VolcanoPlanner planner,
Rel rel)
Checks whether a relexp has made its subset cheaper, and if it so, recursively checks whether that subset's parents have gotten cheaper. |
| Methods inherited from class saffron.rel.Rel |
childrenAccept, getChildExps, getCluster, getCorelVariable, getEnvironment, getId, getInput, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getTable, getType, getVariablesStopped, implement, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorelVariable, replaceInput, setCorelVariable, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
RelSet set
CallingConvention convention
ArrayList rels
ArrayList parents
Cost bestCost
Rel best
boolean active
| Constructor Detail |
RelSubset(Cluster cluster,
RelSet set,
CallingConvention convention)
| Method Detail |
RelSet getSet()
ArrayList getParentRels()
Set getParentSubsets()
void add(Rel rel)
rel to this subset.
private void propagateCostImprovements(VolcanoPlanner planner,
Rel rel)
public Object clone()
RelSet is its own clone.
clone in class Relprotected String computeDigest()
Rel
computeDigest in class Relpublic Rel[] getInputs()
RelSets.
getInputs in class Relprotected Type deriveRowType()
deriveRowType in class Relpublic Cost computeSelfCost(Planner planner)
Rel
computeSelfCost in class Relpublic void explain(PlanWriter pw)
explain in class Relpublic CallingConvention getConvention()
RelCallingConvention.
getConvention in class Relpublic Set getVariablesSet()
public Set getVariablesUsed()
Rel buildCheapestPlan(Planner planner)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||