net.sf.farrago.defimpl
Class FarragoDefaultHeuristicPlanner
java.lang.Object
org.eigenbase.relopt.AbstractRelOptPlanner
org.eigenbase.relopt.hep.HepPlanner
net.sf.farrago.defimpl.FarragoDefaultHeuristicPlanner
- All Implemented Interfaces:
- FarragoSessionPlanner, RelOptPlanner
public class FarragoDefaultHeuristicPlanner
- extends HepPlanner
- implements FarragoSessionPlanner
FarragoDefaultHeuristicPlanner implements FarragoSessionPlanner
in
terms of HepPlanner
with a Farrago-specific rule program.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/defimpl/FarragoDefaultHeuristicPlanner.java#23 $
- Author:
- John V. Sichi
Methods inherited from class org.eigenbase.relopt.AbstractRelOptPlanner |
addListener, addRelTraitDef, checkCancel, chooseDelegate, fireRule, getCost, getListener, getRuleByDescription, isRuleExcluded, makeCost, makeHugeCost, makeInfiniteCost, makeTinyCost, makeZeroCost, mapRuleDescription, notifyChosen, notifyDiscard, notifyEquivalence, notifyTransformation, registerSchema, setCancelFlag, setImportance, 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, changeTraits, chooseDelegate, ensureRegistered, findBestExp, getCost, getRelMetadataTimestamp, getRoot, isRegistered, makeCost, makeHugeCost, makeInfiniteCost, makeTinyCost, makeZeroCost, register, registerMetadataProviders, registerSchema, removeRule, setCancelFlag, setImportance, setRoot, setRuleDescExclusionFilter |
stmt
private final FarragoSessionPreparingStmt stmt
medPluginRules
private final Collection<RelOptRule> medPluginRules
inPluginRegistration
private boolean inPluginRegistration
FarragoDefaultHeuristicPlanner
public FarragoDefaultHeuristicPlanner(HepProgram program,
FarragoSessionPreparingStmt stmt,
Collection<RelOptRule> medPluginRules)
newInstance
static FarragoDefaultHeuristicPlanner newInstance(FarragoSessionPreparingStmt stmt)
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 AbstractRelOptPlanner
addRule
public boolean addRule(RelOptRule rule)
- Description copied from interface:
RelOptPlanner
- Registers a rule. If the rule has already been registered, does nothing.
This method should determine if the given rule is a
ConverterRule
and pass the ConverterRule to
all registered
RelTraitDef
instances.
- Specified by:
addRule
in interface RelOptPlanner
- Overrides:
addRule
in class HepPlanner
- Returns:
- whether the rule was added, as per
Collection.add(E)
createHepProgram
private static HepProgram createHepProgram(boolean fennelEnabled,
CalcVirtualMachine calcVM,
Collection<RelOptRule> medPluginRules)