saffron
Interface Planner

All Known Implementing Classes:
VolcanoPlanner

public interface Planner

A Planner is a query optimizer: it transforms a relational expression into a semantically equivalent relational expression, according to a given set of rules and a cost model.


Method Summary
 void addCallingConvention(CallingConvention convention)
          Registers a calling convention.
 void addRule(Rule rule)
          Registers a rule.
 Rel changeConvention(Rel rel, CallingConvention toConvention)
          Changes a relational expression to an equivalent one of a different calling convention.
 Planner chooseDelegate()
          Negotiates an appropriate planner to deal with distributed queries.
 Rel findBestExp()
          Find the most efficient expression to implement this query.
 Rel getRoot()
           
 Cost makeCost(double dRows, double dCpu, double dIo)
          Create a cost object.
 Cost makeHugeCost()
          Create a cost object representing infinite cost.
 Cost makeInfiniteCost()
          Create a cost object representing infinite cost.
 Cost makeTinyCost()
          Create a cost object representing a small positive cost.
 Cost makeZeroCost()
          Create a cost object representing zero cost.
 Rel register(Rel rel, Rel equivRel)
          Registers a relational expression in the expression bank.
 void registerSchema(Schema schema)
          Tells this planner that a schema exists.
 void setRoot(Rel rel)
           
 

Method Detail

setRoot

public void setRoot(Rel rel)

getRoot

public Rel getRoot()

chooseDelegate

public Planner chooseDelegate()
Negotiates an appropriate planner to deal with distributed queries. The idea is that the schemas decide among themselves which has the most knowledge. Right now, the local planner retains control.


findBestExp

public Rel findBestExp()
Find the most efficient expression to implement this query.


changeConvention

public Rel changeConvention(Rel rel,
                            CallingConvention toConvention)
Changes a relational expression to an equivalent one of a different calling convention. The return is never null, but may be abstract.

Pre-condition:
rel.getConvention() != toConvention
Post-condition:
return != null

makeCost

public Cost makeCost(double dRows,
                     double dCpu,
                     double dIo)
Create a cost object.


makeInfiniteCost

public Cost makeInfiniteCost()
Create a cost object representing infinite cost.


makeHugeCost

public Cost makeHugeCost()
Create a cost object representing infinite cost.


makeZeroCost

public Cost makeZeroCost()
Create a cost object representing zero cost.


makeTinyCost

public Cost makeTinyCost()
Create a cost object representing a small positive cost.


register

public Rel register(Rel rel,
                    Rel equivRel)
Registers a relational expression in the expression bank. After it has been registered, you may not modify it.

Parameters:
rel - Relational expression to register
equivRel - Relational expression it is equivalent to (may be null)
Returns:
the same expression, or an equivalent existing expression

registerSchema

public void registerSchema(Schema schema)
Tells this planner that a schema exists. This is the schema's chance to tell the planner about all of the special transformation rules.


addRule

public void addRule(Rule rule)
Registers a rule.


addCallingConvention

public void addCallingConvention(CallingConvention convention)
Registers a calling convention.


SourceForge.net_Logo