@Internal public final class FirstValueWithRetractAggFunction<T> extends BuiltInAggregateFunction<T,FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T>>
Modifier and Type | Class and Description |
---|---|
static class |
FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T>
Accumulator for FIRST_VALUE.
|
Constructor and Description |
---|
FirstValueWithRetractAggFunction(LogicalType valueType) |
getRequirements, getTypeInference, isDeterministic
getKind
getAccumulatorType, getResultType
close, functionIdentifier, open, toString
public FirstValueWithRetractAggFunction(LogicalType valueType)
public DataType getAccumulatorDataType()
public DataType getOutputDataType()
public FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> createAccumulator()
ImperativeAggregateFunction
ImperativeAggregateFunction
.
The accumulator is an intermediate data structure that stores the aggregated values until a final aggregation result is computed.
createAccumulator
in class ImperativeAggregateFunction<T,FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T>>
public void accumulate(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, Object value) throws Exception
Exception
public void accumulate(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, Object value, Long order) throws Exception
Exception
public void accumulate(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, StringData value) throws Exception
Exception
public void accumulate(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, StringData value, Long order) throws Exception
Exception
public void retract(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, Object value) throws Exception
Exception
public void retract(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc, Object value, Long order) throws Exception
Exception
public void resetAccumulator(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc)
public T getValue(FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T> acc)
AggregateFunction
getValue
in class AggregateFunction<T,FirstValueWithRetractAggFunction.FirstValueWithRetractAccumulator<T>>
acc
- the accumulator which contains the current intermediate resultsCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.