public abstract class LastValueWithRetractAggFunction<T> extends AggregateFunction<T,GenericRow>
Modifier and Type | Class and Description |
---|---|
static class |
LastValueWithRetractAggFunction.BooleanLastValueWithRetractAggFunction
Built-in Boolean LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.ByteLastValueWithRetractAggFunction
Built-in Byte LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.DecimalLastValueWithRetractAggFunction
Built-in Decimal LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.DoubleLastValueWithRetractAggFunction
Built-in Double LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.FloatLastValueWithRetractAggFunction
Built-in Float LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.IntLastValueWithRetractAggFunction
Built-in Int LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.LongLastValueWithRetractAggFunction
Built-in Long LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.ShortLastValueWithRetractAggFunction
Built-in Short LastValue with retract aggregate function.
|
static class |
LastValueWithRetractAggFunction.StringLastValueWithRetractAggFunction
Built-in String LastValue with retract aggregate function.
|
Constructor and Description |
---|
LastValueWithRetractAggFunction() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(GenericRow acc,
Object value) |
void |
accumulate(GenericRow acc,
Object value,
Long order) |
GenericRow |
createAccumulator()
Creates and initializes the accumulator for this
UserDefinedAggregateFunction . |
protected abstract TypeSerializer<T> |
createValueSerializer() |
TypeInformation<GenericRow> |
getAccumulatorType()
Returns the
TypeInformation of the UserDefinedAggregateFunction 's accumulator. |
T |
getValue(GenericRow acc)
Called every time when an aggregation result should be materialized.
|
void |
resetAccumulator(GenericRow acc) |
void |
retract(GenericRow acc,
Object value) |
void |
retract(GenericRow acc,
Object value,
Long order) |
getKind, getRequirements, requiresOver
getResultType
close, functionIdentifier, open, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isDeterministic
public GenericRow createAccumulator()
UserDefinedAggregateFunction
UserDefinedAggregateFunction
. The
accumulator is used to keep the aggregated values which are needed to compute an aggregation
result.createAccumulator
in class UserDefinedAggregateFunction<T,GenericRow>
public void accumulate(GenericRow acc, Object value) throws Exception
Exception
public void accumulate(GenericRow acc, Object value, Long order) throws Exception
Exception
public void retract(GenericRow acc, Object value) throws Exception
Exception
public void retract(GenericRow acc, Object value, Long order) throws Exception
Exception
public void resetAccumulator(GenericRow acc)
public T getValue(GenericRow acc)
AggregateFunction
getValue
in class AggregateFunction<T,GenericRow>
acc
- the accumulator which contains the current
aggregated resultsprotected abstract TypeSerializer<T> createValueSerializer()
public TypeInformation<GenericRow> getAccumulatorType()
UserDefinedAggregateFunction
TypeInformation
of the UserDefinedAggregateFunction
's accumulator.getAccumulatorType
in class UserDefinedAggregateFunction<T,GenericRow>
TypeInformation
of the UserDefinedAggregateFunction
's accumulator
or null
if the accumulator type should be automatically inferred.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.