Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink Table
  • User Defined Functions
  • pyflink.table.udf.AggregateFunction

pyflink.table.udf.AggregateFunction#

class AggregateFunction[source]#

Base interface for user-defined aggregate function. A user-defined aggregate function maps scalar values of multiple rows to a new scalar value.

Added in version 1.12.0.

Methods

accumulate(accumulator, *args)

Processes the input values and updates the provided accumulator instance.

close()

Tear-down method for the user code.

create_accumulator()

Creates and initializes the accumulator for this AggregateFunction.

get_accumulator_type()

Returns the DataType of the AggregateFunction's accumulator.

get_result_type()

Returns the DataType of the AggregateFunction's result.

get_value(accumulator)

Called every time when an aggregation result should be materialized.

is_deterministic()

Returns information about the determinism of the function's results.

merge(accumulator, accumulators)

Merges a group of accumulator instances into one accumulator instance.

open(function_context)

Initialization method for the function.

retract(accumulator, *args)

Retracts the input values from the accumulator instance.The current design assumes the inputs are the values that have been previously accumulated.

previous

pyflink.table.udf.udtf

next

pyflink.table.udf.udaf

On this page
  • AggregateFunction

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.