Execution State

During the execution state, the server makes an execution call into the UDF.

The execution plan, created in the plan building state, is used in the execution state to compute the result set of the SQL query.

These methods can be called: [_enter_state], _describe_extfn, evaluate_extfn, _open_extfn, _fetch_into_extfn, _fetch_block_extfn, _close_extfn, [_leave_state], and _finish_extfn.

The execution state is represented in the a_v4_extfn_state API by this enumeration:
typedef enum a_v4_extfn_state {
    … EXTFNAPIV4_STATE_EXECUTING, …
} a_v4_extfn_state;
In the execution state:

Executing Partition State

If an input table parameter exists, and if a PARTITION BY clause exists in the SQL query, then the server invokes the UDF once per available partition.