CREATE FUNCTION

    Parameters

    This statement creates a custom function. Executing this command requires that the user have ADMIN privileges.

    If the function_name contains the database name, the custom function will be created in the corresponding database, otherwise the function will be created in the database where the current session is located. The name and parameters of the new function cannot be the same as functions already existing in the current namespace, otherwise the creation will fail. But only with the same name and different parameters can the creation be successful.

    1. Create a custom aggregation function

    2. Create a scalar function with variable length parameters

      1. CREATE FUNCTION strconcat(varchar, ...) RETURNS varchar properties (
      2. "symbol" = "_ZN9doris_udf6StrConcatUdfEPNS_15FunctionContextERKNS_6IntValES4_",
      3. );

    CREATE,FUNCTION