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
FunctionDefinition
that identifies the function to be called - a list of
FieldReferenceExpression
represents the arguments for aggregate function. - a
CallExpression
represents the filter with the aggregate function. - a
DataType
represents the result data type of aggregate function. distinct
indicates whether this is a distinct aggregate function.approximate
indicates whether this is a approximate aggregate function.ignoreNulls
indicates 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> R
accept(ExpressionVisitor<R> visitor)
String
asSummaryString()
Returns a string that summarizes this expression for printing to a console.boolean
equals(Object o)
List<FieldReferenceExpression>
getArgs()
List<Expression>
getChildren()
Optional<CallExpression>
getFilterExpression()
FunctionDefinition
getFunctionDefinition()
DataType
getOutputDataType()
Returns the data type of the computation result.List<ResolvedExpression>
getResolvedChildren()
int
hashCode()
boolean
isApproximate()
boolean
isDistinct()
boolean
isIgnoreNulls()
String
toString()
-
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
-
-
-
-
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:ResolvedExpression
Returns the data type of the computation result.- Specified by:
getOutputDataType
in interfaceResolvedExpression
-
getResolvedChildren
public List<ResolvedExpression> getResolvedChildren()
- Specified by:
getResolvedChildren
in interfaceResolvedExpression
-
asSummaryString
public String asSummaryString()
Description copied from interface:Expression
Returns a string that summarizes this expression for printing to a console. An implementation might skip very specific properties.- Specified by:
asSummaryString
in interfaceExpression
- Returns:
- summary string of this expression for debugging purposes
-
getChildren
public List<Expression> getChildren()
- Specified by:
getChildren
in interfaceExpression
-
accept
public <R> R accept(ExpressionVisitor<R> visitor)
- Specified by:
accept
in interfaceExpression
-
-