github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/function/udf.result (about)

     1  create database udf_first;
     2  create database udf_second;
     3  use udf_first;
     4  create function helloworld () returns int language sql as 'select id from test_table limit 1';
     5  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'helloworld';
     6  args    rettype    language    db
     7  {}    int    sql    udf_first
     8  use udf_first;
     9  create function helloworld () returns int language sql as 'select id from test_table limit 1';
    10  function helloworld already exists
    11  use udf_first;
    12  create function twosum (x int, y int) returns int language sql as 'select $1 + $2' ;
    13  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    14  args    rettype    language    db
    15  {"x":"int","y":"int"}    int    sql    udf_first
    16  create function twosum (x float, y float) returns float language sql as 'select $1 + $2' ;
    17  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    18  args    rettype    language    db
    19  {"x":"int","y":"int"}    int    sql    udf_first
    20  {"x":"float","y":"float"}    float    sql    udf_first
    21  create function twosum (x int) returns int language sql as 'select $1 + 10' ;
    22  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    23  args    rettype    language    db
    24  {"x":"int","y":"int"}    int    sql    udf_first
    25  {"x":"float","y":"float"}    float    sql    udf_first
    26  {"x":"int"}    int    sql    udf_first
    27  use udf_first;
    28  create function udf_second.helloworld () returns int language sql as 'select id from test_table limit 1';
    29  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'helloworld' and db = 'udf_second';
    30  args    rettype    language    db
    31  {}    int    sql    udf_second
    32  drop function helloworld ();
    33  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'helloworld' and db = 'udf_first';
    34  args    rettype    language    db
    35  drop function twosum (int, int);
    36  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    37  args    rettype    language    db
    38  {"x":"float","y":"float"}    float    sql    udf_first
    39  {"x":"int"}    int    sql    udf_first
    40  drop function twosum (int);
    41  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    42  args    rettype    language    db
    43  {"x":"float","y":"float"}    float    sql    udf_first
    44  drop function twosum (float, float);
    45  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'twosum';
    46  args    rettype    language    db
    47  use udf_first;
    48  drop function udf_second.helloworld ();
    49  select args, rettype, language, db from mo_catalog.mo_user_defined_function where name = 'helloworld' and db = 'udf_second';
    50  args    rettype    language    db
    51  use udf_second;
    52  drop function helloworld();
    53  function helloworld doesn't exist