Class GeneralAggregateFunc

Object
org.apache.spark.sql.internal.connector.ExpressionWithToString
org.apache.spark.sql.connector.expressions.aggregate.GeneralAggregateFunc
All Implemented Interfaces:
Serializable, AggregateFunc, Expression, scala.Serializable

@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:

  1. VAR_POP(input1)
    Since 3.3.0
  2. VAR_SAMP(input1)
    Since 3.3.0
  3. STDDEV_POP(input1)
    Since 3.3.0
  4. STDDEV_SAMP(input1)
    Since 3.3.0
  5. COVAR_POP(input1, input2)
    Since 3.3.0
  6. COVAR_SAMP(input1, input2)
    Since 3.3.0
  7. CORR(input1, input2)
    Since 3.3.0
  8. REGR_INTERCEPT(input1, input2)
    Since 3.4.0
  9. REGR_R2(input1, input2)
    Since 3.4.0
  10. REGR_SLOPE(input1, input2)
    Since 3.4.0
  11. REGR_SXY(input1, input2)
    Since 3.4.0
Since:
3.3.0
See Also:
  • Constructor Details

    • GeneralAggregateFunc

      public GeneralAggregateFunc(String name, boolean isDistinct, Expression[] children)
  • Method Details

    • name

      public String name()
    • isDistinct

      public boolean isDistinct()
    • children

      public Expression[] children()
      Description copied from interface: Expression
      Returns an array of the children of this node. Children should not change.
      Specified by:
      children in interface Expression
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object