morningman commented on a change in pull request #1140: Add SHOW FUNCTION and 
update docs for UDF
URL: https://github.com/apache/incubator-doris/pull/1140#discussion_r283090476
 
 

 ##########
 File path: 
docs/documentation/cn/sql-reference/sql-statements/create-function.md
 ##########
 @@ -0,0 +1,70 @@
+# CREATE FUNCTION
+
+## Syntax
+
+```
+CREATE [AGGREGATE] FUNCTION function_name
+    (arg_type [, ...])
+    RETURNS ret_type
+    [INTERMEDIATE inter_type]
+    [PROPERTIES ("key" = "value" [, ...]) ]
+```
+
+## Description
+
+此语句创建一个自定义函数。执行此命令需要用户拥有 `ADMIN` 权限。
+
+如果 `function_name` 
中包含了数据库名字,那么这个自定义函数会创建在对应的数据库中,否则这个函数将会创建在当前会话所在的数据库。新函数的名字与参数不能够与当前命名空间中已存在的函数相同,否则会创建失败。但是只有名字相同,参数不同是能够创建成果的。
+
+## Parameters
+
+> `AGGREGATE`: 如果有此项,表示的是创建的函数是一个聚合函数,否则创建的是一个标量函数
+>
+> `function_name`: 要创建函数的名字, 可以包含数据库的名字。比如:`db1.my_func`
+>
+> `arg_type`: 函数的参数类型,与建表时定义的类型一致。变长参数时可以使用`, 
...`来表示,如果是变长类型,那么变长部分参数的类型与最后一个费变长参数类型一致
 
 Review comment:
   最后一个费变长 -> 最后一个非变长

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to