net.sf.saffron.opt
Class AbstractConverter

java.lang.Object
  |
  +--net.sf.saffron.rel.SaffronRel
        |
        +--net.sf.saffron.rel.SingleRel
              |
              +--net.sf.saffron.rel.convert.ConverterRel
                    |
                    +--net.sf.saffron.opt.AbstractConverter

public class AbstractConverter
extends ConverterRel

Converts a relational expression to any given output convention.

Unlike most ConverterRels, 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
static class AbstractConverter.ExpandConversionRule
          Rule which converts an AbstractConverter into a chain of converters from the source relation to the target calling convention.
 
Field Summary
(package private)  CallingConvention outConvention
           
 
Fields inherited from class net.sf.saffron.rel.convert.ConverterRel
inConvention
 
Fields inherited from class net.sf.saffron.rel.SingleRel
child
 
Fields inherited from class net.sf.saffron.rel.SaffronRel
cluster, digest, id, rowType
 
Constructor Summary
AbstractConverter(VolcanoCluster cluster, SaffronRel rel, CallingConvention outConvention)
           
 
Method Summary
 Object clone()
           
 PlanCost computeSelfCost(SaffronPlanner 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 net.sf.saffron.rel.convert.ConverterRel
implement
 
Methods inherited from class net.sf.saffron.rel.SingleRel
childrenAccept, deriveRowType, getInputs, getRows, replaceInput
 
Methods inherited from class net.sf.saffron.rel.SaffronRel
computeDigest, getChildExps, getCluster, getCorrelVariable, getId, getInput, getOrCreateCorrelVariable, getQualifier, getQuery, getRelTypeName, getRowType, getTable, getVariablesStopped, implementFieldAccess, isAccessTo, isDistinct, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, 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(VolcanoCluster cluster,
                         SaffronRel rel,
                         CallingConvention outConvention)
Method Detail

getConvention

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

Overrides:
getConvention in class SaffronRel

clone

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

computeSelfCost

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

Overrides:
computeSelfCost in class ConverterRel

explain

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

SourceForge.net_Logo