saffron.opt
Class AbstractConverter

java.lang.Object
  |
  +--saffron.rel.Rel
        |
        +--saffron.rel.SingleRel
              |
              +--saffron.rel.convert.Converter
                    |
                    +--saffron.opt.AbstractConverter

class AbstractConverter
extends Converter

Converts a relational expression to any given output convention.

Unlike most Converters, and abstract converter is always abstract. You would typically create an AbstractConverter when it is necessary to transform a relational expression immediately; later, rules will transform it into relational expressions which can be implemented.

If an abstract converter cannot be satisfied immediately (because the source subset is abstract), the set is flagged, so this converter will be expanded as soon as a non-abstract relexp is added to the set.


Nested Class Summary
(package private) static class AbstractConverter.ExpandConversionRule
          Rule which converts an AbstractConverter into a chain of converters from the source relation to the target calling convention.
 
Nested classes inherited from class saffron.rel.Rel
 
Field Summary
(package private)  CallingConvention outConvention
           
 
Fields inherited from class saffron.rel.convert.Converter
inConvention
 
Fields inherited from class saffron.rel.SingleRel
child
 
Fields inherited from class saffron.rel.Rel
cluster, digest, id, rowType
 
Constructor Summary
AbstractConverter(Cluster cluster, Rel rel, CallingConvention outConvention)
           
 
Method Summary
 Object clone()
           
 Cost computeSelfCost(Planner planner)
          Returns the cost of this plan (not including children).
 void explain(PlanWriter pw)
           
 CallingConvention getConvention()
          Returns a value from CallingConvention.
 
Methods inherited from class saffron.rel.convert.Converter
implement
 
Methods inherited from class saffron.rel.SingleRel
childrenAccept, deriveRowType, getInputs, replaceInput
 
Methods inherited from class saffron.rel.Rel
computeDigest, getChildExps, getCluster, getCorelVariable, getEnvironment, getId, getInput, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getTable, getType, getVariablesStopped, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorelVariable, setCorelVariable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

outConvention

final CallingConvention outConvention
Constructor Detail

AbstractConverter

public AbstractConverter(Cluster cluster,
                         Rel rel,
                         CallingConvention outConvention)
Method Detail

clone

public Object clone()
Specified by:
clone in class Rel

getConvention

public CallingConvention getConvention()
Description copied from class: Rel
Returns a value from CallingConvention.

Overrides:
getConvention in class Rel

computeSelfCost

public Cost computeSelfCost(Planner planner)
Description copied from class: Rel
Returns the cost of this plan (not including children). The base implementation throws an error; derived classes should override.

Overrides:
computeSelfCost in class Converter

explain

public void explain(PlanWriter pw)
Overrides:
explain in class SingleRel

SourceForge.net_Logo