Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink Common

pyflink.table.udf.AggregateFunction#

class AggregateFunction(*args, **kwds)[source]#

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

New 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
Show Source

Created using Sphinx 5.3.0.