public class Sum extends SingleArgumentAggregateFunction
AggregateSymbol| Modifier and Type | Field and Description |
|---|---|
protected int |
accumulatorType |
protected static int |
BIG_DECIMAL |
protected static int |
BIG_INTEGER |
protected static int |
DOUBLE |
protected static int |
LONG |
argIndexes| Constructor and Description |
|---|
Sum() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInputDirect(Object input,
List<?> tuple,
CommandContext commandContext) |
protected int |
getAccumulatorType()
Allows subclasses to determine type of accumulator for the SUM.
|
Object |
getResult(CommandContext commandContext)
Called after all values have been processed to get the result.
|
void |
getState(List<Object> state) |
List<? extends Class<?>> |
getStateTypes() |
void |
initialize(Class<?> dataType,
Class<?> inputType) |
void |
reset()
Called to reset the state of the function.
|
int |
setState(List<?> state,
int index) |
addInputDirect, initializeaddInput, filter, getArgIndexes, respectsNull, setArgIndexes, setConditionIndexprotected static final int LONG
protected static final int DOUBLE
protected static final int BIG_INTEGER
protected static final int BIG_DECIMAL
protected int accumulatorType
protected int getAccumulatorType()
public void initialize(Class<?> dataType, Class<?> inputType)
initialize in class SingleArgumentAggregateFunctionorg.teiid.query.function.aggregate.AggregateFunction#initialize(boolean, String)public void reset()
AggregateFunctionreset in class AggregateFunctionpublic void addInputDirect(Object input, List<?> tuple, CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException
addInputDirect in class SingleArgumentAggregateFunctionFunctionExecutionExceptionExpressionEvaluationExceptionTeiidComponentExceptionorg.teiid.query.function.aggregate.AggregateFunction#addInputDirect(List, CommandContext, CommandContext)public Object getResult(CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException
AggregateFunctiongetResult in class AggregateFunctionFunctionExecutionExceptionExpressionEvaluationExceptionTeiidComponentExceptionAggregateFunction.getResult(CommandContext)public void getState(List<Object> state)
getState in class AggregateFunctionpublic List<? extends Class<?>> getStateTypes()
getStateTypes in class AggregateFunctionpublic int setState(List<?> state, int index)
setState in class AggregateFunctionCopyright © 2018 JBoss by Red Hat. All rights reserved.