|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.SumAvgAggregateDefinition
Defintion for the SUM()/AVG() aggregates.
Field Summary | |
private boolean |
isSum
|
Constructor Summary | |
SumAvgAggregateDefinition()
Niladic constructor. |
Method Summary | |
TypeDescriptor |
getAggregator(TypeDescriptor inputType,
java.lang.StringBuffer aggregatorClass)
Determines the result datatype. |
private java.lang.String |
getAggregatorClassName()
Return the aggregator class. |
protected java.lang.String |
getOperator()
Return the arithmetic operator corresponding to this operation. |
void |
setSumOrAvg(boolean isSum)
This is set by the parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean isSum
Constructor Detail |
public SumAvgAggregateDefinition()
Method Detail |
public final TypeDescriptor getAggregator(TypeDescriptor inputType, java.lang.StringBuffer aggregatorClass)
Note: In the future you should be able to do a sum user data types. One option would be to run sum on anything that implements plus(). In which case avg() would need divide().
getAggregator
in interface AggregateDefinition
inputType
- the input type descriptoraggregatorClass
- output parameter, filled in
with the class name that implements com.ibm.db2j.aggregates.Aggregator
TypeDescriptor
private java.lang.String getAggregatorClassName()
protected java.lang.String getOperator()
public final void setSumOrAvg(boolean isSum)
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |