public abstract class FirstValueWithRetractAggFunction<T> extends AggregateFunction<T,GenericRow>
Modifier and Type | Class and Description |
---|---|
static class |
FirstValueWithRetractAggFunction.BooleanFirstValueWithRetractAggFunction
Built-in Boolean FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.ByteFirstValueWithRetractAggFunction
Built-in Byte FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.DecimalFirstValueWithRetractAggFunction
Built-in Decimal FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.DoubleFirstValueWithRetractAggFunction
Built-in Double FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.FloatFirstValueWithRetractAggFunction
Built-in Float FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.IntFirstValueWithRetractAggFunction
Built-in Int FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.LongFirstValueWithRetractAggFunction
Built-in Long FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.ShortFirstValueWithRetractAggFunction
Built-in Short FirstValue with retract aggregate function.
|
static class |
FirstValueWithRetractAggFunction.StringFirstValueWithRetractAggFunction
Built-in String FirstValue with retract aggregate function.
|
Constructor and Description |
---|
FirstValueWithRetractAggFunction() |
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.