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

dataroaring 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 64fb73d37ec [Enhancement] Support move truncated old data to recycle 
bin (#3380)
64fb73d37ec is described below

commit 64fb73d37ece300aaa0fbb89804f115dc3d0ec31
Author: Yongqiang YANG <[email protected]>
AuthorDate: Tue Feb 10 16:40:55 2026 -0800

    [Enhancement] Support move truncated old data to recycle bin (#3380)
    
    ## Summary
    - Recreate the TRUNCATE documentation update from #1324 for `dev` and
    `4.x`.
    - Document `FORCE` syntax and add recovery behavior notes with `RECOVER`
    references.
    - Apply updates to both English and Chinese docs.
    
    ## Versions
    - [x] dev
    - [x] 4.x
    - [ ] 3.x
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    - [x] Chinese
    - [x] English
    
    ## Reference
    - Original PR: https://github.com/apache/doris-website/pull/1324
    
    ---------
    
    Co-authored-by: Vallish <[email protected]>
    Co-authored-by: Copilot <[email protected]>
---
 docs/data-operate/delete/truncate-manual.md        | 23 ++++++++++++----------
 .../current/data-operate/delete/truncate-manual.md | 21 +++++++++++---------
 .../data-operate/delete/truncate-manual.md         | 21 +++++++++++---------
 .../data-operate/delete/truncate-manual.md         | 23 ++++++++++++----------
 4 files changed, 50 insertions(+), 38 deletions(-)

diff --git a/docs/data-operate/delete/truncate-manual.md 
b/docs/data-operate/delete/truncate-manual.md
index bd259c662e6..9ffbc4dd48f 100644
--- a/docs/data-operate/delete/truncate-manual.md
+++ b/docs/data-operate/delete/truncate-manual.md
@@ -13,18 +13,15 @@ Use this statement to clear data from a specified table and 
its partitions.
 ## Syntax
 
 ```sql
-TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)];
+TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)] [FORCE];
 ```
 
-- This statement clears the data but retains the table or partition structure.
-
-- Unlike DELETE, TRUNCATE only performs metadata operations, making it faster 
and not affecting query performance.
-
-- Data removed by this operation cannot be recovered.
-
-- The table status must be NORMAL, and there should be no ongoing SCHEMA 
CHANGE operations.
-
-- This command may cause ongoing import tasks to fail.
+- This statement only clears the data within a table or partition but 
preserves the table or partition itself.
+- Unlike DELETE, this statement can only clear the specified table or 
partition as a whole and cannot be added with filter conditions.
+- Unlike DELETE, truncating data will not affect query performance.
+- The data deleted by this operation can be recovered through the RECOVER 
statement (for a period of time). See 
[RECOVER](../../sql-manual/sql-statements/recycle/RECOVER) statement for 
details. If you execute the command with FORCE, the data will be deleted 
directly and cannot be recovered. This operation is generally not recommended.
+- When using this command, the table status must be NORMAL, which means that 
tables undergoing SCHEMA CHANGE cannot be truncated.
+- This command may cause ongoing imports to fail.
 
 ## Examples
 
@@ -39,3 +36,9 @@ TRUNCATE TABLE example_db.tbl;
 ```sql
 TRUNCATE TABLE tbl PARTITION(p1, p2);
 ```
+
+**3. Clear the table `tbl` in the `example_db` database with FORCE**
+
+```sql
+TRUNCATE TABLE example_db.tbl FORCE;
+```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/delete/truncate-manual.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/delete/truncate-manual.md
index c64658a8c29..c20388db043 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/delete/truncate-manual.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/delete/truncate-manual.md
@@ -11,17 +11,14 @@
 ## 语法
 
 ```sql
-TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)];
+TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)] [FORCE];
 ```
 
-- 该语句清空数据,但保留表或分区结构。
-
-- 与 DELETE 不同,TRUNCATE 仅进行元数据操作,速度快且不会影响查询性能。
-
-- 该操作删除的数据不可恢复。
-
-- 表状态需为 NORMAL,不能有正在进行的 SCHEMA CHANGE 等操作。
-
+- 该语句仅清空表或分区中的数据,但保留表或分区本身。
+- 与 DELETE 不同,该语句只能整体清空指定表或分区,不支持附加过滤条件。
+- 与 DELETE 不同,TRUNCATE 清空数据不会影响查询性能。
+- 该操作删除的数据可通过 RECOVER 语句在一定时间内恢复。详见 
[RECOVER](../../sql-manual/sql-statements/recycle/RECOVER) 语句说明。若执行命令时使用 
FORCE,数据将被直接删除且不可恢复,通常不建议使用。
+- 使用该命令时,表状态必须为 NORMAL,即正在进行 SCHEMA CHANGE 的表不能执行 TRUNCATE。
 - 该命令可能会导致正在进行的导入任务失败。
 
 ## 示例
@@ -37,3 +34,9 @@ TRUNCATE TABLE example_db.tbl;
 ```sql
 TRUNCATE TABLE tbl PARTITION(p1, p2);
 ```
+
+**3. 使用 FORCE 清空 example_db 下的表 tbl**
+
+```sql
+TRUNCATE TABLE example_db.tbl FORCE;
+```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/delete/truncate-manual.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/delete/truncate-manual.md
index c64658a8c29..c20388db043 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/delete/truncate-manual.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/delete/truncate-manual.md
@@ -11,17 +11,14 @@
 ## 语法
 
 ```sql
-TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)];
+TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)] [FORCE];
 ```
 
-- 该语句清空数据,但保留表或分区结构。
-
-- 与 DELETE 不同,TRUNCATE 仅进行元数据操作,速度快且不会影响查询性能。
-
-- 该操作删除的数据不可恢复。
-
-- 表状态需为 NORMAL,不能有正在进行的 SCHEMA CHANGE 等操作。
-
+- 该语句仅清空表或分区中的数据,但保留表或分区本身。
+- 与 DELETE 不同,该语句只能整体清空指定表或分区,不支持附加过滤条件。
+- 与 DELETE 不同,TRUNCATE 清空数据不会影响查询性能。
+- 该操作删除的数据可通过 RECOVER 语句在一定时间内恢复。详见 
[RECOVER](../../sql-manual/sql-statements/recycle/RECOVER) 语句说明。若执行命令时使用 
FORCE,数据将被直接删除且不可恢复,通常不建议使用。
+- 使用该命令时,表状态必须为 NORMAL,即正在进行 SCHEMA CHANGE 的表不能执行 TRUNCATE。
 - 该命令可能会导致正在进行的导入任务失败。
 
 ## 示例
@@ -37,3 +34,9 @@ TRUNCATE TABLE example_db.tbl;
 ```sql
 TRUNCATE TABLE tbl PARTITION(p1, p2);
 ```
+
+**3. 使用 FORCE 清空 example_db 下的表 tbl**
+
+```sql
+TRUNCATE TABLE example_db.tbl FORCE;
+```
diff --git a/versioned_docs/version-4.x/data-operate/delete/truncate-manual.md 
b/versioned_docs/version-4.x/data-operate/delete/truncate-manual.md
index bd259c662e6..9ffbc4dd48f 100644
--- a/versioned_docs/version-4.x/data-operate/delete/truncate-manual.md
+++ b/versioned_docs/version-4.x/data-operate/delete/truncate-manual.md
@@ -13,18 +13,15 @@ Use this statement to clear data from a specified table and 
its partitions.
 ## Syntax
 
 ```sql
-TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)];
+TRUNCATE TABLE [db.]tbl [PARTITION(p1, p2, ...)] [FORCE];
 ```
 
-- This statement clears the data but retains the table or partition structure.
-
-- Unlike DELETE, TRUNCATE only performs metadata operations, making it faster 
and not affecting query performance.
-
-- Data removed by this operation cannot be recovered.
-
-- The table status must be NORMAL, and there should be no ongoing SCHEMA 
CHANGE operations.
-
-- This command may cause ongoing import tasks to fail.
+- This statement only clears the data within a table or partition but 
preserves the table or partition itself.
+- Unlike DELETE, this statement can only clear the specified table or 
partition as a whole and cannot be added with filter conditions.
+- Unlike DELETE, truncating data will not affect query performance.
+- The data deleted by this operation can be recovered through the RECOVER 
statement (for a period of time). See 
[RECOVER](../../sql-manual/sql-statements/recycle/RECOVER) statement for 
details. If you execute the command with FORCE, the data will be deleted 
directly and cannot be recovered. This operation is generally not recommended.
+- When using this command, the table status must be NORMAL, which means that 
tables undergoing SCHEMA CHANGE cannot be truncated.
+- This command may cause ongoing imports to fail.
 
 ## Examples
 
@@ -39,3 +36,9 @@ TRUNCATE TABLE example_db.tbl;
 ```sql
 TRUNCATE TABLE tbl PARTITION(p1, p2);
 ```
+
+**3. Clear the table `tbl` in the `example_db` database with FORCE**
+
+```sql
+TRUNCATE TABLE example_db.tbl FORCE;
+```


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to