com.lucidera.farrago
Class LucidDbSessionPersonality.LucidDbPlanner

java.lang.Object
  extended by org.eigenbase.relopt.AbstractRelOptPlanner
      extended by org.eigenbase.relopt.hep.HepPlanner
          extended by com.lucidera.farrago.LucidDbSessionPersonality.LucidDbPlanner
All Implemented Interfaces:
FarragoSessionPlanner, RelOptPlanner
Enclosing class:
LucidDbSessionPersonality

private static class LucidDbSessionPersonality.LucidDbPlanner
extends HepPlanner
implements FarragoSessionPlanner


Field Summary
private  boolean inPluginRegistration
           
private  Collection<RelOptRule> medPluginRules
           
private  FarragoSessionPreparingStmt stmt
           
 
Fields inherited from interface org.eigenbase.relopt.RelOptPlanner
tracer
 
Constructor Summary
LucidDbSessionPersonality.LucidDbPlanner(HepProgram program, FarragoSessionPreparingStmt stmt, Collection<RelOptRule> medPluginRules)
           
 
Method Summary
 boolean addRule(RelOptRule rule)
          Registers a rule.
 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()
           
 
Methods inherited from class org.eigenbase.relopt.hep.HepPlanner
changeTraits, ensureRegistered, findBestExp, getRelMetadataTimestamp, getRoot, isRegistered, register, registerMetadataProviders, removeRule, setRoot
 
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
 

Field Detail

stmt

private final FarragoSessionPreparingStmt stmt

medPluginRules

private final Collection<RelOptRule> medPluginRules

inPluginRegistration

private boolean inPluginRegistration
Constructor Detail

LucidDbSessionPersonality.LucidDbPlanner

LucidDbSessionPersonality.LucidDbPlanner(HepProgram program,
                                         FarragoSessionPreparingStmt stmt,
                                         Collection<RelOptRule> medPluginRules)
Method Detail

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)