Class GeneralAggregateFunc
Object
org.apache.spark.sql.internal.connector.ExpressionWithToString
org.apache.spark.sql.connector.expressions.aggregate.GeneralAggregateFunc
- All Implemented Interfaces:
Serializable
,AggregateFunc
,Expression
@Evolving
public final class GeneralAggregateFunc
extends org.apache.spark.sql.internal.connector.ExpressionWithToString
implements AggregateFunc
The general implementation of
AggregateFunc
, which contains the upper-cased function
name, the `isDistinct` flag and all the inputs. Note that Spark cannot push down partial
aggregate with this function to the source, but can only push down the entire aggregate.
The currently supported SQL aggregate functions:
VAR_POP(input1)
Since 3.3.0VAR_SAMP(input1)
Since 3.3.0STDDEV_POP(input1)
Since 3.3.0STDDEV_SAMP(input1)
Since 3.3.0COVAR_POP(input1, input2)
Since 3.3.0COVAR_SAMP(input1, input2)
Since 3.3.0CORR(input1, input2)
Since 3.3.0REGR_INTERCEPT(input1, input2)
Since 3.4.0REGR_R2(input1, input2)
Since 3.4.0REGR_SLOPE(input1, input2)
Since 3.4.0REGR_SXY(input1, input2)
Since 3.4.0MODE() WITHIN (ORDER BY input1 [ASC|DESC])
Since 4.0.0PERCENTILE_CONT(input1) WITHIN (ORDER BY input2 [ASC|DESC])
Since 4.0.0PERCENTILE_DISC(input1) WITHIN (ORDER BY input2 [ASC|DESC])
Since 4.0.0
- Since:
- 3.3.0
- See Also:
-
Field Summary
Fields inherited from interface org.apache.spark.sql.connector.expressions.Expression
EMPTY_EXPRESSION, EMPTY_NAMED_REFERENCE
-
Constructor Summary
ConstructorDescriptionGeneralAggregateFunc
(String name, boolean isDistinct, Expression[] children) GeneralAggregateFunc
(String name, boolean isDistinct, Expression[] children, SortValue[] orderingWithinGroups) -
Method Summary
Methods inherited from class org.apache.spark.sql.internal.connector.ExpressionWithToString
describe, references, toString
Methods inherited from interface org.apache.spark.sql.connector.expressions.Expression
describe, references
-
Constructor Details
-
GeneralAggregateFunc
-
GeneralAggregateFunc
public GeneralAggregateFunc(String name, boolean isDistinct, Expression[] children, SortValue[] orderingWithinGroups)
-
-
Method Details
-
name
-
isDistinct
public boolean isDistinct() -
children
Description copied from interface:Expression
Returns an array of the children of this node. Children should not change.- Specified by:
children
in interfaceExpression
-
orderingWithinGroups
public SortValue[] orderingWithinGroups() -
equals
-
hashCode
public int hashCode()
-