Class Ntile
- java.lang.Object
-
- org.teiid.query.function.aggregate.AggregateFunction
-
- org.teiid.query.function.aggregate.SingleArgumentAggregateFunction
-
- org.teiid.query.function.aggregate.Ntile
-
public class Ntile extends SingleArgumentAggregateFunction
Captures the row number and number of tiles for a given row post processing logic uses the row count over the window to calculate the final output
-
-
Field Summary
-
Fields inherited from class org.teiid.query.function.aggregate.AggregateFunction
argIndexes
-
-
Constructor Summary
Constructors Constructor Description Ntile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInputDirect(Object input, List<?> tuple, CommandContext commandContext)
Class<?>
getOutputType(AggregateSymbol function)
Object
getResult(CommandContext commandContext)
Called after all values have been processed to get the result.void
reset()
Called to reset the state of the function.-
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, getState, getStateTypes, respectsNull, setArgIndexes, setConditionIndex, setState
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from class:AggregateFunction
Called to reset the state of the function.- Specified by:
reset
in classAggregateFunction
-
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
-
addInputDirect
public void addInputDirect(Object input, List<?> tuple, CommandContext commandContext) throws TeiidProcessingException, TeiidComponentException
- Specified by:
addInputDirect
in classSingleArgumentAggregateFunction
- Throws:
TeiidProcessingException
TeiidComponentException
-
getOutputType
public Class<?> getOutputType(AggregateSymbol function)
- Overrides:
getOutputType
in classAggregateFunction
-
-