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

morningman 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 63e612ed1dc [fix](doc) DML/DELETE.md and DML/INSERT-OVERWRITE.md: add 
missing setup tables (#3823)
63e612ed1dc is described below

commit 63e612ed1dcbd3d5d50183cddde9211cd60cb3ed
Author: boluor <[email protected]>
AuthorDate: Wed May 27 21:32:01 2026 -0700

    [fix](doc) DML/DELETE.md and DML/INSERT-OVERWRITE.md: add missing setup 
tables (#3823)
    
    ## Summary
    
    Two DML statement pages reference tables their example sections never
    create. This PR adds the missing setup blocks (mirrored on EN and ZH) so
    the examples actually run on a fresh cluster.
    
    | Page | Missing | Added |
    |------|---------|-------|
    | \`DML/DELETE.md\` | \`my_table\` | Unique-Key list-partitioned table
    on \`k1\` (partitions \`p1\`, \`p2\`) with columns \`(k1, k2)\` and six
    seed rows; this powers examples 1, 2, 3, 6 and 7 |
    | \`DML/DELETE.md\` (example 4) | post-DELETE state assertion | Wrap the
    existing post-delete row table in an explicit \`SELECT * FROM t1 ORDER
    BY id;\` so the result block compares against the SELECT output rather
    than DELETE's own empty result. Also corrected the result block's column
    widths and DOUBLE display to match Apache Doris 4.1.1's actual mysql
    output (integer-valued DOUBLE has no trailing \`.0\`) |
    | \`DML/INSERT-OVERWRITE.md\` | \`test2\` | A small \`test2\` CREATE
    TABLE + 2-row INSERT matching the \`(c1, c2)\` shape of \`test\`,
    inserted between the existing \`test\` setup and the first overwrite
    example |
    
    ## Verification
    
    End-to-end on a single-node Apache Doris 4.1.1 cluster:
    - All five \`my_table\` DELETE forms parse and execute after the new
    setup block.
    - Example 4's setup + DELETE + new SELECT match the result block
    byte-for-byte.
    
    ## Test plan
    
    - [x] Run each affected example on a 4.1.1 cluster.
    - [x] EN and ZH parallel-edited.
    - [x] No existing examples removed.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
---
 .../sql-statements/data-modification/DML/DELETE.md | 30 +++++++++++++++++++---
 .../data-modification/DML/INSERT-OVERWRITE.md      | 14 ++++++++++
 .../sql-statements/data-modification/DML/DELETE.md | 30 +++++++++++++++++++---
 .../data-modification/DML/INSERT-OVERWRITE.md      | 14 ++++++++++
 4 files changed, 82 insertions(+), 6 deletions(-)

diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
index aa3c6df6b2a..8800a5e98b7 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
@@ -62,6 +62,26 @@ DELETE FROM table_name [table_alias]
 
 ## 示例
 
+示例 1-3、6、7 使用下面 setup 创建的 `my_table`,它是一个 Unique Key、按 `k1` 列做 List 
分区的表,包含两个分区 `p1` 和 `p2`:
+
+```sql
+CREATE TABLE my_table (
+  k1 INT,
+  k2 VARCHAR(16)
+)
+UNIQUE KEY (k1)
+PARTITION BY LIST (k1) (
+  PARTITION p1 VALUES IN (1, 2, 3, 4, 5),
+  PARTITION p2 VALUES IN (6, 7, 8, 9, 10)
+)
+DISTRIBUTED BY HASH (k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+
+INSERT INTO my_table VALUES
+  (1, 'a'), (3, 'abc'), (5, 'abc'),
+  (6, 'b'), (8, 'abc'), (10, 'd');
+```
+
 1. 删除 my_table partition p1 中 k1 列值为 3 的数据行
     
     ```sql
@@ -126,10 +146,14 @@ DELETE FROM table_name [table_alias]
      USING t2 INNER JOIN t3 ON t2.id = t3.id
      WHERE t1.id = t2.id;
    ```
-   
-   预期结果为,删除了`t1`表`id`为`1`的列
-   
+
+   `t1` 删除后的预期内容(只移除了 `id = 1` 的行):
+
+   ```sql
+   SELECT * FROM t1 ORDER BY id;
    ```
+
+   ```text
    +----+----+----+--------+------------+
    | id | c1 | c2 | c3     | c4         |
    +----+----+----+--------+------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
index 327c9019ef9..d13a6ef725b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
@@ -150,6 +150,20 @@ PROPERTIES (
 );
 ```
 
+下文中基于查询的重写示例会用到 `test2` 表。它与 `test` 的 `(c1, c2)` 列结构一致,便于 `INSERT OVERWRITE 
test SELECT * FROM test2` 成功执行:
+
+```sql
+CREATE TABLE IF NOT EXISTS test2 (
+  `c1` int NOT NULL,
+  `c2` int NOT NULL
+) ENGINE=OLAP
+DUPLICATE KEY(`c1`)
+DISTRIBUTED BY HASH(`c1`) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+
+INSERT INTO test2 VALUES (1, 10), (2, 20);
+```
+
 ### Overwrite Table
 
 1. VALUES 的形式重写`test`表
diff --git 
a/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
 
b/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
index 00e87b0a83c..4a19da66abc 100644
--- 
a/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
+++ 
b/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md
@@ -67,6 +67,26 @@ This feature is supported since the Apache Doris 1.2 version
 
 ## Example
 
+Examples 1-3, 6 and 7 use the `my_table` table created by the following setup. 
It is a unique-key list-partitioned table with two partitions `p1` and `p2`:
+
+```sql
+CREATE TABLE my_table (
+  k1 INT,
+  k2 VARCHAR(16)
+)
+UNIQUE KEY (k1)
+PARTITION BY LIST (k1) (
+  PARTITION p1 VALUES IN (1, 2, 3, 4, 5),
+  PARTITION p2 VALUES IN (6, 7, 8, 9, 10)
+)
+DISTRIBUTED BY HASH (k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+
+INSERT INTO my_table VALUES
+  (1, 'a'), (3, 'abc'), (5, 'abc'),
+  (6, 'b'), (8, 'abc'), (10, 'd');
+```
+
 1. Delete the data row whose k1 column value is 3 in my_table partition p1
 
    ```sql
@@ -131,10 +151,14 @@ This feature is supported since the Apache Doris 1.2 
version
      USING t2 INNER JOIN t3 ON t2.id = t3.id
      WHERE t1.id = t2.id;
    ```
-   
-   the expect result is only remove the row where id = 1 in table t1
-   
+
+   The expected post-delete state of `t1` (only the row where `id = 1` is 
removed):
+
+   ```sql
+   SELECT * FROM t1 ORDER BY id;
    ```
+
+   ```text
    +----+----+----+--------+------------+
    | id | c1 | c2 | c3     | c4         |
    +----+----+----+--------+------------+
diff --git 
a/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
 
b/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
index 4046f4b37fb..940d6f6d2ba 100644
--- 
a/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
+++ 
b/versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/INSERT-OVERWRITE.md
@@ -150,6 +150,20 @@ PROPERTIES (
 );
 ```
 
+A second table `test2` is referenced by the query-based overwrites further 
below. It has the same `(c1, c2)` shape so `INSERT OVERWRITE test SELECT * FROM 
test2` succeeds:
+
+```sql
+CREATE TABLE IF NOT EXISTS test2 (
+  `c1` int NOT NULL,
+  `c2` int NOT NULL
+) ENGINE=OLAP
+DUPLICATE KEY(`c1`)
+DISTRIBUTED BY HASH(`c1`) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+
+INSERT INTO test2 VALUES (1, 10), (2, 20);
+```
+
 ### Overwrite Table
 
 1. Overwrite the `test` table using the form of `VALUES`.


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

Reply via email to