yangzhg commented on code in PR #10685:
URL: https://github.com/apache/doris/pull/10685#discussion_r921742158


##########
docs/zh-CN/docs/ecosystem/udaf/remote-user-defined-aggregation-function.md:
##########
@@ -0,0 +1,216 @@
+---
+
+{
+
+"title": "远程UDAF",
+
+"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.
+
+-->
+
+  
+
+# 远程UDAF
+
+  
+
+Remote UDAF Service 支持通过 RPC 的方式访问用户提供的 UDAF Service,以实现用户自定义函数的执行。相比于 Native 
的 UDAF 实现,Remote UDAF Service 有如下优势和限制:
+
+1. 优势
+
+* 跨语言:可以用 Protobuf 支持的各类语言编写 UDAF Service。
+
+* 安全:UDAF 执行失败或崩溃,仅会影响 UDAF Service 自身,而不会导致 Doris 进程崩溃。
+
+* 灵活:UDAF Service 中可以调用任意其他服务或程序库类,以满足更多样的业务需求。
+
+  
+
+2. 使用限制
+
+* 性能:相比于 Native UDAF,UDAF Service 会带来额外的网络开销,因此性能会远低于 Native UDAF。同时,UDAF 
Service 自身的实现也会影响函数的执行效率,用户需要自行处理高并发、线程安全等问题。
+
+* 单行模式和批处理模式:Doris 原先的基于行存的查询执行框架会对每一行数据执行一次 UDAF RPC 
调用,因此执行效率非常差,而在新的向量化执行框架下,会对每一批数据(默认2048行)执行一次 UDAF RPC 
调用,因此性能有明显提升。实际测试中,基于向量化和批处理方式的 Remote UDAF 性能和基于行存的 Native UDAF 性能相当,可供参考。

Review Comment:
   ```suggestion
   * 单行模式和批处理模式:Doris 原先的基于行存的查询执行框架会对每一行数据执行一次 UDAF RPC 
调用,因此执行效率非常差,而在新的向量化执行框架下,会对每一批数据执行一次 UDAF RPC 调用,因此性能有明显提升。实际测试中,基于向量化和批处理方式的 
Remote UDAF 性能和基于行存的 Native UDAF 性能相当,可供参考。
   ```



-- 
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

Reply via email to