Package com.snowflake.snowpark_java

## Class AggregateFunction

- java.lang.Object
- - com.snowflake.snowpark_java.AggregateFunction

-     public class AggregateFunction
      extends java.lang.Object

  Encapsulates a user-defined aggregate function (UDAF) that is returned by `UDAFRegistration.registerTemporary` or `UDAFRegistration.registerPermanent`.

  Use `AggregateFunction.apply` to generate `Column` expressions from an instance.

       AggregateFunction myAvg = session.udaf().registerTemporary("my_avg", new MyAvgUDAF());
       df.select(myAvg.apply(df.col("a")));

  Since:
    1.19.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Column` | `apply​(Column... exprs)` | Apply the UDAF to one or more columns to generate a Column expression.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### apply

          public Column apply​(Column... exprs)

      Apply the UDAF to one or more columns to generate a Column expression.
      Parameters:
        `exprs` - The list of column expressions to pass to the UDAF.
      Returns:
        The result column.
      Since:
        1.19.0