net.sf.farrago.fennel.calc
Class CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor

java.lang.Object
  extended by net.sf.farrago.fennel.calc.CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor
All Implemented Interfaces:
CalcRexAggImplementor
Direct Known Subclasses:
CalcRexImplementorTableImpl.CountCalcRexImplementor, CalcRexImplementorTableImpl.FirstValueCalcRexImplementor, CalcRexImplementorTableImpl.HistogramAggRexImplementor, CalcRexImplementorTableImpl.LastValueCalcRexImplementor, CalcRexImplementorTableImpl.MinMaxCalcRexImplementor, CalcRexImplementorTableImpl.SumCalcRexImplementor, CalcRexImplementorTableImpl.SumEmptyIsZeroCalcRexImplementor
Enclosing class:
CalcRexImplementorTableImpl

public abstract static class CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor
extends Object
implements CalcRexAggImplementor

Abstract base class for classes which implement CalcRexAggImplementor.


Constructor Summary
CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor()
           
 
Method Summary
 boolean canImplement(RexCall call)
          Returns whether this implementor can handle the given call.
 void implementInitAdd(RexCall call, CalcReg accumulatorRegister, RexToCalcTranslator translator)
          Generates instructions to initialize and add a new value to an aggregation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.fennel.calc.CalcRexAggImplementor
implementAdd, implementDrop, implementInitialize
 

Constructor Detail

CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor

public CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor()
Method Detail

implementInitAdd

public void implementInitAdd(RexCall call,
                             CalcReg accumulatorRegister,
                             RexToCalcTranslator translator)
Description copied from interface: CalcRexAggImplementor
Generates instructions to initialize and add a new value to an aggregation. This could call implementInitialize followed by implementAdd

Specified by:
implementInitAdd in interface CalcRexAggImplementor
Parameters:
call - The call to the aggregate function to be implemented
accumulatorRegister - The accumulator register
translator - Calculator code generator

canImplement

public boolean canImplement(RexCall call)
Description copied from interface: CalcRexAggImplementor
Returns whether this implementor can handle the given call.

Specified by:
canImplement in interface CalcRexAggImplementor
Parameters:
call - The call to the aggregate function to be implemented