Updated on 2025-08-25 GMT+08:00

Overview

Registering a Scalar UDF involves including the specified UDF in the backend database and returning a UDF operator that can be manipulated within the Ibis DataFrame after registration.

The value returned by registering a Scalar UDF is a UDF operator in the DataFrame. This UDF operator can subsequently be invoked multiple times by various DataFrame expressions.

Overall, registering a Scalar UDF can be done in two ways: explicit registration and implicit registration.

Table 1 Methods for registering a Scalar UDF

Registration Method

Description

Dependent on Session Object

Intrusively Add Registration Logic

Use Case

Helpful Link

Explicit registration

Code explicitly specifies the registration information of the Scalar UDF.

Yes

Yes

If you wish to precisely control the registration timing, allow intrusive addition of registration logic, or require separation between registration and usage of Scalar UDFs under the same backend connection.

Scalar UDF Explicit Registration Syntax

Implicit registration

Automatically discovers and registers Scalar UDFs during runtime.

No

No

If you prefer non-intrusive registration of Scalar UDFs and do not require separation between registration and usage of Scalar UDFs under the same backend connection.

Scalar UDF Implicit Registration Syntax

Whether using explicit or implicit registration, the meaning of registration differs depending on the Scalar UDF type. Details are provided in the table below.

Table 2 Meanings of registering a Scalar UDF

Scalar UDF Type

Meaning

Helpful Link

python

Registers a raw Python function into the database.

Scalar Python UDF Registration Parameters

builtin

Obtains the handle of an existing function in the database; no actual registration operation is performed.

Scalar Builtin UDF Registration Parameters