Class SingleValueAggFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.DeclarativeAggregateFunction
-
- org.apache.flink.table.planner.functions.aggfunctions.SingleValueAggFunction
-
- All Implemented Interfaces:
Serializable
,FunctionDefinition
- Direct Known Subclasses:
SingleValueAggFunction.BooleanSingleValueAggFunction
,SingleValueAggFunction.ByteSingleValueAggFunction
,SingleValueAggFunction.CharSingleValueAggFunction
,SingleValueAggFunction.DateSingleValueAggFunction
,SingleValueAggFunction.DecimalSingleValueAggFunction
,SingleValueAggFunction.DoubleSingleValueAggFunction
,SingleValueAggFunction.FloatSingleValueAggFunction
,SingleValueAggFunction.IntSingleValueAggFunction
,SingleValueAggFunction.LongSingleValueAggFunction
,SingleValueAggFunction.ShortSingleValueAggFunction
,SingleValueAggFunction.StringSingleValueAggFunction
,SingleValueAggFunction.TimeSingleValueAggFunction
,SingleValueAggFunction.TimestampLtzSingleValueAggFunction
,SingleValueAggFunction.TimestampSingleValueAggFunction
public abstract class SingleValueAggFunction extends DeclarativeAggregateFunction
Base class for built-in single value aggregate function.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SingleValueAggFunction.BooleanSingleValueAggFunction
Built-in boolean single value aggregate function.static class
SingleValueAggFunction.ByteSingleValueAggFunction
Built-in byte single value aggregate function.static class
SingleValueAggFunction.CharSingleValueAggFunction
Built-in char single value aggregate function.static class
SingleValueAggFunction.DateSingleValueAggFunction
Built-in date single value aggregate function.static class
SingleValueAggFunction.DecimalSingleValueAggFunction
Built-in decimal single value aggregate function.static class
SingleValueAggFunction.DoubleSingleValueAggFunction
Built-in double single value aggregate function.static class
SingleValueAggFunction.FloatSingleValueAggFunction
Built-in float single value aggregate function.static class
SingleValueAggFunction.IntSingleValueAggFunction
Built-in int single value aggregate function.static class
SingleValueAggFunction.LongSingleValueAggFunction
Built-in long single value aggregate function.static class
SingleValueAggFunction.ShortSingleValueAggFunction
Built-in short single value aggregate function.static class
SingleValueAggFunction.StringSingleValueAggFunction
Built-in string single value aggregate function.static class
SingleValueAggFunction.TimeSingleValueAggFunction
Built-in time single value aggregate function.static class
SingleValueAggFunction.TimestampLtzSingleValueAggFunction
Built-in timestampLtz single value aggregate function.static class
SingleValueAggFunction.TimestampSingleValueAggFunction
Built-in timestamp single value aggregate function.
-
Constructor Summary
Constructors Constructor Description SingleValueAggFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression[]
accumulateExpressions()
Expressions for accumulating the mutable aggregation buffer based on an input row.UnresolvedReferenceExpression[]
aggBufferAttributes()
All fields of the aggregate buffer.DataType[]
getAggBufferTypes()
All types of the aggregate buffer.Expression
getValueExpression()
An expression which returns the final value for this aggregate function.Expression[]
initialValuesExpressions()
Expressions for initializing empty aggregation buffers.Expression[]
mergeExpressions()
A sequence of expressions for merging two aggregation buffers together.int
operandCount()
How many operands your function will deal with.Expression[]
retractExpressions()
Expressions for retracting the mutable aggregation buffer based on an input row.-
Methods inherited from class org.apache.flink.table.functions.DeclarativeAggregateFunction
getKind, getResultType, getTypeInference, mergeOperand, mergeOperands, operand, operands
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition
getRequirements, isDeterministic, supportsConstantFolding
-
-
-
-
Method Detail
-
operandCount
public int operandCount()
Description copied from class:DeclarativeAggregateFunction
How many operands your function will deal with.- Specified by:
operandCount
in classDeclarativeAggregateFunction
-
aggBufferAttributes
public UnresolvedReferenceExpression[] aggBufferAttributes()
Description copied from class:DeclarativeAggregateFunction
All fields of the aggregate buffer.- Specified by:
aggBufferAttributes
in classDeclarativeAggregateFunction
-
getAggBufferTypes
public DataType[] getAggBufferTypes()
Description copied from class:DeclarativeAggregateFunction
All types of the aggregate buffer.- Specified by:
getAggBufferTypes
in classDeclarativeAggregateFunction
-
initialValuesExpressions
public Expression[] initialValuesExpressions()
Description copied from class:DeclarativeAggregateFunction
Expressions for initializing empty aggregation buffers.- Specified by:
initialValuesExpressions
in classDeclarativeAggregateFunction
-
accumulateExpressions
public Expression[] accumulateExpressions()
Description copied from class:DeclarativeAggregateFunction
Expressions for accumulating the mutable aggregation buffer based on an input row.- Specified by:
accumulateExpressions
in classDeclarativeAggregateFunction
-
retractExpressions
public Expression[] retractExpressions()
Description copied from class:DeclarativeAggregateFunction
Expressions for retracting the mutable aggregation buffer based on an input row.- Specified by:
retractExpressions
in classDeclarativeAggregateFunction
-
mergeExpressions
public Expression[] mergeExpressions()
Description copied from class:DeclarativeAggregateFunction
A sequence of expressions for merging two aggregation buffers together. When defining these expressions, you can use the syntaxattributeName
andmergeOperand(attributeName)
to refer to the attributes corresponding to each of the buffers being merged.- Specified by:
mergeExpressions
in classDeclarativeAggregateFunction
-
getValueExpression
public Expression getValueExpression()
Description copied from class:DeclarativeAggregateFunction
An expression which returns the final value for this aggregate function.- Specified by:
getValueExpression
in classDeclarativeAggregateFunction
-
-