public abstract class AggregateFunction extends Object
Modifier and Type | Field and Description |
---|---|
protected int[] |
argIndexes |
Constructor and Description |
---|
AggregateFunction() |
Modifier and Type | Method and Description |
---|---|
void |
addInput(List<?> tuple,
CommandContext commandContext) |
abstract void |
addInputDirect(List<?> tuple,
CommandContext commandContext)
Called for the element value in every row of a group.
|
boolean |
filter(List<?> tuple) |
int[] |
getArgIndexes() |
Class<?> |
getOutputType(AggregateSymbol function) |
abstract 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<?>[] inputTypes)
Called to initialize the function.
|
abstract void |
reset()
Called to reset the state of the function.
|
boolean |
respectsNull() |
void |
setArgIndexes(int[] argIndexes) |
void |
setConditionIndex(int conditionIndex) |
int |
setState(List<?> state,
int index) |
public void setArgIndexes(int[] argIndexes)
public void setConditionIndex(int conditionIndex)
public void initialize(Class<?> dataType, Class<?>[] inputTypes)
dataType
- Data type of element begin aggregatedinputTypes
- public int[] getArgIndexes()
public abstract void reset()
public void addInput(List<?> tuple, CommandContext commandContext) throws TeiidComponentException, TeiidProcessingException
public boolean filter(List<?> tuple)
public boolean respectsNull()
public abstract void addInputDirect(List<?> tuple, CommandContext commandContext) throws TeiidComponentException, TeiidProcessingException
tuple
- commandContext
- TeiidProcessingException
TeiidComponentException
public abstract Object getResult(CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException
commandContext
- TeiidProcessingException
FunctionExecutionException
ExpressionEvaluationException
TeiidComponentException
public int setState(List<?> state, int index)
public Class<?> getOutputType(AggregateSymbol function)
Copyright © 2019. All rights reserved.