morrySnow commented on code in PR #1871: URL: https://github.com/apache/doris-website/pull/1871#discussion_r1923135645
########## docs/sql-manual/sql-statements/function/DROP-FUNCTION.md: ########## @@ -24,40 +24,61 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -Delete a custom function. Function names and parameter types are exactly the same to be deleted. +Delete a custom function. -grammar: +## Syntax ```sql -DROP [GLOBAL] FUNCTION function_name - (arg_type [, ...]) +DROP [ GLOBAL ] <function_name> ( <arg_type>) ``` -Parameter Description: +## Required Parameters + +**1. `<function_name>`** + +> Specifies the name of the function to delete. +> +> The function name needs to be exactly the same as the function name when the function was created. + +**2. `<arg_type>`** + +> Specifies the argument list for the function to be deleted. +> +> Parameter List Location You need to enter the data type of the location parameter. + +## Optional Parameters + +**1.`<GLOBAL>`** Review Comment: ```suggestion **1.`GLOBAL`** ``` ########## docs/sql-manual/sql-statements/function/SHOW-CREATE-FUNCTION.md: ########## @@ -24,43 +24,56 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to display the creation statement of the user-defined function +This statement is used to show the creation statement of a user-defined function -grammar: +## Syntax ```sql -SHOW CREATE [GLOBAL] FUNCTION function_name(arg_type [, ...]) [FROM db_name]]; +SHOW CREATE [ GLOBAL ] FUNCTION <function_name>( <arg_type>) [ FROM db_name ]; Review Comment: ```suggestion SHOW CREATE [ GLOBAL ] FUNCTION <function_name>( <arg_type>) [ FROM <db_name> ]; ``` ########## docs/sql-manual/sql-statements/function/SHOW-CREATE-FUNCTION.md: ########## @@ -24,43 +24,56 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to display the creation statement of the user-defined function +This statement is used to show the creation statement of a user-defined function -grammar: +## Syntax ```sql -SHOW CREATE [GLOBAL] FUNCTION function_name(arg_type [, ...]) [FROM db_name]]; +SHOW CREATE [ GLOBAL ] FUNCTION <function_name>( <arg_type>) [ FROM db_name ]; ``` -illustrate: -1. `global`: The show function is global -2. `function_name`: The name of the function to display -3. `arg_type`: The parameter list of the function to display -4. If db_name is not specified, the current default db is used +## Required Parameters + +**1. `<function_name>`** + +> The name of the custom function that you want to query for the creation statement. -**Note: the "global" keyword is only available after v2.0** +**2. `<arg_type>`** -## Example +> The parameter list of the custom function that needs to be queried for the creation statement. +> +> Parameter list location you need to enter the data type of the location parameter -1. Show the creation statement of the specified function under the default db +## Optional Parameters - ```sql - SHOW CREATE FUNCTION my_add(INT, INT) - ``` -2. Show the creation statement of the specified global function +**1.`<GLOBAL>`** - ```sql - SHOW CREATE GLOBAL FUNCTION my_add(INT, INT) - ``` +> GLOBAL is an optional parameter. +> +> If GLOBAL is set, the function is searched for globally and deleted. +> +> If GLOABL is not entered, the function is searched for in the current database and deleted. -## Keywords +**2.`<FROM db_name>`** Review Comment: ```suggestion **2.`<db_name>`** ``` ########## docs/sql-manual/sql-statements/function/SHOW-FUNCTIONS.md: ########## @@ -24,67 +24,91 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -View all custom (system-provided) functions under the database. If the user specifies a database, then view the corresponding database, otherwise directly query the database where the current session is located +View all custom and system provided functions under the database. -Requires `SHOW` permission on this database +## Syntax -grammar +```sql +SHOW [ FULL ] [ BUILTIN ] FUNCTIONS [ { IN | FROM } db ] [LIKE '<function_pattern>'] +``` +## Varaint Syntax ```sql -SHOW [FULL] [BUILTIN] FUNCTIONS [IN|FROM db] [LIKE 'function_pattern'] +SHOW GLOBAL [ FULL ] FUNCTIONS [LIKE '<function_pattern>'] Review Comment: ```suggestion SHOW GLOBAL [ FULL ] FUNCTIONS [ LIKE '<function_pattern>' ] ``` ########## docs/sql-manual/sql-statements/function/SHOW-FUNCTIONS.md: ########## @@ -24,67 +24,91 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -View all custom (system-provided) functions under the database. If the user specifies a database, then view the corresponding database, otherwise directly query the database where the current session is located +View all custom and system provided functions under the database. -Requires `SHOW` permission on this database +## Syntax -grammar +```sql +SHOW [ FULL ] [ BUILTIN ] FUNCTIONS [ { IN | FROM } db ] [LIKE '<function_pattern>'] +``` +## Varaint Syntax ```sql -SHOW [FULL] [BUILTIN] FUNCTIONS [IN|FROM db] [LIKE 'function_pattern'] +SHOW GLOBAL [ FULL ] FUNCTIONS [LIKE '<function_pattern>'] ``` -Parameters +## Required Parameters ->`full`: Indicates the detailed information of the display function ->`builtin`: Indicates the functions provided by the display system ->`db`: database name to query ->`function_pattern`: parameter used to filter function names +**1. `<function_pattern>`** -grammar +> Matching pattern rules used to filter function names -```sql -SHOW GLOBAL [FULL] FUNCTIONS [LIKE 'function_pattern'] -``` +## Optional Parameters + +**1. `<FULL>`** + +> FULL is an optional parameter. +> +> This parameter indicates the detailed information about the function. + +**2. `<BUILTIN>`** Review Comment: ```suggestion **2. `BUILTIN`** ``` ########## docs/sql-manual/sql-statements/function/SHOW-FUNCTIONS.md: ########## @@ -24,67 +24,91 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -View all custom (system-provided) functions under the database. If the user specifies a database, then view the corresponding database, otherwise directly query the database where the current session is located +View all custom and system provided functions under the database. -Requires `SHOW` permission on this database +## Syntax -grammar +```sql +SHOW [ FULL ] [ BUILTIN ] FUNCTIONS [ { IN | FROM } db ] [LIKE '<function_pattern>'] +``` +## Varaint Syntax ```sql -SHOW [FULL] [BUILTIN] FUNCTIONS [IN|FROM db] [LIKE 'function_pattern'] +SHOW GLOBAL [ FULL ] FUNCTIONS [LIKE '<function_pattern>'] ``` -Parameters +## Required Parameters ->`full`: Indicates the detailed information of the display function ->`builtin`: Indicates the functions provided by the display system ->`db`: database name to query ->`function_pattern`: parameter used to filter function names +**1. `<function_pattern>`** -grammar +> Matching pattern rules used to filter function names -```sql -SHOW GLOBAL [FULL] FUNCTIONS [LIKE 'function_pattern'] -``` +## Optional Parameters + +**1. `<FULL>`** Review Comment: ```suggestion **1. `FULL`** ``` ########## docs/sql-manual/sql-statements/function/SHOW-CREATE-FUNCTION.md: ########## @@ -24,43 +24,56 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to display the creation statement of the user-defined function +This statement is used to show the creation statement of a user-defined function -grammar: +## Syntax ```sql -SHOW CREATE [GLOBAL] FUNCTION function_name(arg_type [, ...]) [FROM db_name]]; +SHOW CREATE [ GLOBAL ] FUNCTION <function_name>( <arg_type>) [ FROM db_name ]; ``` -illustrate: -1. `global`: The show function is global -2. `function_name`: The name of the function to display -3. `arg_type`: The parameter list of the function to display -4. If db_name is not specified, the current default db is used +## Required Parameters + +**1. `<function_name>`** + +> The name of the custom function that you want to query for the creation statement. -**Note: the "global" keyword is only available after v2.0** +**2. `<arg_type>`** -## Example +> The parameter list of the custom function that needs to be queried for the creation statement. +> +> Parameter list location you need to enter the data type of the location parameter -1. Show the creation statement of the specified function under the default db +## Optional Parameters - ```sql - SHOW CREATE FUNCTION my_add(INT, INT) - ``` -2. Show the creation statement of the specified global function +**1.`<GLOBAL>`** Review Comment: ```suggestion **1.`GLOBAL`** ``` ########## docs/sql-manual/sql-statements/function/SHOW-FUNCTIONS.md: ########## @@ -24,67 +24,91 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -View all custom (system-provided) functions under the database. If the user specifies a database, then view the corresponding database, otherwise directly query the database where the current session is located +View all custom and system provided functions under the database. -Requires `SHOW` permission on this database +## Syntax -grammar +```sql +SHOW [ FULL ] [ BUILTIN ] FUNCTIONS [ { IN | FROM } db ] [LIKE '<function_pattern>'] Review Comment: ```suggestion SHOW [ FULL ] [ BUILTIN ] FUNCTIONS [ { IN | FROM } <db> ] [LIKE '<function_pattern>'] ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org