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 c9a1641a479 [Feature](insert-overwrite) Support create partition for 
auto partition table when insert overwrite (#936)
c9a1641a479 is described below

commit c9a1641a4791c6fd079066a260bc653a4c274da2
Author: zclllhhjj <zhaochan...@selectdb.com>
AuthorDate: Thu Oct 31 11:08:21 2024 +0800

    [Feature](insert-overwrite) Support create partition for auto partition 
table when insert overwrite (#936)
    
    doc of: https://github.com/apache/doris/pull/38628
---
 docs/query/query-variables/variables.md            |  6 +-
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 .../current/query/query-variables/variables.md     | 71 +++++++++---------
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 .../query-data/delete-query-variables/variables.md | 78 ++++++++++----------
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 .../version-3.0/query/query-variables/variables.md | 86 +++++++++++-----------
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 .../query-data/delete-query-variables/variables.md |  6 +-
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 .../version-3.0/query/query-variables/variables.md |  6 +-
 .../Manipulation/INSERT-OVERWRITE.md               | 62 +++++++++++++++-
 12 files changed, 493 insertions(+), 132 deletions(-)

diff --git a/docs/query/query-variables/variables.md 
b/docs/query/query-variables/variables.md
index 739cf4fd4f1..5ebeaece04a 100644
--- a/docs/query/query-variables/variables.md
+++ b/docs/query/query-variables/variables.md
@@ -709,9 +709,11 @@ Optional values:
     When `enable_adaptive_pipeline_task_serial_read_on_limit` is enabled, the 
number of rows at which the parallelism of the scan will be set to 1. 
     Default value is `10000`
 
-***
+* `enable_auto_create_when_overwrite`
 
-#### Supplementary instructions on statement execution timeout control
+  Whether or not to support the creation of new partitions at the same time 
when using `insert overwrite` to overwrite an Auto Partition table, defaults to 
`false`.
+
+### Supplementary instructions on statement execution timeout control
 
 * Means of control
 
diff --git 
a/docs/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/docs/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index 437a8d2d464..9720f7ef670 100644
--- 
a/docs/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/docs/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -72,8 +72,66 @@ INSERT OVERWRITE table table_name
 Notice:
 
 1. In the current version, the session variable `enable_insert_strict` is set 
to `true` by default. If some data that does not conform to the format of the 
target table is filtered out during the execution of the `INSERT OVERWRITE` 
statement, such as when overwriting a partition and not all partition 
conditions are satisfied, overwriting the target table will fail.
-2. If the target table of the INSERT OVERWRITE is an 
[AUTO-PARTITION-table](../../../../advanced/partition/auto-partition), then new 
partitions can be created if PARTITION is not specified (that is, rewrite the 
whole table). If PARTITION for overwrite is specified(Includes automatic 
detection and overwriting of partitions through the `partition(*)` syntax), 
then the AUTO PARTITION table behaves as if it were a normal partitioned table 
during this process, and data that does not satisfy t [...]
-3. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+2. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+
+#### For Auto Partition Table
+
+If the target table of the INSERT OVERWRITE is an autopartitioned table, the 
behaviour is controlled by the [Session 
Variable](../../../../query/query-variables/variables#variable)  
`enable_auto_create_when_overwrite` controls the behaviour as follows:
+1. If PARTITION is not specified (overwrite the whole table), when 
`enable_auto_create_when_overwrite` is `true`, the table is overwritten and 
partitions are created according to the table's auto-partitioning rules for 
data that does not have a corresponding partition, and those datas is admit. If 
`enable_auto_create_when_overwrite` is `false`, data for which no partition is 
found will accumulate error rows until it fails.
+2. If an overwrite PARTITION is specified, the AUTO PARTITION table behaves as 
a normal partitioned table during this process, and data that does not satisfy 
the conditions of an existing partition is filtered instead of creating a new 
partition.
+3. If you specify PARTITION as `partition(*)` (auto detect partition and 
overwrite), when `enable_auto_create_when_overwrite` is `true`, for the data 
that have corresponding partitions in the table, overwrite their corresponding 
partitions, and leave the other existing partitions unchanged. At the same 
time, for data without corresponding partitions, create partitions according to 
the table's auto-partitioning rules, and accommodate the data without 
corresponding partitions. If `enable_a [...]
+
+In versions without `enable_auto_create_when_overwrite`, the behaviour is as 
if the variable had a value of `false`.
+
+Examples are shown below:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 is overwritten, new1 gets the new partition, and the other 
partitions remain unchanged.
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- The whole table is overwritten, and new2 gets the new 
partition.
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/query-variables/variables.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/query-variables/variables.md
index 4c4808598fb..0b4d23f9d8f 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/query-variables/variables.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/query-variables/variables.md
@@ -555,89 +555,90 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
     用于控制查询 Hive 外表时是否过滤掉字段末尾的空格。默认为 false。
 
-* `skip_storage_engine_merge`
+- `skip_storage_engine_merge`
 
     用于调试目的。在向量化执行引擎中,当发现读取 Aggregate Key 模型或者 Unique Key 
模型的数据结果有问题的时候,把此变量的值设置为`true`,将会把 Aggregate Key 模型或者 Unique Key 模型的数据当成 
Duplicate Key 模型读取。
 
-* `skip_delete_predicate`
+- `skip_delete_predicate`
 
        用于调试目的。在向量化执行引擎中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被删除的数据当成正常数据读取。
 
-* `skip_delete_bitmap`
+- `skip_delete_bitmap`
 
     用于调试目的。在 Unique Key MoW 表中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被 delete 
bitmap 标记删除的数据当成正常数据读取。
 
-* `skip_missing_version`
+- `skip_missing_version`
 
     有些极端场景下,表的 Tablet 下的所有的所有副本都有版本缺失,使得这些 Tablet 
没有办法被恢复,导致整张表都不能查询。这个变量可以用来控制查询的行为,当设置为`true`时,查询会忽略 FE partition 中记录的 
visibleVersion,使用 replica version。如果 Be 上的 Replica 
有缺失的版本,则查询会直接跳过这些缺失的版本,只返回仍存在版本的数据。此外,查询将会总是选择所有存活的 BE 中所有 Replica 里 
lastSuccessVersion 
最大的那一个,这样可以尽可能的恢复更多的数据。这个变量应该只在上述紧急情况下才被设置为`true`,仅用于临时让表恢复查询。注意,此变量与 
use_fix_replica 变量冲突,当 use_fix_replica 变量不等于 -1 时,此变量会不起作用
 
-* `skip_bad_tablet`
+- `skip_bad_tablet`
 
     在某些情况下,用户某张单副本表中有大量数据,如果其中某个 Tablet 
损坏,将导致整张表无法查询。如果用户不关心数据的完整性,他们可以使用此变量暂时跳过坏的 Tablet 进行查询,并将剩余数据导入到新表中。
 
-* `default_password_lifetime`
+- `default_password_lifetime`
 
        默认的密码过期时间。默认值为 0,即表示不过期。单位为天。该参数只有当用户的密码过期属性为 DEFAULT 值时,才启用。如:
        
-       ```
+```sql
        CREATE USER user1 IDENTIFIED BY "12345" PASSWORD_EXPIRE DEFAULT;
        ALTER USER user1 PASSWORD_EXPIRE DEFAULT;
-       ```
-* `password_history`
+```
+
+- `password_history`
 
        默认的历史密码次数。默认值为0,即不做限制。该参数只有当用户的历史密码次数属性为 DEFAULT 值时,才启用。如:
 
-       ```
+```sql
        CREATE USER user1 IDENTIFIED BY "12345" PASSWORD_HISTORY DEFAULT;
        ALTER USER user1 PASSWORD_HISTORY DEFAULT;
-       ```
+```
 
-* `validate_password_policy`
+- `validate_password_policy`
 
        密码强度校验策略。默认为 `NONE` 或 `0`,即不做校验。可以设置为 `STRONG` 或 `2`。当设置为 `STRONG` 或 
`2` 时,通过 `ALTER USER` 或 `SET PASSWORD` 
命令设置密码时,密码必须包含“大写字母”,“小写字母”,“数字”和“特殊字符”中的 3 项,并且长度必须大于等于 
8。特殊字符包括:`~!@#$%^&*()_+|<>,.?/:;'[]{}"`。
 
-* `group_concat_max_len`
+- `group_concat_max_len`
 
     为了兼容某些 BI 工具能正确获取和设置该变量,变量值实际并没有作用。
 
-* `rewrite_or_to_in_predicate_threshold`
+- `rewrite_or_to_in_predicate_threshold`
 
     默认的改写 OR to IN 的 OR 数量阈值。默认值为 2,即表示有 2 个 OR 的时候,如果可以合并,则会改写成 IN。
 
-*   `group_by_and_having_use_alias_first`
+- `group_by_and_having_use_alias_first`
 
     指定 group by 和 having 语句是否优先使用列的别名,而非从 From 语句里寻找列的名字。默认为 false。
 
-* `enable_file_cache`
+- `enable_file_cache`
 
     控制是否启用 block file cache,默认 false。该变量只有在 be.conf 中 enable_file_cache=true 
时才有效,如果 be.conf 中 enable_file_cache=false,该 BE 节点的 block file cache 处于禁用状态。
 
-* `file_cache_base_path`
+- `file_cache_base_path`
 
     指定 block file cache 在 BE 上的存储路径,默认 'random',随机选择 BE 配置的存储路径。
 
-* `enable_inverted_index_query`
+- `enable_inverted_index_query`
 
     控制是否启用 inverted index query,默认 true.
 
        
-* `topn_opt_limit_threshold`
+- `topn_opt_limit_threshold`
 
     设置 topn 优化的 limit 阈值 (例如:SELECT * FROM t ORDER BY k LIMIT n). 如果 limit 的 n 
小于等于阈值,topn 相关优化(动态过滤下推、两阶段获取结果、按 key 的顺序读数据)会自动启用,否则会禁用。默认值是 1024。
 
-* `drop_table_if_ctas_failed`
+- `drop_table_if_ctas_failed`
 
     控制 create table as select 在写入发生错误时是否删除已创建的表,默认为 true。
 
-* `show_user_default_role`
+- `show_user_default_role`
 
     控制是否在 `show roles` 的结果里显示每个用户隐式对应的角色。默认为 false。
 
-* `use_fix_replica`
+- `use_fix_replica`
 
     使用固定 replica 进行查询。replica 从 0 开始,如果 use_fix_replica 为 0,则使用最小的,如果 
use_fix_replica 为 1,则使用第二个最小的,依此类推。默认值为 -1,表示未启用。
 
-* `dry_run_query`
+- `dry_run_query`
 
     如果设置为 true,对于查询请求,将不再返回实际结果集,而仅返回行数。对于导入和 insert,Sink 丢掉了数据,不会有实际的写发生。额默认为 
false。
 
@@ -652,42 +653,42 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
     +--------------+
     ```
   
-* `enable_parquet_lazy_materialization`
+- `enable_parquet_lazy_materialization`
 
   控制 parquet reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_orc_lazy_materialization`
+- `enable_orc_lazy_materialization`
 
   控制 orc reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_strong_consistency_read`
+- `enable_strong_consistency_read`
 
   用以开启强一致读。Doris 默认支持同一个会话内的强一致性,即同一个会话内对数据的变更操作是实时可见的。如需要会话间的强一致读,则需将此变量设置为 
true。
 
-* `truncate_char_or_varchar_columns`
+- `truncate_char_or_varchar_columns`
 
   是否按照表的 schema 来截断 char 或者 varchar 列。默认为 false。
 
   因为外表会存在表的 schema 中 char 或者 varchar 列的最大长度和底层 parquet 或者 orc 文件中的 schema 
不一致的情况。此时开启改选项,会按照表的 schema 中的最大长度进行截断。
 
-* `jdbc_clickhouse_query_final`
+- `jdbc_clickhouse_query_final`
 
   是否在使用 JDBC Catalog 功能查询 ClickHouse 时增加 final 关键字,默认为 false
 
   用于 ClickHouse 的 ReplacingMergeTree 表引擎查询去重
 
-* `enable_memtable_on_sink_node`
+- `enable_memtable_on_sink_node`
   
   是否在数据导入中启用 MemTable 前移,默认为 true
 
   在 DataSink 节点上构建 MemTable,并通过 brpc streaming 发送 segment 到其他 BE。
   该方法减少了多副本之间的重复工作,并且节省了数据序列化和反序列化的时间。
 
-* `enable_unique_key_partial_update`
+- `enable_unique_key_partial_update`
 
   是否在对 insert into 语句启用部分列更新的语义,默认为 false。需要注意的是,控制 insert 
语句是否开启严格模式的会话变量`enable_insert_strict`的默认值为 true,即 insert 
语句默认开启严格模式,而在严格模式下进行部分列更新不允许更新不存在的 key。所以,在使用 insert 语句进行部分列更新的时候如果希望能插入不存在的 
key,需要在`enable_unique_key_partial_update`设置为 true 
的基础上同时将`enable_insert_strict`设置为 false。
 
-* `describe_extend_variant_column`
+- `describe_extend_variant_column`
 
   是否展示 variant 的拆解列。默认为 false。
 
@@ -699,13 +700,15 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
   当 enable_adaptive_pipeline_task_serial_read_on_limit 开启时,scan 的并行度将会被设置为 1 
的行数阈值。默认值是 `10000`。
 
-***
+* `enable_auto_create_when_overwrite`
+
+  使用 `insert overwrite` 覆写自动分区表时,是否同时支持创建新分区,默认为 `false`。
 
-#### 关于语句执行超时控制的补充说明
+### 关于语句执行超时控制的补充说明
 
 * 控制手段
 
-    目前 doris 支持通过`variable`和`user 
property`两种体系来进行超时控制。其中均包含`qeury_timeout`和`insert_timeout`。
+    目前 doris 支持通过`variable`和`user 
property`两种体系来进行超时控制。其中均包含`query_timeout`和`insert_timeout`。
 
 * 优先次序
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index 56a0d43f685..846dd834eb0 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -72,8 +72,66 @@ INSERT OVERWRITE table table_name
 注意:
 
 1. 在当前版本中,会话变量 `enable_insert_strict` 默认为 `true`,如果执行 `INSERT OVERWRITE` 
语句时,对于有不符合目标表格式的数据被过滤掉的话会重写目标表失败(比如重写分区时,不满足所有分区条件的数据会被过滤)。
-2. 如果INSERT 
OVERWRITE的目标表是[AUTO-PARTITION表](../../../../advanced/partition/auto-partition),若未指定PARTITION(重写整表),那么可以创建新的分区。如果指定了覆写的PARTITION(包括通过
 `partition(*)` 语法自动检测并覆盖分区),那么在此过程中,AUTO 
PARTITION表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
-3. INSERT 
OVERWRITE语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+2. INSERT OVERWRITE 
语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+
+#### For Auto Partition Table
+
+如果 INSERT OVERWRITE 的目标表是自动分区表,那么行为受到 [Session 
Variable](../query/query-variables/variables#变量) 
`enable_auto_create_when_overwrite` 的控制,具体行为如下:
+1. 若未指定 PARTITION (覆写整表),当 `enable_auto_create_when_overwrite` 为 
`true`,在覆写整表已有数据的同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果 
`enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+2. 如果指定了覆写的PARTITION,那么在此过程中,AUTO PARTITION 
表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
+3. 若指定 PARTITION 为 `partition(*)` (自动检测分区并覆写),当 
`enable_auto_create_when_overwrite` 为 
`true`,对于那些在表中有对应分区的数据,覆写它们对应的分区,其他已有分区不变。同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果
 `enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+
+在没有 `enable_auto_create_when_overwrite` 的版本,行为如同该变量值为 `false`。
+
+示例如下:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 被覆写,new1 得到了新分区,其他分区数据未变
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- 整表原有数据被覆写,同时 new2 得到了新分区
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/delete-query-variables/variables.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/delete-query-variables/variables.md
index f0dd96a103b..002e2f78201 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/delete-query-variables/variables.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/delete-query-variables/variables.md
@@ -88,7 +88,7 @@ SET GLOBAL exec_mem_limit = 137438953472
 同时,变量设置也支持常量表达式。如:
 
 ```sql
-SET exec_mem_limit = 10 * 1024 * 1024 * 1024;
+SET exec_mem_limit = 10 - 1024 - 1024 - 1024;
 SET forward_to_master = concat('tr', 'u', 'e');
 ```
 
@@ -296,7 +296,7 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
   | cost             |
   +------------------+
   
-  mysql> select * from COST where COst.id < 100 order by cost.id;
+  mysql> select - from COST where COst.id < 100 order by cost.id;
   ```
 
   缺点是建表后无法获得建表语句中指定的表名,`show tables` 查看的表名为指定表名的小写。
@@ -305,7 +305,7 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
   缺点是同一语句中只能使用表名的一种大小写形式,例如对`cost` 表使用表名 `COST` 进行查询:
 
   ```sql
-  mysql> select * from COST where COST.id < 100 order by COST.id;
+  mysql> select - from COST where COST.id < 100 order by COST.id;
   ```
 
   该变量兼容 MySQL。需在集群初始化时通过 fe.conf 指定 
`lower_case_table_names=`进行配置,集群初始化完成后无法通过`set` 语句修改该变量,也无法通过重启、升级集群修改该变量。
@@ -555,27 +555,27 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
     用于控制查询 Hive 外表时是否过滤掉字段末尾的空格。默认为 false。
 
-* `skip_storage_engine_merge`
+- `skip_storage_engine_merge`
 
     用于调试目的。在向量化执行引擎中,当发现读取 Aggregate Key 模型或者 Unique Key 
模型的数据结果有问题的时候,把此变量的值设置为`true`,将会把 Aggregate Key 模型或者 Unique Key 模型的数据当成 
Duplicate Key 模型读取。
 
-* `skip_delete_predicate`
+- `skip_delete_predicate`
 
        用于调试目的。在向量化执行引擎中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被删除的数据当成正常数据读取。
 
-* `skip_delete_bitmap`
+- `skip_delete_bitmap`
 
     用于调试目的。在 Unique Key MoW 表中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被 delete 
bitmap 标记删除的数据当成正常数据读取。
 
-* `skip_missing_version`
+- `skip_missing_version`
 
     有些极端场景下,表的 Tablet 下的所有的所有副本都有版本缺失,使得这些 Tablet 
没有办法被恢复,导致整张表都不能查询。这个变量可以用来控制查询的行为,当设置为`true`时,查询会忽略 FE partition 中记录的 
visibleVersion,使用 replica version。如果 Be 上的 Replica 
有缺失的版本,则查询会直接跳过这些缺失的版本,只返回仍存在版本的数据。此外,查询将会总是选择所有存活的 BE 中所有 Replica 里 
lastSuccessVersion 
最大的那一个,这样可以尽可能的恢复更多的数据。这个变量应该只在上述紧急情况下才被设置为`true`,仅用于临时让表恢复查询。注意,此变量与 
use_fix_replica 变量冲突,当 use_fix_replica 变量不等于 -1 时,此变量会不起作用
 
-* `skip_bad_tablet`
+- `skip_bad_tablet`
 
     在某些情况下,用户某张单副本表中有大量数据,如果其中某个 Tablet 
损坏,将导致整张表无法查询。如果用户不关心数据的完整性,他们可以使用此变量暂时跳过坏的 Tablet 进行查询,并将剩余数据导入到新表中。
 
-* `default_password_lifetime`
+- `default_password_lifetime`
 
        默认的密码过期时间。默认值为 0,即表示不过期。单位为天。该参数只有当用户的密码过期属性为 DEFAULT 值时,才启用。如:
        
@@ -584,7 +584,7 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
        ALTER USER user1 PASSWORD_EXPIRE DEFAULT;
        ```
 
-* `password_history`
+- `password_history`
 
        默认的历史密码次数。默认值为 0,即不做限制。该参数只有当用户的历史密码次数属性为 DEFAULT 值时,才启用。如:
 
@@ -593,56 +593,56 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
   ALTER USER user1 PASSWORD_HISTORY DEFAULT;
   ```
 
-* `validate_password_policy`
+- `validate_password_policy`
 
        密码强度校验策略。默认为 `NONE` 或 `0`,即不做校验。可以设置为 `STRONG` 或 `2`。当设置为 `STRONG` 或 
`2` 时,通过 `ALTER USER` 或 `SET PASSWORD` 
命令设置密码时,密码必须包含“大写字母”,“小写字母”,“数字”和“特殊字符”中的 3 项,并且长度必须大于等于 
8。特殊字符包括:`~!@#$%^&*()_+|<>,.?/:;'[]{}"`。
 
-* `group_concat_max_len`
+- `group_concat_max_len`
 
     为了兼容某些 BI 工具能正确获取和设置该变量,变量值实际并没有作用。
 
-* `rewrite_or_to_in_predicate_threshold`
+- `rewrite_or_to_in_predicate_threshold`
 
     默认的改写 OR to IN 的 OR 数量阈值。默认值为 2,即表示有 2 个 OR 的时候,如果可以合并,则会改写成 IN。
 
-*   `group_by_and_having_use_alias_first`
+-   `group_by_and_having_use_alias_first`
 
     指定 group by 和 having 语句是否优先使用列的别名,而非从 From 语句里寻找列的名字。默认为 false。
 
-* `enable_file_cache`
+- `enable_file_cache`
 
     控制是否启用 block file cache,默认 false。该变量只有在 be.conf 中 enable_file_cache=true 
时才有效,如果 be.conf 中 enable_file_cache=false,该 BE 节点的 block file cache 处于禁用状态。
 
-* `file_cache_base_path`
+- `file_cache_base_path`
 
     指定 block file cache 在 BE 上的存储路径,默认 'random',随机选择 BE 配置的存储路径。
 
-* `enable_inverted_index_query`
+- `enable_inverted_index_query`
 
     控制是否启用 inverted index query,默认 true.
 
        
-* `topn_opt_limit_threshold`
+- `topn_opt_limit_threshold`
 
-    设置 topn 优化的 limit 阈值 (例如:SELECT * FROM t ORDER BY k LIMIT n). 如果 limit 的 n 
小于等于阈值,topn 相关优化(动态过滤下推、两阶段获取结果、按 key 的顺序读数据)会自动启用,否则会禁用。默认值是 1024。
+    设置 topn 优化的 limit 阈值 (例如:SELECT - FROM t ORDER BY k LIMIT n). 如果 limit 的 n 
小于等于阈值,topn 相关优化(动态过滤下推、两阶段获取结果、按 key 的顺序读数据)会自动启用,否则会禁用。默认值是 1024。
 
-* `drop_table_if_ctas_failed`
+- `drop_table_if_ctas_failed`
 
     控制 create table as select 在写入发生错误时是否删除已创建的表,默认为 true。
 
-* `show_user_default_role`
+- `show_user_default_role`
 
     
 
     控制是否在 `show roles` 的结果里显示每个用户隐式对应的角色。默认为 false。
 
-* `use_fix_replica`
+- `use_fix_replica`
 
     
 
     使用固定 replica 进行查询。replica 从 0 开始,如果 use_fix_replica 为 0,则使用最小的,如果 
use_fix_replica 为 1,则使用第二个最小的,依此类推。默认值为 -1,表示未启用。
 
-* `dry_run_query`
+- `dry_run_query`
 
     
 
@@ -651,7 +651,7 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
     该参数可以用于测试返回大量数据集时,规避结果集传输的耗时,重点关注底层查询执行的耗时。
 
     ```sql
-    mysql> select * from bigtable;
+    mysql> select - from bigtable;
     +--------------+
     | ReturnedRows |
     +--------------+
@@ -659,31 +659,31 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
     +--------------+
     ```
   
-* `enable_parquet_lazy_materialization`
+- `enable_parquet_lazy_materialization`
 
   控制 parquet reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_orc_lazy_materialization`
+- `enable_orc_lazy_materialization`
 
   控制 orc reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_strong_consistency_read`
+- `enable_strong_consistency_read`
 
   用以开启强一致读。Doris 默认支持同一个会话内的强一致性,即同一个会话内对数据的变更操作是实时可见的。如需要会话间的强一致读,则需将此变量设置为 
true。
 
-* `truncate_char_or_varchar_columns`
+- `truncate_char_or_varchar_columns`
 
   是否按照表的 schema 来截断 char 或者 varchar 列。默认为 false。
 
   因为外表会存在表的 schema 中 char 或者 varchar 列的最大长度和底层 parquet 或者 orc 文件中的 schema 
不一致的情况。此时开启改选项,会按照表的 schema 中的最大长度进行截断。
 
-* `jdbc_clickhouse_query_final`
+- `jdbc_clickhouse_query_final`
 
   是否在使用 JDBC Catalog 功能查询 ClickHouse 时增加 final 关键字,默认为 false
 
   用于 ClickHouse 的 ReplacingMergeTree 表引擎查询去重
 
-* `enable_memtable_on_sink_node`
+- `enable_memtable_on_sink_node`
 
   :::info 备注
   该变量自 Doris 2.1.0 版本起支持。
@@ -694,7 +694,7 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
   在 DataSink 节点上构建 MemTable,并通过 brpc streaming 发送 segment 到其他 BE。
   该方法减少了多副本之间的重复工作,并且节省了数据序列化和反序列化的时间。
 
-* `enable_unique_key_partial_update`
+- `enable_unique_key_partial_update`
 
   :::info 备注
   该变量自 Doris 2.0.2 版本起支持。
@@ -703,7 +703,7 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
   是否在对 insert into 语句启用部分列更新的语义,默认为 false。需要注意的是,控制 insert 
语句是否开启严格模式的会话变量`enable_insert_strict`的默认值为 true,即 insert 
语句默认开启严格模式,而在严格模式下进行部分列更新不允许更新不存在的 key。所以,在使用 insert 语句进行部分列更新的时候如果希望能插入不存在的 
key,需要在`enable_unique_key_partial_update`设置为 true 
的基础上同时将`enable_insert_strict`设置为 false。
   
 
-* `describe_extend_variant_column`
+- `describe_extend_variant_column`
 
   是否展示 variant 的拆解列。默认为 false。
 
@@ -715,21 +715,23 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
   当 enable_adaptive_pipeline_task_serial_read_on_limit 开启时,scan 的并行度将会被设置为 1 
的行数阈值。默认值是 `10000`。
 
-***
+* `enable_auto_create_when_overwrite`
+
+  使用 `insert overwrite` 覆写自动分区表时,是否同时支持创建新分区,默认为 `false`。
 
-#### 关于语句执行超时控制的补充说明
+### 关于语句执行超时控制的补充说明
 
-* 控制手段
+- 控制手段
 
     目前 doris 支持通过`variable`和`user 
property`两种体系来进行超时控制。其中均包含`qeury_timeout`和`insert_timeout`。
 
-* 优先次序
+- 优先次序
 
     超时生效的优先级次序是:`session variable` > `user property` > `global variable` > 
`default value`
 
     较高优先级的变量未设置时,会自动采用下一个优先级的数值。
 
-* 相关语义
+- 相关语义
 
     `query_timeout`用于控制所有语句的超时,`insert_timeout`特定用于控制 INSERT 语句的超时,在执行 INSERT 
语句时,超时时间会取
     
@@ -739,6 +741,6 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
     
     并且不具备`quota`语义。
 
-* 注意事项
+- 注意事项
 
     `user property`设置的超时时间需要客户端重连后触发。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index ff8fd95f2e1..04b20d01f90 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -73,8 +73,66 @@ INSERT OVERWRITE table table_name
 注意:
 
 1. 在当前版本中,会话变量 `enable_insert_strict` 默认为 `true`,如果执行 `INSERT OVERWRITE` 
语句时,对于有不符合目标表格式的数据被过滤掉的话会重写目标表失败(比如重写分区时,不满足所有分区条件的数据会被过滤)。
-2. 如果INSERT 
OVERWRITE的目标表是[AUTO-PARTITION表](../../../../advanced/partition/auto-partition),若未指定PARTITION(重写整表),那么可以创建新的分区。如果指定了覆写的PARTITION(包括通过
 `partition(*)` 语法自动检测并覆盖分区),那么在此过程中,AUTO 
PARTITION表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
-3. INSERT 
OVERWRITE语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+2. INSERT OVERWRITE 
语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+
+#### For Auto Partition Table
+
+如果 INSERT OVERWRITE 的目标表是自动分区表,那么行为受到 [Session 
Variable](../../../../query/query-variables/variables#变量) 
`enable_auto_create_when_overwrite` 的控制,具体行为如下:
+1. 若未指定 PARTITION (覆写整表),当 `enable_auto_create_when_overwrite` 为 
`true`,在覆写整表已有数据的同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果 
`enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+2. 如果指定了覆写的 PARTITION,那么在此过程中,AUTO PARTITION 
表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
+3. 若指定 PARTITION 为 `partition(*)` (自动检测分区并覆写),当 
`enable_auto_create_when_overwrite` 为 
`true`,对于那些在表中有对应分区的数据,覆写它们对应的分区,其他已有分区不变。同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果
 `enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+
+`enable_auto_create_when_overwrite` 自 2.1.6 引入,在没有 
`enable_auto_create_when_overwrite` 的版本,行为如同该变量值为 `false`。
+
+示例如下:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 被覆写,new1 得到了新分区,其他分区数据未变
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- 整表原有数据被覆写,同时 new2 得到了新分区
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/query-variables/variables.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/query-variables/variables.md
index e8ad473a458..9a7cb6d03cc 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/query-variables/variables.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/query-variables/variables.md
@@ -88,7 +88,7 @@ SET GLOBAL exec_mem_limit = 137438953472
 同时,变量设置也支持常量表达式。如:
 
 ```sql
-SET exec_mem_limit = 10 * 1024 * 1024 * 1024;
+SET exec_mem_limit = 10 - 1024 - 1024 - 1024;
 SET forward_to_master = concat('tr', 'u', 'e');
 ```
 
@@ -296,7 +296,7 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
   | cost             |
   +------------------+
   
-  mysql> select * from COST where COst.id < 100 order by cost.id;
+  mysql> select - from COST where COst.id < 100 order by cost.id;
   ```
 
   缺点是建表后无法获得建表语句中指定的表名,`show tables` 查看的表名为指定表名的小写。
@@ -305,7 +305,7 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
   缺点是同一语句中只能使用表名的一种大小写形式,例如对`cost` 表使用表名 `COST` 进行查询:
 
   ```sql
-  mysql> select * from COST where COST.id < 100 order by COST.id;
+  mysql> select - from COST where COST.id < 100 order by COST.id;
   ```
 
   该变量兼容 MySQL。需在集群初始化时通过 fe.conf 指定 
`lower_case_table_names=`进行配置,集群初始化完成后无法通过`set` 语句修改该变量,也无法通过重启、升级集群修改该变量。
@@ -555,27 +555,27 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
     用于控制查询 Hive 外表时是否过滤掉字段末尾的空格。默认为 false。
 
-* `skip_storage_engine_merge`
+- `skip_storage_engine_merge`
 
     用于调试目的。在向量化执行引擎中,当发现读取 Aggregate Key 模型或者 Unique Key 
模型的数据结果有问题的时候,把此变量的值设置为`true`,将会把 Aggregate Key 模型或者 Unique Key 模型的数据当成 
Duplicate Key 模型读取。
 
-* `skip_delete_predicate`
+- `skip_delete_predicate`
 
        用于调试目的。在向量化执行引擎中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被删除的数据当成正常数据读取。
 
-* `skip_delete_bitmap`
+- `skip_delete_bitmap`
 
     用于调试目的。在 Unique Key MoW 表中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被 delete 
bitmap 标记删除的数据当成正常数据读取。
 
-* `skip_missing_version`
+- `skip_missing_version`
 
     有些极端场景下,表的 Tablet 下的所有的所有副本都有版本缺失,使得这些 Tablet 
没有办法被恢复,导致整张表都不能查询。这个变量可以用来控制查询的行为,当设置为`true`时,查询会忽略 FE partition 中记录的 
visibleVersion,使用 replica version。如果 Be 上的 Replica 
有缺失的版本,则查询会直接跳过这些缺失的版本,只返回仍存在版本的数据。此外,查询将会总是选择所有存活的 BE 中所有 Replica 里 
lastSuccessVersion 
最大的那一个,这样可以尽可能的恢复更多的数据。这个变量应该只在上述紧急情况下才被设置为`true`,仅用于临时让表恢复查询。注意,此变量与 
use_fix_replica 变量冲突,当 use_fix_replica 变量不等于 -1 时,此变量会不起作用
 
-* `skip_bad_tablet`
+- `skip_bad_tablet`
 
     在某些情况下,用户某张单副本表中有大量数据,如果其中某个 Tablet 
损坏,将导致整张表无法查询。如果用户不关心数据的完整性,他们可以使用此变量暂时跳过坏的 Tablet 进行查询,并将剩余数据导入到新表中。
 
-* `default_password_lifetime`
+- `default_password_lifetime`
 
        默认的密码过期时间。默认值为 0,即表示不过期。单位为天。该参数只有当用户的密码过期属性为 DEFAULT 值时,才启用。如:
        
@@ -583,111 +583,111 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
        CREATE USER user1 IDENTIFIED BY "12345" PASSWORD_EXPIRE DEFAULT;
        ALTER USER user1 PASSWORD_EXPIRE DEFAULT;
        ```
-* `password_history`
+- `password_history`
 
        默认的历史密码次数。默认值为0,即不做限制。该参数只有当用户的历史密码次数属性为 DEFAULT 值时,才启用。如:
 
-       ```
+```sql
        CREATE USER user1 IDENTIFIED BY "12345" PASSWORD_HISTORY DEFAULT;
        ALTER USER user1 PASSWORD_HISTORY DEFAULT;
-       ```
+```
 
-* `validate_password_policy`
+- `validate_password_policy`
 
        密码强度校验策略。默认为 `NONE` 或 `0`,即不做校验。可以设置为 `STRONG` 或 `2`。当设置为 `STRONG` 或 
`2` 时,通过 `ALTER USER` 或 `SET PASSWORD` 
命令设置密码时,密码必须包含“大写字母”,“小写字母”,“数字”和“特殊字符”中的 3 项,并且长度必须大于等于 
8。特殊字符包括:`~!@#$%^&*()_+|<>,.?/:;'[]{}"`。
 
-* `group_concat_max_len`
+- `group_concat_max_len`
 
     为了兼容某些 BI 工具能正确获取和设置该变量,变量值实际并没有作用。
 
-* `rewrite_or_to_in_predicate_threshold`
+- `rewrite_or_to_in_predicate_threshold`
 
     默认的改写 OR to IN 的 OR 数量阈值。默认值为 2,即表示有 2 个 OR 的时候,如果可以合并,则会改写成 IN。
 
-*   `group_by_and_having_use_alias_first`
+-   `group_by_and_having_use_alias_first`
 
     指定 group by 和 having 语句是否优先使用列的别名,而非从 From 语句里寻找列的名字。默认为 false。
 
-* `enable_file_cache`
+- `enable_file_cache`
 
     控制是否启用 block file cache,默认 false。该变量只有在 be.conf 中 enable_file_cache=true 
时才有效,如果 be.conf 中 enable_file_cache=false,该 BE 节点的 block file cache 处于禁用状态。
 
-* `file_cache_base_path`
+- `file_cache_base_path`
 
     指定 block file cache 在 BE 上的存储路径,默认 'random',随机选择 BE 配置的存储路径。
 
-* `enable_inverted_index_query`
+- `enable_inverted_index_query`
 
     控制是否启用 inverted index query,默认 true.
 
        
-* `topn_opt_limit_threshold`
+- `topn_opt_limit_threshold`
 
-    设置 topn 优化的 limit 阈值 (例如:SELECT * FROM t ORDER BY k LIMIT n). 如果 limit 的 n 
小于等于阈值,topn 相关优化(动态过滤下推、两阶段获取结果、按 key 的顺序读数据)会自动启用,否则会禁用。默认值是 1024。
+    设置 topn 优化的 limit 阈值 (例如:SELECT - FROM t ORDER BY k LIMIT n). 如果 limit 的 n 
小于等于阈值,topn 相关优化(动态过滤下推、两阶段获取结果、按 key 的顺序读数据)会自动启用,否则会禁用。默认值是 1024。
 
-* `drop_table_if_ctas_failed`
+- `drop_table_if_ctas_failed`
 
     控制 create table as select 在写入发生错误时是否删除已创建的表,默认为 true。
 
-* `show_user_default_role`
+- `show_user_default_role`
 
     控制是否在 `show roles` 的结果里显示每个用户隐式对应的角色。默认为 false。
 
-* `use_fix_replica`
+- `use_fix_replica`
 
     使用固定 replica 进行查询。replica 从 0 开始,如果 use_fix_replica 为 0,则使用最小的,如果 
use_fix_replica 为 1,则使用第二个最小的,依此类推。默认值为 -1,表示未启用。
 
-* `dry_run_query`
+- `dry_run_query`
 
     如果设置为 true,对于查询请求,将不再返回实际结果集,而仅返回行数。对于导入和 insert,Sink 丢掉了数据,不会有实际的写发生。额默认为 
false。
 
     该参数可以用于测试返回大量数据集时,规避结果集传输的耗时,重点关注底层查询执行的耗时。
 
-    ```
-    mysql> select * from bigtable;
+  ```sql
+    mysql> select - from bigtable;
     +--------------+
     | ReturnedRows |
     +--------------+
     | 10000000     |
     +--------------+
-    ```
+  ```
   
-* `enable_parquet_lazy_materialization`
+- `enable_parquet_lazy_materialization`
 
   控制 parquet reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_orc_lazy_materialization`
+- `enable_orc_lazy_materialization`
 
   控制 orc reader 是否启用延迟物化技术。默认为 true。
 
-* `enable_strong_consistency_read`
+- `enable_strong_consistency_read`
 
   用以开启强一致读。Doris 默认支持同一个会话内的强一致性,即同一个会话内对数据的变更操作是实时可见的。如需要会话间的强一致读,则需将此变量设置为 
true。
 
-* `truncate_char_or_varchar_columns`
+- `truncate_char_or_varchar_columns`
 
   是否按照表的 schema 来截断 char 或者 varchar 列。默认为 false。
 
   因为外表会存在表的 schema 中 char 或者 varchar 列的最大长度和底层 parquet 或者 orc 文件中的 schema 
不一致的情况。此时开启改选项,会按照表的 schema 中的最大长度进行截断。
 
-* `jdbc_clickhouse_query_final`
+- `jdbc_clickhouse_query_final`
 
   是否在使用 JDBC Catalog 功能查询 ClickHouse 时增加 final 关键字,默认为 false
 
   用于 ClickHouse 的 ReplacingMergeTree 表引擎查询去重
 
-* `enable_memtable_on_sink_node`
+- `enable_memtable_on_sink_node`
   
   是否在数据导入中启用 MemTable 前移,默认为 true
 
   在 DataSink 节点上构建 MemTable,并通过 brpc streaming 发送 segment 到其他 BE。
   该方法减少了多副本之间的重复工作,并且节省了数据序列化和反序列化的时间。
 
-* `enable_unique_key_partial_update`
+- `enable_unique_key_partial_update`
 
   是否在对 insert into 语句启用部分列更新的语义,默认为 false。需要注意的是,控制 insert 
语句是否开启严格模式的会话变量`enable_insert_strict`的默认值为 true,即 insert 
语句默认开启严格模式,而在严格模式下进行部分列更新不允许更新不存在的 key。所以,在使用 insert 语句进行部分列更新的时候如果希望能插入不存在的 
key,需要在`enable_unique_key_partial_update`设置为 true 
的基础上同时将`enable_insert_strict`设置为 false。
 
-* `describe_extend_variant_column`
+- `describe_extend_variant_column`
 
   是否展示 variant 的拆解列。默认为 false。
 
@@ -699,21 +699,23 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
 
   当 enable_adaptive_pipeline_task_serial_read_on_limit 开启时,scan 的并行度将会被设置为 1 
的行数阈值。默认值是 `10000`。
 
-***
+* `enable_auto_create_when_overwrite`
+
+  使用 `insert overwrite` 覆写自动分区表时,是否同时支持创建新分区,默认为 `false`。
 
-#### 关于语句执行超时控制的补充说明
+### 关于语句执行超时控制的补充说明
 
-* 控制手段
+- 控制手段
 
     目前 doris 支持通过`variable`和`user 
property`两种体系来进行超时控制。其中均包含`qeury_timeout`和`insert_timeout`。
 
-* 优先次序
+- 优先次序
 
     超时生效的优先级次序是:`session variable` > `user property` > `global variable` > 
`default value`
 
     较高优先级的变量未设置时,会自动采用下一个优先级的数值。
 
-* 相关语义
+- 相关语义
 
     `query_timeout`用于控制所有语句的超时,`insert_timeout`特定用于控制 INSERT 语句的超时,在执行 INSERT 
语句时,超时时间会取
     
@@ -723,6 +725,6 @@ try (Connection conn = 
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
     
     并且不具备`quota`语义。
 
-* 注意事项
+- 注意事项
 
     `user property`设置的超时时间需要客户端重连后触发。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index 6f397eea400..c59c3922a2d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -72,8 +72,66 @@ INSERT OVERWRITE table table_name
 注意:
 
 1. 在当前版本中,会话变量 `enable_insert_strict` 默认为 `true`,如果执行 `INSERT OVERWRITE` 
语句时,对于有不符合目标表格式的数据被过滤掉的话会重写目标表失败(比如重写分区时,不满足所有分区条件的数据会被过滤)。
-2. 如果INSERT 
OVERWRITE的目标表是[AUTO-PARTITION表](../../../../advanced/partition/auto-partition),若未指定PARTITION(重写整表),那么可以创建新的分区。如果指定了覆写的PARTITION(包括通过
 `partition(*)` 语法自动检测并覆盖分区),那么在此过程中,AUTO 
PARTITION表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
-3. INSERT 
OVERWRITE语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+2. INSERT OVERWRITE 
语句会首先创建一个新表,将需要重写的数据插入到新表中,最后原子性的用新表替换旧表并修改名称。因此,在重写表的过程中,旧表中的数据在重写完毕之前仍然可以正常访问。
+
+#### For Auto Partition Table
+
+如果 INSERT OVERWRITE 的目标表是自动分区表,那么行为受到 [Session 
Variable](../../../../query/query-variables/variables#变量) 
`enable_auto_create_when_overwrite` 的控制,具体行为如下:
+1. 若未指定 PARTITION (覆写整表),当 `enable_auto_create_when_overwrite` 为 
`true`,在覆写整表已有数据的同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果 
`enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+2. 如果指定了覆写的 PARTITION,那么在此过程中,AUTO PARTITION 
表表现得如同普通分区表一样,不满足现有分区条件的数据将被过滤,而非创建新的分区。
+3. 若指定 PARTITION 为 `partition(*)` (自动检测分区并覆写),当 
`enable_auto_create_when_overwrite` 为 
`true`,对于那些在表中有对应分区的数据,覆写它们对应的分区,其他已有分区不变。同时,对于没有对应分区的数据,按照该表的自动分区规则创建分区,并容纳这些原本没有对应分区的数据。如果
 `enable_auto_create_when_overwrite` 为 `false`,未找到分区的数据将累计错误行直到失败。
+
+`enable_auto_create_when_overwrite` 自 3.0.1 引入,在没有 
`enable_auto_create_when_overwrite` 的版本,行为如同该变量值为 `false`。
+
+示例如下:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 被覆写,new1 得到了新分区,其他分区数据未变
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- 整表原有数据被覆写,同时 new2 得到了新分区
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 
diff --git 
a/versioned_docs/version-2.1/query-data/delete-query-variables/variables.md 
b/versioned_docs/version-2.1/query-data/delete-query-variables/variables.md
index 0e5bc52e3d8..936e3847a91 100644
--- a/versioned_docs/version-2.1/query-data/delete-query-variables/variables.md
+++ b/versioned_docs/version-2.1/query-data/delete-query-variables/variables.md
@@ -727,9 +727,11 @@ This feature is supported since the Apache Doris 2.0.2 
version
     When `enable_adaptive_pipeline_task_serial_read_on_limit` is enabled, the 
number of rows at which the parallelism of the scan will be set to 1.
     Default value is `10000`
 
-***
+* `enable_auto_create_when_overwrite`
 
-#### Supplementary instructions on statement execution timeout control
+  Whether or not to support the creation of new partitions at the same time 
when using `insert overwrite` to overwrite an Auto Partition table, defaults to 
`false`.
+
+### Supplementary instructions on statement execution timeout control
 
 * Means of control
 
diff --git 
a/versioned_docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/versioned_docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index 71cc3176365..e89fcb480da 100644
--- 
a/versioned_docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/versioned_docs/version-2.1/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -72,8 +72,66 @@ INSERT OVERWRITE table table_name
 Notice:
 
 1. In the current version, the session variable `enable_insert_strict` is set 
to `true` by default. If some data that does not conform to the format of the 
target table is filtered out during the execution of the `INSERT OVERWRITE` 
statement, such as when overwriting a partition and not all partition 
conditions are satisfied, overwriting the target table will fail.
-2. If the target table of the INSERT OVERWRITE is an 
[AUTO-PARTITION-table](../../../../advanced/partition/auto-partition), then new 
partitions can be created if PARTITION is not specified (that is, rewrite the 
whole table). If PARTITION for overwrite is specified(Includes automatic 
detection and overwriting of partitions through the `partition(*)` syntax), 
then the AUTO PARTITION table behaves as if it were a normal partitioned table 
during this process, and data that does not satisfy t [...]
-3. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+2. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+
+#### For Auto Partition Table
+
+If the target table of the INSERT OVERWRITE is an autopartitioned table, the 
behaviour is controlled by the [Session 
Variable](../../../../query/query-variables/variables#variable)  
`enable_auto_create_when_overwrite` controls the behaviour as follows:
+1. If PARTITION is not specified (overwrite the whole table), when 
`enable_auto_create_when_overwrite` is `true`, the table is overwritten and 
partitions are created according to the table's auto-partitioning rules for 
data that does not have a corresponding partition, and those datas is admit. If 
`enable_auto_create_when_overwrite` is `false`, data for which no partition is 
found will accumulate error rows until it fails.
+2. If an overwrite PARTITION is specified, the AUTO PARTITION table behaves as 
a normal partitioned table during this process, and data that does not satisfy 
the conditions of an existing partition is filtered instead of creating a new 
partition.
+3. If you specify PARTITION as `partition(*)` (auto detect partition and 
overwrite), when `enable_auto_create_when_overwrite` is `true`, for the data 
that have corresponding partitions in the table, overwrite their corresponding 
partitions, and leave the other existing partitions unchanged. At the same 
time, for data without corresponding partitions, create partitions according to 
the table's auto-partitioning rules, and accommodate the data without 
corresponding partitions. If `enable_a [...]
+
+`enable_auto_create_when_overwrite` was introduced since 2.1.6. In versions 
without `enable_auto_create_when_overwrite`, the behaviour is as if the 
variable had a value of `false`.
+
+Examples are shown below:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 is overwritten, new1 gets the new partition, and the other 
partitions remain unchanged.
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- The whole table is overwritten, and new2 gets the new 
partition.
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 
diff --git a/versioned_docs/version-3.0/query/query-variables/variables.md 
b/versioned_docs/version-3.0/query/query-variables/variables.md
index d3692081161..e53cdee2b16 100644
--- a/versioned_docs/version-3.0/query/query-variables/variables.md
+++ b/versioned_docs/version-3.0/query/query-variables/variables.md
@@ -709,9 +709,11 @@ Optional values:
     When `enable_adaptive_pipeline_task_serial_read_on_limit` is enabled, the 
number of rows at which the parallelism of the scan will be set to 1.
     Default value is `10000`
 
-***
+* `enable_auto_create_when_overwrite`
 
-#### Supplementary instructions on statement execution timeout control
+  Whether or not to support the creation of new partitions at the same time 
when using `insert overwrite` to overwrite an Auto Partition table, defaults to 
`false`.
+
+### Supplementary instructions on statement execution timeout control
 
 * Means of control
 
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
 
b/versioned_docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
index 514635adcd3..4f8836d0e47 100644
--- 
a/versioned_docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-statements/Data-Manipulation-Statements/Manipulation/INSERT-OVERWRITE.md
@@ -72,8 +72,66 @@ INSERT OVERWRITE table table_name
 Notice:
 
 1. In the current version, the session variable `enable_insert_strict` is set 
to `true` by default. If some data that does not conform to the format of the 
target table is filtered out during the execution of the `INSERT OVERWRITE` 
statement, such as when overwriting a partition and not all partition 
conditions are satisfied, overwriting the target table will fail.
-2. If the target table of the INSERT OVERWRITE is an 
[AUTO-PARTITION-table](../../../../advanced/partition/auto-partition), then new 
partitions can be created if PARTITION is not specified (that is, rewrite the 
whole table). If PARTITION for overwrite is specified(Includes automatic 
detection and overwriting of partitions through the `partition(*)` syntax), 
then the AUTO PARTITION table behaves as if it were a normal partitioned table 
during this process, and data that does not satisfy t [...]
-3. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+2. The `INSERT OVERWRITE` statement first creates a new table, inserts the 
data to be overwritten into the new table, and then atomically replaces the old 
table with the new table and modifies its name. Therefore, during the process 
of overwriting the table, the data in the old table can still be accessed 
normally until the overwriting is completed.
+
+#### For Auto Partition Table
+
+If the target table of the INSERT OVERWRITE is an autopartitioned table, the 
behaviour is controlled by the [Session 
Variable](../../../../query/query-variables/variables#variable)  
`enable_auto_create_when_overwrite` controls the behaviour as follows:
+1. If PARTITION is not specified (overwrite the whole table), when 
`enable_auto_create_when_overwrite` is `true`, the table is overwritten and 
partitions are created according to the table's auto-partitioning rules for 
data that does not have a corresponding partition, and those datas is admit. If 
`enable_auto_create_when_overwrite` is `false`, data for which no partition is 
found will accumulate error rows until it fails.
+2. If an overwrite PARTITION is specified, the AUTO PARTITION table behaves as 
a normal partitioned table during this process, and data that does not satisfy 
the conditions of an existing partition is filtered instead of creating a new 
partition.
+3. If you specify PARTITION as `partition(*)` (auto detect partition and 
overwrite), when `enable_auto_create_when_overwrite` is `true`, for the data 
that have corresponding partitions in the table, overwrite their corresponding 
partitions, and leave the other existing partitions unchanged. At the same 
time, for data without corresponding partitions, create partitions according to 
the table's auto-partitioning rules, and accommodate the data without 
corresponding partitions. If `enable_a [...]
+
+`enable_auto_create_when_overwrite` was introduced since 3.0.1. In versions 
without `enable_auto_create_when_overwrite`, the behaviour is as if the 
variable had a value of `false`.
+
+Examples are shown below:
+
+```sql
+mysql> create table auto_list(
+    ->              k0 varchar null
+    ->          )
+    ->          auto partition by list (k0)
+    ->          (
+    ->              PARTITION p1 values in (("Beijing"), ("BEIJING")),
+    ->              PARTITION p2 values in (("Shanghai"), ("SHANGHAI")),
+    ->              PARTITION p3 values in (("xxx"), ("XXX")),
+    ->              PARTITION p4 values in (("list"), ("LIST")),
+    ->              PARTITION p5 values in (("1234567"), ("7654321"))
+    ->          )
+    ->          DISTRIBUTED BY HASH(`k0`) BUCKETS 1
+    ->          properties("replication_num" = "1");
+Query OK, 0 rows affected (0.14 sec)
+
+mysql> insert into auto_list values 
("Beijing"),("Shanghai"),("xxx"),("list"),("1234567");
+Query OK, 5 rows affected (0.22 sec)
+
+mysql> insert overwrite table auto_list partition(*) values ("BEIJING"), 
("new1");
+Query OK, 2 rows affected (0.28 sec)
+
+mysql> select * from auto_list;
++----------+ --- p1 is overwritten, new1 gets the new partition, and the other 
partitions remain unchanged.
+| k0       |
++----------+
+| 1234567  |
+| BEIJING  |
+| list     |
+| xxx      |
+| new1     |
+| Shanghai |
++----------+
+6 rows in set (0.48 sec)
+
+mysql> insert overwrite table auto_list values ("SHANGHAI"), ("new2");
+Query OK, 2 rows affected (0.17 sec)
+
+mysql> select * from auto_list;
++----------+ --- The whole table is overwritten, and new2 gets the new 
partition.
+| k0       |
++----------+
+| new2     |
+| SHANGHAI |
++----------+
+2 rows in set (0.15 sec)
+```
 
 ### Example
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to