net.sf.farrago.defimpl
Class FarragoDefaultPlanner

java.lang.Object
  extended by org.eigenbase.relopt.AbstractRelOptPlanner
      extended by org.eigenbase.relopt.volcano.VolcanoPlanner
          extended by net.sf.farrago.defimpl.FarragoDefaultPlanner
All Implemented Interfaces:
FarragoSessionPlanner, RelOptPlanner
Direct Known Subclasses:
FarragoMiniplanPersonalityFactory.FarragoVolcanoMiniplanner

public class FarragoDefaultPlanner
extends VolcanoPlanner
implements FarragoSessionPlanner

FarragoDefaultPlanner extends VolcanoPlanner to request Farrago-specific optimizations.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/defimpl/FarragoDefaultPlanner.java#42 $
Author:
John V. Sichi

Field Summary
private  FarragoPreparingStmt stmt
           
 
Fields inherited from class org.eigenbase.relopt.volcano.VolcanoPlanner
ambitious, CostImprovement, impatient, root, ruleSet
 
Fields inherited from interface org.eigenbase.relopt.RelOptPlanner
tracer
 
Constructor Summary
FarragoDefaultPlanner(FarragoSessionPreparingStmt stmt)
          Creates a new FarragoDefaultPlanner object.
 
Method Summary
static void addFennelCalcRules(FarragoSessionPlanner planner, boolean auto)
           
static void addStandardRules(FarragoSessionPlanner planner, boolean fennelEnabled, CalcVirtualMachine calcVM)
          Adds a set of standard rules to a planner.
 void beginMedPluginRegistration(String serverClassName)
          Notifies this planner that registration for a particular SQL/MED plugin is about to start, meaning the plugin might call the planner via methods such as RelOptPlanner.addRule(org.eigenbase.relopt.RelOptRule).
 void endMedPluginRegistration()
          Notifies this planner that registration has ended for the SQL/MED plugin whose identity was last passed to beginMedPluginRegistration.
 JavaRelImplementor getJavaRelImplementor(RelNode rel)
          Retrieves an implementor appropriate for the context in which this planner was created.
 FarragoSessionPreparingStmt getPreparingStmt()
           
 void init()
          Initializes Farrago-specific rules for this planner.
 
Methods inherited from class org.eigenbase.relopt.volcano.VolcanoPlanner
addListener, addRelTraitDef, addRule, canConvert, changeTraits, chooseDelegate, dump, ensureRegistered, findBestExp, getConversionOperands, getCost, getPhaseRuleMappingInitializer, getRelMetadataTimestamp, getRoot, getSet, getSubset, getSubset, getSubset, isRegistered, makeCost, makeHugeCost, makeInfiniteCost, makeTinyCost, makeZeroCost, normalizePlan, register, registerAbstractRelationalRules, registerMetadataProviders, registerSchema, removeRule, setImportance, setRoot, validate
 
Methods inherited from class org.eigenbase.relopt.AbstractRelOptPlanner
checkCancel, fireRule, getListener, getRuleByDescription, isRuleExcluded, mapRuleDescription, notifyChosen, notifyDiscard, notifyEquivalence, notifyTransformation, setCancelFlag, setRuleDescExclusionFilter, unmapRuleDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eigenbase.relopt.RelOptPlanner
addListener, addRelTraitDef, addRule, changeTraits, chooseDelegate, ensureRegistered, findBestExp, getCost, getRelMetadataTimestamp, getRoot, isRegistered, makeCost, makeHugeCost, makeInfiniteCost, makeTinyCost, makeZeroCost, register, registerMetadataProviders, registerSchema, removeRule, setCancelFlag, setImportance, setRoot, setRuleDescExclusionFilter
 

Field Detail

stmt

private FarragoPreparingStmt stmt
Constructor Detail

FarragoDefaultPlanner

public FarragoDefaultPlanner(FarragoSessionPreparingStmt stmt)
Creates a new FarragoDefaultPlanner object.

Parameters:
stmt - statement on whose behalf this planner operates
Method Detail

init

public void init()
Initializes Farrago-specific rules for this planner.


addStandardRules

public static void addStandardRules(FarragoSessionPlanner planner,
                                    boolean fennelEnabled,
                                    CalcVirtualMachine calcVM)
Adds a set of standard rules to a planner.

Parameters:
planner - Planner
fennelEnabled - Whether fennel is enabled.
calcVM - Flavor of calculator being used.

addFennelCalcRules

public static void addFennelCalcRules(FarragoSessionPlanner planner,
                                      boolean auto)

getPreparingStmt

public FarragoSessionPreparingStmt getPreparingStmt()
Specified by:
getPreparingStmt in interface FarragoSessionPlanner
Returns:
the FarragoSessionPreparingStmt associated with this planner.

beginMedPluginRegistration

public void beginMedPluginRegistration(String serverClassName)
Description copied from interface: FarragoSessionPlanner
Notifies this planner that registration for a particular SQL/MED plugin is about to start, meaning the plugin might call the planner via methods such as RelOptPlanner.addRule(org.eigenbase.relopt.RelOptRule).

Specified by:
beginMedPluginRegistration in interface FarragoSessionPlanner
Parameters:
serverClassName - name of class implementing FarragoMedDataServer

endMedPluginRegistration

public void endMedPluginRegistration()
Description copied from interface: FarragoSessionPlanner
Notifies this planner that registration has ended for the SQL/MED plugin whose identity was last passed to beginMedPluginRegistration.

Specified by:
endMedPluginRegistration in interface FarragoSessionPlanner

getJavaRelImplementor

public JavaRelImplementor getJavaRelImplementor(RelNode rel)
Description copied from interface: RelOptPlanner
Retrieves an implementor appropriate for the context in which this planner was created.

Specified by:
getJavaRelImplementor in interface RelOptPlanner
Overrides:
getJavaRelImplementor in class VolcanoPlanner