@Internal public final class MinWithRetractAggFunction<T extends Comparable<T>> extends BuiltInAggregateFunction<T,MinWithRetractAggFunction.MinWithRetractAccumulator<T>>
Modifier and Type | Class and Description |
---|---|
static class |
MinWithRetractAggFunction.MinWithRetractAccumulator<T>
Accumulator for MIN with retraction.
|
Constructor and Description |
---|
MinWithRetractAggFunction(LogicalType valueType) |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc,
T value) |
MinWithRetractAggFunction.MinWithRetractAccumulator<T> |
createAccumulator()
Creates and initializes the accumulator for this
ImperativeAggregateFunction . |
DataType |
getAccumulatorDataType() |
List<DataType> |
getArgumentDataTypes() |
DataType |
getOutputDataType() |
T |
getValue(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc)
Called every time when an aggregation result should be materialized.
|
void |
merge(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc,
Iterable<MinWithRetractAggFunction.MinWithRetractAccumulator<T>> its) |
void |
resetAccumulator(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc) |
void |
retract(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc,
T value) |
getRequirements, getTypeInference, isDeterministic
getKind
getAccumulatorType, getResultType
close, functionIdentifier, open, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
supportsConstantFolding
public MinWithRetractAggFunction(LogicalType valueType)
public List<DataType> getArgumentDataTypes()
getArgumentDataTypes
in class BuiltInAggregateFunction<T extends Comparable<T>,MinWithRetractAggFunction.MinWithRetractAccumulator<T extends Comparable<T>>>
public DataType getAccumulatorDataType()
getAccumulatorDataType
in class BuiltInAggregateFunction<T extends Comparable<T>,MinWithRetractAggFunction.MinWithRetractAccumulator<T extends Comparable<T>>>
public DataType getOutputDataType()
getOutputDataType
in class BuiltInAggregateFunction<T extends Comparable<T>,MinWithRetractAggFunction.MinWithRetractAccumulator<T extends Comparable<T>>>
public MinWithRetractAggFunction.MinWithRetractAccumulator<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 extends Comparable<T>,MinWithRetractAggFunction.MinWithRetractAccumulator<T extends Comparable<T>>>
public void accumulate(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc, T value) throws Exception
Exception
public void retract(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc, T value) throws Exception
Exception
public void merge(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc, Iterable<MinWithRetractAggFunction.MinWithRetractAccumulator<T>> its) throws Exception
Exception
public void resetAccumulator(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc)
public T getValue(MinWithRetractAggFunction.MinWithRetractAccumulator<T> acc)
AggregateFunction
getValue
in class AggregateFunction<T extends Comparable<T>,MinWithRetractAggFunction.MinWithRetractAccumulator<T extends Comparable<T>>>
acc
- the accumulator which contains the current intermediate resultsCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.