Class 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
Fields inherited from class net.sf.saffron.rel.SingleRel
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
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


final CallingConvention outConvention
Constructor Detail


public AbstractConverter(VolcanoCluster cluster,
                         SaffronRel rel,
                         CallingConvention outConvention)
Method Detail


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

getConvention in class SaffronRel


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


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.

computeSelfCost in class ConverterRel


public void explain(PlanWriter pw)
explain in class SingleRel