|
|||||||||
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
public class SumAvgAggregateDefinition
Defintion for the SUM()/AVG() aggregates.
Field Summary | |
---|---|
private boolean |
isSum
|
Constructor Summary | |
---|---|
SumAvgAggregateDefinition()
Niladic constructor. |
Method Summary | |
---|---|
DataTypeDescriptor |
getAggregator(DataTypeDescriptor 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 DataTypeDescriptor getAggregator(DataTypeDescriptor 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, either a user type or a java.lang objectaggregatorClass
- 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 Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |