Class FirstLastValue
- java.lang.Object
-
- org.teiid.query.function.aggregate.AggregateFunction
-
- org.teiid.query.function.aggregate.SingleArgumentAggregateFunction
-
- org.teiid.query.function.aggregate.FirstLastValue
-
public class FirstLastValue extends SingleArgumentAggregateFunction
Just a simple First/Last_value() implementation
-
-
Field Summary
-
Fields inherited from class org.teiid.query.function.aggregate.AggregateFunction
argIndexes
-
-
Constructor Summary
Constructors Constructor Description FirstLastValue(Class<?> type, boolean first)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
reset()
Called to reset the state of the function.boolean
respectsNull()
int
setState(List<?> state, int index)
-
Methods inherited from class org.teiid.query.function.aggregate.SingleArgumentAggregateFunction
addInputDirect, initialize, initialize
-
Methods inherited from class org.teiid.query.function.aggregate.AggregateFunction
addInput, filter, getArgIndexes, getOutputType, setArgIndexes, setConditionIndex
-
-
-
-
Constructor Detail
-
FirstLastValue
public FirstLastValue(Class<?> type, boolean first)
-
-
Method Detail
-
reset
public void reset()
Description copied from class:AggregateFunction
Called to reset the state of the function.- Specified by:
reset
in classAggregateFunction
-
addInputDirect
public void addInputDirect(Object input, List<?> tuple, CommandContext commandContext) throws TeiidProcessingException, TeiidComponentException
- Specified by:
addInputDirect
in classSingleArgumentAggregateFunction
- Throws:
TeiidProcessingException
TeiidComponentException
-
getResult
public Object getResult(CommandContext commandContext)
Description copied from class:AggregateFunction
Called after all values have been processed to get the result.- Specified by:
getResult
in classAggregateFunction
- Returns:
- Result value
- See Also:
AggregateFunction.getResult(CommandContext)
-
getState
public void getState(List<Object> state)
- Overrides:
getState
in classAggregateFunction
-
setState
public int setState(List<?> state, int index)
- Overrides:
setState
in classAggregateFunction
-
getStateTypes
public List<? extends Class<?>> getStateTypes()
- Overrides:
getStateTypes
in classAggregateFunction
-
respectsNull
public boolean respectsNull()
- Overrides:
respectsNull
in classAggregateFunction
-
-