|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.query.function.aggregate.AggregateFunction
org.teiid.query.function.aggregate.Sum
public class Sum
Accumulates (per tuple) and calculates the sum of the values
of a column. The type of the result varies depending on the type
of the input AggregateSymbol
| Field Summary | |
|---|---|
protected int |
accumulatorType
|
protected static int |
BIG_DECIMAL
|
protected static int |
BIG_INTEGER
|
protected static int |
DOUBLE
|
protected static int |
LONG
|
| Constructor Summary | |
|---|---|
Sum()
|
|
| Method Summary | |
|---|---|
void |
addInputDirect(java.lang.Object input,
java.util.List<?> tuple)
Called for the element value in every row of a group. |
protected int |
getAccumulatorType()
Allows subclasses to determine type of accumulator for the SUM. |
java.lang.Object |
getResult()
Called after all values have been processed to get the result. |
void |
initialize(java.lang.Class<?> dataType,
java.lang.Class<?> inputType)
Called to initialize the function. |
void |
reset()
Called to reset the state of the function. |
| Methods inherited from class org.teiid.query.function.aggregate.AggregateFunction |
|---|
addInput, setExpressionIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int LONG
protected static final int DOUBLE
protected static final int BIG_INTEGER
protected static final int BIG_DECIMAL
protected int accumulatorType
| Constructor Detail |
|---|
public Sum()
| Method Detail |
|---|
protected int getAccumulatorType()
public void initialize(java.lang.Class<?> dataType,
java.lang.Class<?> inputType)
AggregateFunction
initialize in class AggregateFunctiondataType - Data type of element begin aggregatedorg.teiid.query.function.aggregate.AggregateFunction#initialize(boolean, String)public void reset()
AggregateFunction
reset in class AggregateFunction
public void addInputDirect(java.lang.Object input,
java.util.List<?> tuple)
throws FunctionExecutionException,
ExpressionEvaluationException,
TeiidComponentException
AggregateFunction
addInputDirect in class AggregateFunctioninput - Input value, may be null
FunctionExecutionException
ExpressionEvaluationException
TeiidComponentExceptionAggregateFunction.addInputDirect(Object, List)
public java.lang.Object getResult()
throws FunctionExecutionException,
ExpressionEvaluationException,
TeiidComponentException
AggregateFunction
getResult in class AggregateFunctionFunctionExecutionException
ExpressionEvaluationException
TeiidComponentExceptionAggregateFunction.getResult()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||