|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saffron.rel.SaffronRel | +--net.sf.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 RelSet s, replacing each node
with the cheapest implementation of the expression. |
Field Summary | |
(package private) boolean |
active
whether findBestPlan is being called |
(package private) SaffronRel |
best
best known plan |
(package private) PlanCost |
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 net.sf.saffron.rel.SaffronRel |
cluster, digest, id, rowType |
Constructor Summary | |
(package private) |
RelSubset(VolcanoCluster cluster,
RelSet set,
CallingConvention convention)
|
Method Summary | |
(package private) void |
add(SaffronRel rel)
Add expression rel to this subset. |
(package private) SaffronRel |
buildCheapestPlan(SaffronPlanner 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. |
PlanCost |
computeSelfCost(SaffronPlanner planner)
Returns the cost of this plan (not including children). |
protected SaffronType |
deriveRowType()
|
void |
explain(PlanWriter pw)
|
CallingConvention |
getConvention()
Returns a value from CallingConvention . |
SaffronRel[] |
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,
SaffronRel 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 net.sf.saffron.rel.SaffronRel |
childrenAccept, getChildExps, getCluster, getCorrelVariable, getId, getInput, getOrCreateCorrelVariable, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getTable, getVariablesStopped, implement, implementFieldAccess, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorrelVariable, replaceInput, setCorrelVariable, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
ArrayList parents
ArrayList rels
CallingConvention convention
PlanCost bestCost
RelSet set
SaffronRel best
boolean active
Constructor Detail |
RelSubset(VolcanoCluster cluster, RelSet set, CallingConvention convention)
Method Detail |
public CallingConvention getConvention()
SaffronRel
CallingConvention
.
getConvention
in class SaffronRel
public SaffronRel[] getInputs()
RelSet
s.
getInputs
in class SaffronRel
public Set getVariablesSet()
public Set getVariablesUsed()
public Object clone()
RelSet
is its own clone.
clone
in class SaffronRel
public PlanCost computeSelfCost(SaffronPlanner planner)
SaffronRel
computeSelfCost
in class SaffronRel
public void explain(PlanWriter pw)
explain
in class SaffronRel
protected String computeDigest()
SaffronRel
computeDigest
in class SaffronRel
protected SaffronType deriveRowType()
deriveRowType
in class SaffronRel
ArrayList getParentRels()
Set getParentSubsets()
RelSet getSet()
void add(SaffronRel rel)
rel
to this subset.
SaffronRel buildCheapestPlan(SaffronPlanner planner)
private void propagateCostImprovements(VolcanoPlanner planner, SaffronRel rel)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |