Class AggregateExpression
- java.lang.Object
-
- org.apache.flink.table.expressions.AggregateExpression
-
- All Implemented Interfaces:
Expression,ResolvedExpression
@PublicEvolving public class AggregateExpression extends Object implements ResolvedExpression
Resolved and validated expression for calling an aggregate function.A aggregate call contains:
- a
FunctionDefinitionthat identifies the function to be called - a list of
FieldReferenceExpressionrepresents the arguments for aggregate function. - a
CallExpressionrepresents the filter with the aggregate function. - a
DataTyperepresents the result data type of aggregate function. distinctindicates whether this is a distinct aggregate function.approximateindicates whether this is a approximate aggregate function.ignoreNullsindicates whether this aggregate function ignore null value.
-
-
Constructor Summary
Constructors Constructor Description AggregateExpression(FunctionDefinition functionDefinition, List<FieldReferenceExpression> args, CallExpression filterExpression, DataType resultType, boolean distinct, boolean approximate, boolean ignoreNulls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(ExpressionVisitor<R> visitor)StringasSummaryString()Returns a string that summarizes this expression for printing to a console.booleanequals(Object o)List<FieldReferenceExpression>getArgs()List<Expression>getChildren()Optional<CallExpression>getFilterExpression()FunctionDefinitiongetFunctionDefinition()DataTypegetOutputDataType()Returns the data type of the computation result.List<ResolvedExpression>getResolvedChildren()inthashCode()booleanisApproximate()booleanisDistinct()booleanisIgnoreNulls()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.expressions.ResolvedExpression
asSerializableString, asSerializableString
-
-
-
-
Constructor Detail
-
AggregateExpression
public AggregateExpression(FunctionDefinition functionDefinition, List<FieldReferenceExpression> args, @Nullable CallExpression filterExpression, DataType resultType, boolean distinct, boolean approximate, boolean ignoreNulls)
-
-
Method Detail
-
getFunctionDefinition
public FunctionDefinition getFunctionDefinition()
-
isDistinct
public boolean isDistinct()
-
isApproximate
public boolean isApproximate()
-
isIgnoreNulls
public boolean isIgnoreNulls()
-
getArgs
public List<FieldReferenceExpression> getArgs()
-
getFilterExpression
public Optional<CallExpression> getFilterExpression()
-
getOutputDataType
public DataType getOutputDataType()
Description copied from interface:ResolvedExpressionReturns the data type of the computation result.- Specified by:
getOutputDataTypein interfaceResolvedExpression
-
getResolvedChildren
public List<ResolvedExpression> getResolvedChildren()
- Specified by:
getResolvedChildrenin interfaceResolvedExpression
-
asSummaryString
public String asSummaryString()
Description copied from interface:ExpressionReturns a string that summarizes this expression for printing to a console. An implementation might skip very specific properties.- Specified by:
asSummaryStringin interfaceExpression- Returns:
- summary string of this expression for debugging purposes
-
getChildren
public List<Expression> getChildren()
- Specified by:
getChildrenin interfaceExpression
-
accept
public <R> R accept(ExpressionVisitor<R> visitor)
- Specified by:
acceptin interfaceExpression
-
-