You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2022/09/06 09:19:37 UTC

[flink] branch release-1.16 updated: [FLINK-29022][docs][table] Add document for CREATE FUNCTION USING JAR feature (#20628)

This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch release-1.16
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.16 by this push:
     new 905a9654558 [FLINK-29022][docs][table] Add document for CREATE FUNCTION USING JAR feature (#20628)
905a9654558 is described below

commit 905a9654558a97705eed40db268fffc5af1b2e61
Author: Ron <ld...@163.com>
AuthorDate: Tue Sep 6 17:18:51 2022 +0800

    [FLINK-29022][docs][table] Add document for CREATE FUNCTION USING JAR feature (#20628)
---
 docs/content.zh/docs/dev/table/sql/create.md | 6 ++++++
 docs/content/docs/dev/table/sql/create.md    | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/docs/content.zh/docs/dev/table/sql/create.md b/docs/content.zh/docs/dev/table/sql/create.md
index 58cee4d37d6..971bd29a39e 100644
--- a/docs/content.zh/docs/dev/table/sql/create.md
+++ b/docs/content.zh/docs/dev/table/sql/create.md
@@ -578,6 +578,7 @@ CREATE [TEMPORARY] VIEW [IF NOT EXISTS] [catalog_name.][db_name.]view_name
 CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION
   [IF NOT EXISTS] [[catalog_name.]db_name.]function_name
   AS identifier [LANGUAGE JAVA|SCALA|PYTHON]
+  [USING JAR '<path_to_filename>.jar' [, JAR '<path_to_filename>.jar']* ]
 ```
 
 创建一个有 catalog 和数据库命名空间的 catalog function ,需要指定一个 identifier ,可指定 language tag 。 若 catalog 中,已经有同名的函数注册了,则无法注册。
@@ -604,3 +605,8 @@ CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION
 
 Language tag 用于指定 Flink runtime 如何执行这个函数。目前,只支持 JAVA, SCALA 和 PYTHON,且函数的默认语言为 JAVA。
 
+**USING**
+
+指定包含该函数的实现及其依赖的 jar 资源列表。该 jar 应该位于 Flink 当前支持的本地或远程[文件系统]({{< ref "docs/deployment/filesystems/overview" >}})中,比如 hdfs/s3/oss。
+
+<span class="label label-danger">注意</span> 目前只有 JAVA、SCALA 语言支持 USING 子句。
diff --git a/docs/content/docs/dev/table/sql/create.md b/docs/content/docs/dev/table/sql/create.md
index c6ba35ae4ec..f96847cc029 100644
--- a/docs/content/docs/dev/table/sql/create.md
+++ b/docs/content/docs/dev/table/sql/create.md
@@ -577,7 +577,8 @@ If the view already exists, nothing happens.
 ```sql
 CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION 
   [IF NOT EXISTS] [catalog_name.][db_name.]function_name 
-  AS identifier [LANGUAGE JAVA|SCALA|PYTHON]
+  AS identifier [LANGUAGE JAVA|SCALA|PYTHON] 
+  [USING JAR '<path_to_filename>.jar' [, JAR '<path_to_filename>.jar']* ]
 ```
 
 Create a catalog function that has catalog and database namespaces with the identifier and optional language tag. If a function with the same name already exists in the catalog, an exception is thrown.
@@ -603,3 +604,9 @@ If the function already exists, nothing happens.
 **LANGUAGE JAVA\|SCALA\|PYTHON**
 
 Language tag to instruct Flink runtime how to execute the function. Currently only JAVA, SCALA and PYTHON are supported, the default language for a function is JAVA. 
+
+**USING**
+
+Specifies the list of jar resources that contain the implementation of the function along with its dependencies. The jar should be located in a local or remote [file system]({{< ref "docs/deployment/filesystems/overview" >}}) such as hdfs/s3/oss which Flink current supports. 
+
+<span class="label label-danger">Attention</span> Currently only JAVA, SCALA language support USING clause.