public class Avg extends Sum
AggregateSymbol
- the type will not be an
integral type but will always be some kind of decimal type.accumulatorType, BIG_DECIMAL, BIG_INTEGER, DOUBLE, LONG
argIndexes
Constructor and Description |
---|
Avg() |
Modifier and Type | Method and Description |
---|---|
void |
addInputDirect(Object input,
List<?> tuple,
CommandContext commandContext) |
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) |
getAccumulatorType
addInputDirect, initialize
addInput, filter, getArgIndexes, getOutputType, respectsNull, setArgIndexes, setConditionIndex
public void initialize(Class<?> dataType, Class<?> inputType)
initialize
in class Sum
org.teiid.query.function.aggregate.AggregateFunction#initialize(String, Class)
public void reset()
AggregateFunction
public void addInputDirect(Object input, List<?> tuple, CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException
addInputDirect
in class Sum
FunctionExecutionException
ExpressionEvaluationException
TeiidComponentException
org.teiid.query.function.aggregate.AggregateFunction#addInputDirect(List, CommandContext, CommandContext)
public Object getResult(CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException
AggregateFunction
getResult
in class Sum
FunctionExecutionException
ExpressionEvaluationException
TeiidComponentException
AggregateFunction.getResult(CommandContext)
public List<? extends Class<?>> getStateTypes()
getStateTypes
in class Sum
Copyright © 2019. All rights reserved.