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

luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 16669d2c7fc [doc](udf) fix some unreached link and remove remote-udf 
(#837)
16669d2c7fc is described below

commit 16669d2c7fc6e8485642f72e9665810bdeff90c0
Author: zhangstar333 <87313068+zhangstar...@users.noreply.github.com>
AuthorDate: Wed Jul 10 14:26:14 2024 +0800

    [doc](udf) fix some unreached link and remove remote-udf (#837)
---
 docs/query/udf/java-user-defined-function.md       |   4 +-
 docs/query/udf/remote-user-defined-function.md     | 182 ---------------------
 .../query/udf/java-user-defined-function.md        |   8 +-
 .../query/udf/remote-user-defined-function.md      | 181 --------------------
 sidebars.json                                      |   3 +-
 5 files changed, 9 insertions(+), 369 deletions(-)

diff --git a/docs/query/udf/java-user-defined-function.md 
b/docs/query/udf/java-user-defined-function.md
index acf6fa7b009..b408e4ec340 100644
--- a/docs/query/udf/java-user-defined-function.md
+++ b/docs/query/udf/java-user-defined-function.md
@@ -37,6 +37,8 @@ Doris supports writing UDFs, UDAFs, and UDTFs using JAVA. 
Unless otherwise speci
 ## Creating UDF
 
 The implemented jar package can be placed locally or stored on a remote server 
for download via HTTP, but each FE and BE node must be able to access the jar 
package.
+"file"=" file:///path/to/java-udf-demo-jar-with-dependencies.jar "
+"file"=" http://IP:port/udf-code.jar "
 
 Otherwise, an error message `Couldn't open file ......` will be returned.
 
@@ -89,7 +91,7 @@ When the session is linked within the database, directly 
using the UDF name will
 
 ## Dropping UDF
 
-If a UDF is no longer needed, it can be dropped using the following command, 
as detailed in [DROP 
FUNCTION](../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-FUNCTION.md).
+If a UDF is no longer needed, it can be dropped using the following command, 
as detailed in [DROP 
FUNCTION](../../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-FUNCTION.md).
 
 ## Type Correspondence
 
diff --git a/docs/query/udf/remote-user-defined-function.md 
b/docs/query/udf/remote-user-defined-function.md
deleted file mode 100644
index d9ccd311c94..00000000000
--- a/docs/query/udf/remote-user-defined-function.md
+++ /dev/null
@@ -1,182 +0,0 @@
----
-{
-    "title": "Remote User Defined Function Service",
-    "language": "en"
-}
----
-
-<!-- 
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-
-## Remote UDF
-
-Remote UDF Service supports accessing user-provided UDF Services via RPC to 
execute user-defined functions. Compared to native UDF implementation, Remote 
UDF Service has the following advantages and limitations:
-
-**1. Advantages**
-
-* Cross-language: UDF Services can be written in various languages supported 
by Protobuf.
-
-* Security: UDF failures or crashes only affect the UDF Service itself and do 
not cause Doris process crashes.
-
-* Flexibility: UDF Services can invoke any other services or library classes 
to meet diverse business requirements.
-
-**2. Usage Limitations**
-
-* Performance: Compared to native UDFs, UDF Service introduces additional 
network overhead, resulting in lower performance. Additionally, the UDF Service 
implementation itself can impact function execution efficiency, and users need 
to handle issues like high concurrency and thread safety.
-
-* Single-row mode and batch processing mode: In Doris' original row-based 
query execution framework, UDF RPC calls are made for each row of data, 
resulting in poor performance. However, in the new vectorized execution 
framework, UDF RPC calls are made for each batch of data (default: 2048 rows), 
leading to significant performance improvements. In actual testing, the 
performance of Remote UDF based on vectorization and batch processing is 
comparable to that of native UDF based on row storage.
-
-## Writing UDF Functions
-
-This section provides instructions on how to develop a Remote RPC service. A 
Java version example is provided in `samples/doris-demo/udf-demo/` for 
reference.
-
-### Copying the Proto Files
-
-Copy `gensrc/proto/function_service.proto` and `gensrc/proto/types.proto` to 
the RPC service.
-
-**function_service.proto**
-
-- PFunctionCallRequest
-
-   - function_name: Function name, corresponding to the symbol specified 
during function creation.
-
-   - args: Arguments passed to the method.
-
-   - context: Query context information.
-
-- PFunctionCallResponse
-
-   - result: Result.
-
-   - status: Status, where 0 represents normal.
-
-- PCheckFunctionRequest
-
-   - function: Function-related information.
-
-   - match_type: Matching type.
-
-- PCheckFunctionResponse
-
-   - status: Status, where 0 represents normal.
-
-### Generating Interfaces
-
-Generate code using protoc. Refer to `protoc -h` for specific parameters.
-
-### Implementing Interfaces
-
-The following three methods need to be implemented:
-
-- fnCall: Used to write the calculation logic.
-
-- checkFn: Used for UDF creation validation, checking if the function name, 
parameters, return values, etc., are valid.
-
-- handShake: Used for interface probing.
-
-
---- 
-
-## Creating UDF
-
-Currently, UDTF is not supported.
-
-```sql
-CREATE FUNCTION 
-name ([,...])
-[RETURNS] rettype
-PROPERTIES (["key"="value"][,...])     
-```
-
-Note:
-
-1. The `symbol` in the PROPERTIES represents the method name passed in the RPC 
call, and this parameter must be set.
-
-2. The `object_file` in the PROPERTIES represents the RPC service address. 
Currently, it supports a single address and cluster addresses in the 
brpc-compatible format. For cluster connection methods, refer to the [Format 
Specification](https://github.com/apache/incubator-brpc/blob/master/docs/cn/client.md#%E8%BF%9E%E6%8E%A5%E6%9C%8D%E5%8A%A1%E9%9B%86%E7%BE%A4)
 (Chinese).
-
-3. The `type` in the PROPERTIES represents the UDF invocation type, which is 
set to Native by default. Use RPC to pass when using RPC UDF.
-
-4. `name`: A function belongs to a specific database. The name is in the form 
of `dbName`.`funcName`. When `dbName` is not explicitly specified, the current 
session's database is used as `dbName`.
-
-Example:
-
-```sql
-CREATE FUNCTION rpc_add_two(INT,INT) RETURNS INT PROPERTIES (
-  "SYMBOL"="add_int_two",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-CREATE FUNCTION rpc_add_one(INT) RETURNS INT PROPERTIES (
-  "SYMBOL"="add_int_one",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-CREATE FUNCTION rpc_add_string(varchar(30)) RETURNS varchar(30) PROPERTIES (
-  "SYMBOL"="add_string",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-```
-
-## Using UDF
-
-Users must have the `SELECT` privilege on the corresponding database to use 
UDF.
-
-The usage of UDF is similar to regular functions, with the only difference 
being that the scope of built-in functions is global, while the scope of UDF is 
within the database. When the session is connected to a database, simply use 
the UDF name to search for the corresponding UDF within the current database. 
Otherwise, the user needs to explicitly specify the database name of the UDF, 
such as `dbName`.`funcName`.
-
-## Deleting UDF
-
-When you no longer need a UDF function, you can delete it using the `DROP 
FUNCTION` command.
-
-## Example
-
-The `samples/doris-demo/` directory provides examples of RPC server 
implementations in CPP, Java, and Python languages. Please refer to the 
`README.md` file in each directory for specific usage instructions.
-For example, `rpc_add_string`:
-
-```sql
-mysql >select rpc_add_string('doris');
-+-------------------------+
-| rpc_add_string('doris') |
-+-------------------------+
-| doris_rpc_test          |
-+-------------------------+
-```
-The log will display:
-
-```json
-INFO: fnCall request=function_name: "add_string"
-args {
-  type {
-    id: STRING
-  }
-  has_null: false
-  string_value: "doris"
-}
-INFO: fnCall res=result {
-  type {
-    id: STRING
-  }
-  has_null: false
-  string_value: "doris_rpc_test"
-}
-status {
-  status_code: 0
-}
-```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/java-user-defined-function.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/java-user-defined-function.md
index c04f4d5a906..12ec8bf0d1d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/java-user-defined-function.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/java-user-defined-function.md
@@ -37,10 +37,12 @@ Doris 支持使用 JAVA 编写 UDF、UDAF 和 UDTF。下文如无特殊说明,
 ## 创建 UDF
 
 实现的 jar 包可以放在本地也可以存放在远程服务端通过 HTTP 下载,但必须让每个 FE 和 BE 节点都能获取到 jar 包。
+"file"=" file:///path/to/java-udf-demo-jar-with-dependencies.jar "
+"file"=" http://IP:port/udf-code.jar "
 
 否则将会返回错误状态信息 `Couldn't open file ......`。
 
-更多语法帮助可参阅 [CREATE 
FUNCTION](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-FUNCTION.md).
+更多语法帮助可参阅 [CREATE 
FUNCTION](../../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-FUNCTION.md).
 
 ### UDF
 
@@ -89,7 +91,7 @@ UDF 的使用与普通的函数方式一致,唯一的区别在于,内置函
 
 ## 删除 UDF
 
-当你不再需要 UDF 函数时,你可以通过下述命令来删除一个 UDF 函数,可以参考 [DROP 
FUNCTION](../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-FUNCTION.md)
+当你不再需要 UDF 函数时,你可以通过下述命令来删除一个 UDF 函数,可以参考 [DROP 
FUNCTION](../../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-FUNCTION.md)
 
 ## 类型对应关系
 
@@ -354,7 +356,7 @@ public class MedianUDAF {
 
 UDTF 和 UDF 函数一样,需要用户自主实现一个 `evaluate` 方法, 但是 UDTF 函数的返回值必须是 Array 类型。
 
-另外Doris中表函数会因为 `_outer` 后缀有不同的表现,可查看[OUTER 
组合器](../sql-manual/sql-functions/table-functions/explode-numbers-outer.md)
+另外Doris中表函数会因为 `_outer` 后缀有不同的表现,可查看[OUTER 
组合器](../../sql-manual/sql-functions/table-functions/explode-numbers-outer.md)
 
 ```JAVA
 public class UDTFStringTest {
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/remote-user-defined-function.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/remote-user-defined-function.md
deleted file mode 100644
index be99a5dc946..00000000000
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/udf/remote-user-defined-function.md
+++ /dev/null
@@ -1,181 +0,0 @@
----
-{
-    "title": "Remote UDF",
-    "language": "zh-CN"
-}
----
-
-<!-- 
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## Remote UDF
-
-Remote UDF Service 支持通过 RPC 的方式访问用户提供的 UDF Service,以实现用户自定义函数的执行。相比于 Native 的 
UDF 实现,Remote UDF Service 有如下优势和限制:
-
-**1. 优势**
-
-* 跨语言:可以用 Protobuf 支持的各类语言编写 UDF Service。
-
-* 安全:UDF 执行失败或崩溃,仅会影响 UDF Service 自身,而不会导致 Doris 进程崩溃。
-
-* 灵活:UDF Service 中可以调用任意其他服务或程序库类,以满足更多样的业务需求。
-
-**2. 使用限制**
-
-* 性能:相比于 Native UDF,UDF Service 会带来额外的网络开销,因此性能会远低于 Native UDF。同时,UDF Service 
自身的实现也会影响函数的执行效率,用户需要自行处理高并发、线程安全等问题。
-
-* 单行模式和批处理模式:Doris 原先的基于行存的查询执行框架会对每一行数据执行一次 UDF RPC 
调用,因此执行效率非常差,而在新的向量化执行框架下,会对每一批数据(默认 2048 行)执行一次 UDF RPC 
调用,因此性能有明显提升。实际测试中,基于向量化和批处理方式的 Remote UDF 性能和基于行存的 Native UDF 性能相当,可供参考。
-
-## 编写 UDF 函数
-
-
-本小节主要介绍如何开发一个 Remote RPC service。在 `samples/doris-demo/udf-demo/` 下提供了 Java 
版本的示例,可供参考。
-
-### 拷贝 proto 文件
-
-拷贝 gensrc/proto/function_service.proto 和 gensrc/proto/types.proto 到 Rpc 服务中
-
-**function_service.proto**
-    
-- PFunctionCallRequest
-
-  - function_name:函数名称,对应创建函数时指定的 symbol
-
-  - args:方法传递的参数
-
-  - context:查询上下文信息
-
-- PFunctionCallResponse
-
-  - result:结果
-
-  - status:状态,0 代表正常
-
-- PCheckFunctionRequest
-
-  - function:函数相关信息
-
-  - match_type:匹配类型
-
-- PCheckFunctionResponse
-
-  - status:状态,0 代表正常
-
-### 生成接口
-
-通过 protoc 生成代码,具体参数通过 protoc -h 查看
-
-### 实现接口
-
-共需要实现以下三个方法
-
-- fnCall:用于编写计算逻辑
-
-- checkFn:用于创建 UDF 时校验,校验函数名/参数/返回值等是否合法
-
-- handShake:用于接口探活
-
-## 创建 UDF
-
-目前暂不支持 UDTF
-
-```sql
-CREATE FUNCTION 
-name ([,...])
-[RETURNS] rettype
-PROPERTIES (["key"="value"][,...])     
-```
-
-说明:
-
-1. PROPERTIES 中`symbol`表示的是 rpc 调用传递的方法名,这个参数是必须设定的。
-
-2. PROPERTIES 中`object_file`表示的 rpc 服务地址,目前支持单个地址和 brpc 兼容格式的集群地址,集群连接方式 参考 
[格式说明](https://github.com/apache/incubator-brpc/blob/master/docs/cn/client.md#%E8%BF%9E%E6%8E%A5%E6%9C%8D%E5%8A%A1%E9%9B%86%E7%BE%A4)。
-
-3. PROPERTIES 中`type`表示的 UDF 调用类型,默认为 Native,使用 Rpc UDF 时传 RPC。
-
-4. name: 一个 function 是要归属于某个 DB 的,name 
的形式为`dbName`.`funcName`。当`dbName`没有明确指定的时候,就是使用当前 session 所在的 db 作为`dbName`。
-
-示例:
-```sql
-CREATE FUNCTION rpc_add_two(INT,INT) RETURNS INT PROPERTIES (
-  "SYMBOL"="add_int_two",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-CREATE FUNCTION rpc_add_one(INT) RETURNS INT PROPERTIES (
-  "SYMBOL"="add_int_one",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-CREATE FUNCTION rpc_add_string(varchar(30)) RETURNS varchar(30) PROPERTIES (
-  "SYMBOL"="add_string",
-  "OBJECT_FILE"="127.0.0.1:9114",
-  "TYPE"="RPC"
-);
-```
-
-## 使用 UDF
-
-用户使用 UDF 必须拥有对应数据库的 `SELECT` 权限。
-
-UDF 的使用与普通的函数方式一致,唯一的区别在于,内置函数的作用域是全局的,而 UDF 的作用域是 DB 内部。当链接 session 
位于数据内部时,直接使用 UDF 名字会在当前 DB 内部查找对应的 UDF。否则用户需要显示的指定 UDF 的数据库名字,例如 
`dbName`.`funcName`。
-
-## 删除 UDF
-
-当你不再需要 UDF 函数时,你可以通过下述命令来删除一个 UDF 函数,可以参考 `DROP FUNCTION`。
-
-## 示例
-
-在`samples/doris-demo/` 目录中提供和 cpp/java/python 语言的 rpc server 
实现示例。具体使用方法见每个目录下的`README.md`
-例如 rpc_add_string
-
-```sql
-mysql >select rpc_add_string('doris');
-+-------------------------+
-| rpc_add_string('doris') |
-+-------------------------+
-| doris_rpc_test          |
-+-------------------------+
-```
-日志会显示
-
-```text
-INFO: fnCall request=function_name: "add_string"
-args {
-  type {
-    id: STRING
-  }
-  has_null: false
-  string_value: "doris"
-}
-INFO: fnCall res=result {
-  type {
-    id: STRING
-  }
-  has_null: false
-  string_value: "doris_rpc_test"
-}
-status {
-  status_code: 0
-}
-```
-
-
-
diff --git a/sidebars.json b/sidebars.json
index 5575eb9e89f..a937fb19609 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -252,8 +252,7 @@
                     "type": "category",
                     "label": "User Defined Functions",
                     "items": [
-                        "query/udf/java-user-defined-function",
-                        "query/udf/remote-user-defined-function"
+                        "query/udf/java-user-defined-function"
                     ]
                 }
             ]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to