class SumAvgAggregateDefinition extends java.lang.Object implements AggregateDefinition
Modifier and Type | Field and Description |
---|---|
private boolean |
isSum |
Constructor and Description |
---|
SumAvgAggregateDefinition()
Niladic constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
(package private) void |
setSumOrAvg(boolean isSum)
This is set by the parser.
|
public SumAvgAggregateDefinition()
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.AggregatorTypeDescriptor
private java.lang.String getAggregatorClassName()
protected java.lang.String getOperator()
final void setSumOrAvg(boolean isSum)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.