This is an automated email from the ASF dual-hosted git repository.
zhangstar333 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 0acd15cab10 [doc](udf) remove the expiration_time in create function
(#3845)
0acd15cab10 is described below
commit 0acd15cab109c27f90ec2153b2eabf72c67093c3
Author: zhangstar333 <[email protected]>
AuthorDate: Tue Aug 25 11:25:01 2026 +0800
[doc](udf) remove the expiration_time in create function (#3845)
## Versions
- [x] dev
- [x] 4.x
- [ ] 3.x
- [ ] 2.1 or older (not covered by version/language sync gate)
## Languages
- [x] Chinese
- [x] English
- [ ] Japanese candidate translation needed
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
- [ ] Updated required version and language counterparts, or explained
why not
- [ ] If only one language changed, confirmed whether source/translation
counterparts need sync
---
docs/query-data/udf/java-user-defined-function.md | 8 ++++----
.../current/query-data/udf/java-user-defined-function.md | 10 +++++-----
.../version-4.x/query-data/udf/java-user-defined-function.md | 9 +++++----
.../version-4.x/query-data/udf/java-user-defined-function.md | 5 +++--
4 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/docs/query-data/udf/java-user-defined-function.md
b/docs/query-data/udf/java-user-defined-function.md
index fc704ab8aec..adf229cb477 100644
--- a/docs/query-data/udf/java-user-defined-function.md
+++ b/docs/query-data/udf/java-user-defined-function.md
@@ -549,12 +549,13 @@ The BE caches JARs globally and supports a customizable
expiration time. Add the
| `static_load` | Whether to use the static cache loading method | `false` |
| `expiration_time` | JAR expiration time, in minutes | `360` |
+- `expiration_time` will be removed after 4.1.1 version。
+
How it works:
- After static cache loading is enabled, the UDF instance is cached after
initialization completes on the first call.
- On subsequent calls to the UDF, the cache is checked first; if there is a
miss, the relevant initialization is executed.
-- A background thread checks periodically. If the UDF has not been called
within the configured expiration time, it is cleared from the cache.
-- If the UDF is called again before expiration, the cache timestamp is
automatically refreshed.
+- When Drop Function, it's will be cleared from the cache.
Example code:
@@ -575,8 +576,7 @@ PROPERTIES (
"symbol" = "org.apache.doris.udf.Print",
"always_nullable"="true",
"type" = "JAVA_UDF",
- "static_load" = "true", // default value is false
- "expiration_time" = "60" // default value is 360 minutes
+ "static_load" = "true" // default value is false
);
```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/udf/java-user-defined-function.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/udf/java-user-defined-function.md
index c1d0a8b9852..31c01c4e650 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/udf/java-user-defined-function.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/udf/java-user-defined-function.md
@@ -542,19 +542,20 @@ public class FunctionUdf {
### 方案 2:BE 全局缓存 JAR 包
-BE 全局缓存 JAR 包,并支持自定义过期淘汰时间。在 `CREATE FUNCTION` 时增加以下两个属性字段:
+BE 全局缓存 JAR 包,并支持自定义过期淘汰时间。在 `CREATE FUNCTION` 时增加以下属性字段:
| 属性 | 说明 | 默认值 |
| --- | --- | --- |
| `static_load` | 是否使用静态 cache 加载方式 | `false` |
| `expiration_time` | JAR 包过期时间,单位为分钟 | `360` |
+- `expiration_time` 字段自 4.1.1 版本之后删除,但对之前的版本无任何兼容性问题。
+
工作机制如下:
- 启用静态 cache 加载方式后,第一次调用该 UDF 时,初始化完成后会将该 UDF 实例缓存起来。
- 后续调用该 UDF 时,先在 cache 中查找;若未命中,再执行相关初始化操作。
-- 后台有线程定期检查,如果在配置的过期淘汰时间内一直未被调用,则会从 cache 中清理掉。
-- 如果在过期前被再次调用,则会自动更新缓存时间点。
+- 在 Drop Function 时,会自动清理相关的cache.
示例代码如下:
@@ -575,8 +576,7 @@ PROPERTIES (
"symbol" = "org.apache.doris.udf.Print",
"always_nullable"="true",
"type" = "JAVA_UDF",
- "static_load" = "true", // default value is false
- "expiration_time" = "60" // default value is 360 minutes
+ "static_load" = "true" // default value is false
);
```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/query-data/udf/java-user-defined-function.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/query-data/udf/java-user-defined-function.md
index c1d0a8b9852..1e715170576 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/query-data/udf/java-user-defined-function.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/query-data/udf/java-user-defined-function.md
@@ -549,12 +549,14 @@ BE 全局缓存 JAR 包,并支持自定义过期淘汰时间。在 `CREATE FUN
| `static_load` | 是否使用静态 cache 加载方式 | `false` |
| `expiration_time` | JAR 包过期时间,单位为分钟 | `360` |
+- `expiration_time` 字段自 4.1.1 版本之后删除,但对之前的版本无任何兼容性问题。
+
工作机制如下:
- 启用静态 cache 加载方式后,第一次调用该 UDF 时,初始化完成后会将该 UDF 实例缓存起来。
- 后续调用该 UDF 时,先在 cache 中查找;若未命中,再执行相关初始化操作。
-- 后台有线程定期检查,如果在配置的过期淘汰时间内一直未被调用,则会从 cache 中清理掉。
-- 如果在过期前被再次调用,则会自动更新缓存时间点。
+- 在 Drop Function 时,会自动清理相关的cache.
+
示例代码如下:
@@ -575,8 +577,7 @@ PROPERTIES (
"symbol" = "org.apache.doris.udf.Print",
"always_nullable"="true",
"type" = "JAVA_UDF",
- "static_load" = "true", // default value is false
- "expiration_time" = "60" // default value is 360 minutes
+ "static_load" = "true" // default value is false
);
```
diff --git
a/versioned_docs/version-4.x/query-data/udf/java-user-defined-function.md
b/versioned_docs/version-4.x/query-data/udf/java-user-defined-function.md
index fc704ab8aec..1afb1fa90a3 100644
--- a/versioned_docs/version-4.x/query-data/udf/java-user-defined-function.md
+++ b/versioned_docs/version-4.x/query-data/udf/java-user-defined-function.md
@@ -549,12 +549,13 @@ The BE caches JARs globally and supports a customizable
expiration time. Add the
| `static_load` | Whether to use the static cache loading method | `false` |
| `expiration_time` | JAR expiration time, in minutes | `360` |
+- `expiration_time` will be removed after 4.1.1 version。
+
How it works:
- After static cache loading is enabled, the UDF instance is cached after
initialization completes on the first call.
- On subsequent calls to the UDF, the cache is checked first; if there is a
miss, the relevant initialization is executed.
-- A background thread checks periodically. If the UDF has not been called
within the configured expiration time, it is cleared from the cache.
-- If the UDF is called again before expiration, the cache timestamp is
automatically refreshed.
+- When Drop Function, it's will be cleared from the cache.
Example code:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]