From 511e0462764d9f8caffed81b8ce13eb27fb37af7 Mon Sep 17 00:00:00 2001 From: q <787025321@qq.com> Date: Wed, 4 Jun 2025 22:02:32 +0800 Subject: [PATCH 1/2] fix: cn & prompt --- .github/workflows/refine_prompt.txt | 6 +++-- .../guides/54-query/04-external-function.md | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/refine_prompt.txt b/.github/workflows/refine_prompt.txt index 364610be43..e01a5b2547 100644 --- a/.github/workflows/refine_prompt.txt +++ b/.github/workflows/refine_prompt.txt @@ -2,7 +2,7 @@ 1. 技术准确性 - 保留所有技术术语、代码、命令、变量名、品牌名称的原始形式 -- 专业术语首次出现可加英文注释(如"查询优化器(Query Optimizer)", "商业版 (Business)") +- 专业术语首次出现可加英文注释(如"查询优化器 (Query Optimizer)", "商业版 (Business)" 2. 语言优化 - 消除直译生硬感,符合中文技术文档习惯 @@ -10,7 +10,7 @@ - 调整长句结构使其更流畅 3. 格式保留 -- 严格保持原始markdown结构(标题/表格/列表/代码块) +- 严格保持原始 markdown 结构(标题/表格/列表/代码块) - JSON/YAML仅翻译明确可本地化的字段(如"title") - 中文与英文&数字之间要有空格 @@ -18,6 +18,8 @@ - 不添加任何说明性文字,比如修改说明、主要优化说明等注释性说明,最终文字直接可用 - 不调整文档原始结构 - 不修改非中文内容(数字/版本号/参数值) +- 文章的最后一定不能追加“修改说明”等注释性文字(务必记住禁止这个行为!) +- 整篇文章不需要被```markdown ```包裹,因为这样会导致文档无法正常显示。 5. 输出要求 - 直接输出最终文档内容 diff --git a/docs/cn/guides/54-query/04-external-function.md b/docs/cn/guides/54-query/04-external-function.md index 789f3a0c25..52c9ff2db8 100644 --- a/docs/cn/guides/54-query/04-external-function.md +++ b/docs/cn/guides/54-query/04-external-function.md @@ -1,4 +1,3 @@ -```markdown --- title: "Databend Cloud 中的外部函数" sidebar_label: "外部函数" @@ -14,9 +13,9 @@ Databend 的外部函数允许您使用 Python 等编程语言编写的外部服 下表列出了在 Databend 中创建外部函数支持的语言及所需库: -| 语言 | 所需库 | -| ------ | -------------------------------------------------------- | -| Python | [databend-udf](https://pypi.org/project/databend-udf) | +| 语言 | 所需库 | +| ------ | ----------------------------------------------------- | +| Python | [databend-udf](https://pypi.org/project/databend-udf) | ## 管理外部函数 @@ -67,13 +66,13 @@ if __name__ == '__main__': **`@udf` 装饰器参数说明:** -| 参数 | 描述 | -| ------------- | -------------------------------------------------------------------- | -| `input_types` | 输入数据类型列表(如 `["INT", "VARCHAR"]`) | -| `result_type` | 返回值类型(如 `"INT"`) | -| `name` | (可选)函数自定义名称,默认使用原函数名 | -| `io_threads` | I/O 密集型函数中每个数据块使用的 I/O 线程数 | -| `skip_null` | 设为 `True` 时跳过 NULL 值,返回值自动设为 NULL(默认 `False`) | +| 参数 | 描述 | +| ------------- | --------------------------------------------------------------- | +| `input_types` | 输入数据类型列表(如 `["INT", "VARCHAR"]`) | +| `result_type` | 返回值类型(如 `"INT"`) | +| `name` | (可选)函数自定义名称,默认使用原函数名 | +| `io_threads` | I/O 密集型函数中每个数据块使用的 I/O 线程数 | +| `skip_null` | 设为 `True` 时跳过 NULL 值,返回值自动设为 NULL(默认 `False`) | **Databend 与 Python 数据类型映射:** @@ -216,4 +215,3 @@ CREATE FUNCTION gcd (INT, INT) ## 结论 Databend Cloud 的外部函数通过集成 Python 等语言的自定义代码,为数据处理管道提供了强大的扩展能力。遵循上述步骤可创建处理复杂任务、利用外部库并实现高级逻辑的外部函数。 -``` \ No newline at end of file From 75c8c8f5c05b095fb8a1ac57fb41e501ce654b37 Mon Sep 17 00:00:00 2001 From: q <787025321@qq.com> Date: Wed, 4 Jun 2025 22:04:39 +0800 Subject: [PATCH 2/2] fix: typo --- .github/workflows/refine_prompt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/refine_prompt.txt b/.github/workflows/refine_prompt.txt index e01a5b2547..289704a67a 100644 --- a/.github/workflows/refine_prompt.txt +++ b/.github/workflows/refine_prompt.txt @@ -2,7 +2,7 @@ 1. 技术准确性 - 保留所有技术术语、代码、命令、变量名、品牌名称的原始形式 -- 专业术语首次出现可加英文注释(如"查询优化器 (Query Optimizer)", "商业版 (Business)" +- 专业术语首次出现可加英文注释(如"查询优化器 (Query Optimizer)", "商业版 (Business)") 2. 语言优化 - 消除直译生硬感,符合中文技术文档习惯