public final class ListAggWithRetractAggFunction extends AggregateFunction<BinaryString,ListAggWithRetractAggFunction.ListAggWithRetractAccumulator>
Modifier and Type | Class and Description |
---|---|
static class |
ListAggWithRetractAggFunction.ListAggWithRetractAccumulator
The initial accumulator for listagg with retraction aggregate function.
|
Constructor and Description |
---|
ListAggWithRetractAggFunction() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc,
BinaryString value) |
ListAggWithRetractAggFunction.ListAggWithRetractAccumulator |
createAccumulator()
Creates and initializes the accumulator for this
UserDefinedAggregateFunction . |
BinaryString |
getValue(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc)
Called every time when an aggregation result should be materialized.
|
void |
merge(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc,
Iterable<ListAggWithRetractAggFunction.ListAggWithRetractAccumulator> its) |
void |
resetAccumulator(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc) |
void |
retract(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc,
BinaryString value) |
getKind, getRequirements, requiresOver
getAccumulatorType, getResultType
close, functionIdentifier, open, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isDeterministic
public ListAggWithRetractAggFunction.ListAggWithRetractAccumulator createAccumulator()
UserDefinedAggregateFunction
UserDefinedAggregateFunction
. The
accumulator is used to keep the aggregated values which are needed to compute an aggregation
result.createAccumulator
in class UserDefinedAggregateFunction<BinaryString,ListAggWithRetractAggFunction.ListAggWithRetractAccumulator>
public void accumulate(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc, BinaryString value) throws Exception
Exception
public void retract(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc, BinaryString value) throws Exception
Exception
public void merge(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc, Iterable<ListAggWithRetractAggFunction.ListAggWithRetractAccumulator> its) throws Exception
Exception
public BinaryString getValue(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc)
AggregateFunction
getValue
in class AggregateFunction<BinaryString,ListAggWithRetractAggFunction.ListAggWithRetractAccumulator>
acc
- the accumulator which contains the current
aggregated resultspublic void resetAccumulator(ListAggWithRetractAggFunction.ListAggWithRetractAccumulator acc)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.