📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ALTER FUNCTION



Alters an external function.

Syntax

ALTER FUNCTION [ IF NOT EXISTS ] <function_name> AS ( <input_param_types> ) RETURNS <return_type> LANGUAGE <language_name> HANDLER = '<handler_name>' ADDRESS = '<udf_server_address>' [DESC='<description>']
ParameterDescription
<function_name>The name of the function.
<lambda_expression>The lambda expression or code snippet defining the function's behavior.
DESC='<description>'Description of the UDF.
<<input_param_names>A list of input parameter names. Separated by comma.
<<input_param_types>A list of input parameter types. Separated by comma.
<return_type>The return type of the function.
LANGUAGESpecifies the language used to write the function. Available values: python.
HANDLER = '<handler_name>'Specifies the name of the function's handler.
ADDRESS = '<udf_server_address>'Specifies the address of the UDF server.

Examples

-- Create an external function CREATE FUNCTION gcd (INT, INT) RETURNS INT LANGUAGE python HANDLER = 'gcd' ADDRESS = 'http://0.0.0.0:8815'; -- Modify the handler of the external function ALTER FUNCTION gcd (INT, INT) RETURNS INT LANGUAGE python HANDLER = 'gcd_new' ADDRESS = 'http://0.0.0.0:8815';

Was this page helpful?