public class LastValueAggFunction<T> extends AggregateFunction<T,GenericRow>
Modifier and Type | Class and Description |
---|---|
static class |
LastValueAggFunction.BooleanLastValueAggFunction
Built-in Boolean LastValue aggregate function.
|
static class |
LastValueAggFunction.ByteLastValueAggFunction
Built-in Byte LastValue aggregate function.
|
static class |
LastValueAggFunction.DecimalLastValueAggFunction
Built-in Decimal LastValue aggregate function.
|
static class |
LastValueAggFunction.DoubleLastValueAggFunction
Built-in Double LastValue aggregate function.
|
static class |
LastValueAggFunction.FloatLastValueAggFunction
Built-in Float LastValue aggregate function.
|
static class |
LastValueAggFunction.IntLastValueAggFunction
Built-in Int LastValue aggregate function.
|
static class |
LastValueAggFunction.LongLastValueAggFunction
Built-in Long LastValue aggregate function.
|
static class |
LastValueAggFunction.ShortLastValueAggFunction
Built-in Short LastValue aggregate function.
|
static class |
LastValueAggFunction.StringLastValueAggFunction
Built-in String LastValue aggregate function.
|
Constructor and Description |
---|
LastValueAggFunction() |
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 . |
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.
|
boolean |
isDeterministic()
Returns information about the determinism of the function's results.
|
void |
resetAccumulator(GenericRow acc) |
getKind, getRequirements, requiresOver
getResultType
close, functionIdentifier, open, toString
public boolean isDeterministic()
FunctionDefinition
It returns true
if and only if a call to this function is guaranteed to
always return the same result given the same parameters. true
is
assumed by default. If the function is not pure functional like random(), date(), now(), ...
this method must return false
.
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)
public void accumulate(GenericRow acc, Object value, Long order)
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 resultspublic 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.