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

luzhijing 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 a550816e4a [Doc](auto-partition) Forbid use Auto and Dynamic partition 
at the same time (#563)
a550816e4a is described below

commit a550816e4ac684b786c752e40e8ddb77196965ed
Author: zclllyybb <[email protected]>
AuthorDate: Thu Apr 18 12:11:20 2024 +0800

    [Doc](auto-partition) Forbid use Auto and Dynamic partition at the same 
time (#563)
---
 docs/advanced/partition/auto-partition.md          | 58 ++--------------------
 .../current/advanced/partition/auto-partition.md   | 58 ++--------------------
 .../advanced/partition/auto-partition.md           | 58 ++--------------------
 .../advanced/partition/auto-partition.md           | 58 ++--------------------
 4 files changed, 16 insertions(+), 216 deletions(-)

diff --git a/docs/advanced/partition/auto-partition.md 
b/docs/advanced/partition/auto-partition.md
index 6805ace754..bbcae7da2e 100644
--- a/docs/advanced/partition/auto-partition.md
+++ b/docs/advanced/partition/auto-partition.md
@@ -251,61 +251,11 @@ A partition created by the AUTO PARTITION function has 
the exact same functional
 
 ## Coupled with dynamic partitioning
 
-AUTO PARTITION is supported on the same table as [DYNAMIC 
PARTITION](./dynamic-partition). for example:
+To make the partitioning logic clear, Doris prohibits Auto Partition and 
Dynamic Partition from working together on a single table. This usage is prone 
to misuse and should be replaced by a separate Auto Partition function.
 
-```sql
-CREATE TABLE tbl3
-(
-    k1 DATETIME NOT NULL,
-    col1 int 
-)
-AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year') ())
-DISTRIBUTED BY HASH(k1)
-PROPERTIES
-(
-    "replication_num" = "1",
-    "dynamic_partition.create_history_partition"="true",
-    "dynamic_partition.enable" = "true",
-    "dynamic_partition.time_unit" = "year",
-    "dynamic_partition.start" = "-2",
-    "dynamic_partition.end" = "2",
-    "dynamic_partition.prefix" = "p",
-    "dynamic_partition.buckets" = "8"
-); 
-```
-
-When the two functions are used in combination, neither of their original 
functions is affected and they still act on the entire table. The behavior 
includes but is not limited to:
-
-1. regardless of the creation method, the expired historical partitions will 
be periodically cleaned up or transferred to cold storage according to the 
rules specified by the DYNAMIC PARTITION properties
-2. partition ranges cannot overlap or conflict. If a new partition range that 
needs to be created by DYNAMIC PARTITION has already been covered by an 
automatically or manually created partition, the partition creation will fail 
without affecting the business process.
-
-The principle is that AUTO PARTITION is only a complementary means introduced 
to the creation of partitions, and that a partition, whether created manually, 
by AUTO PARTITION, or by DYNAMIC PARTITION, will be governed by DYNAMIC 
PARTITION functions.
-
-### Constraint
-
-In order to simplify the behavioral pattern of combine two partition methods, 
when the AUTO PARTITION and DYNAMIC PARTITION are both used, the **partition 
intervals of the two must be consistent** or the table creating will fail:
-
-```sql
-mysql > CREATE TABLE tbl3
-        (
-            k1 DATETIME NOT NULL,
-            col1 int 
-        )
-        AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year') ())
-        DISTRIBUTED BY HASH(k1)
-        PROPERTIES
-        (
-            "replication_num" = "1",
-            "dynamic_partition.create_history_partition"="true",
-            "dynamic_partition.enable" = "true",
-            "dynamic_partition.time_unit" = "HOUR",
-            "dynamic_partition.start" = "-2",
-            "dynamic_partition.end" = "2",
-            "dynamic_partition.prefix" = "p",
-            "dynamic_partition.buckets" = "8"
-        ); 
-ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = 
If support auto partition and dynamic partition at same time, they must have 
the same interval unit.
-```
+:::caution
+In some early versions of Doris 2.1, this feature is not disabled, but is not 
recommended.
+:::
 
 ## caveat
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/advanced/partition/auto-partition.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/advanced/partition/auto-partition.md
index f0d2d21239..38d629505b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/advanced/partition/auto-partition.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/advanced/partition/auto-partition.md
@@ -251,61 +251,11 @@ mysql> show partitions from `DAILY_TRADE_VALUE`;
 
 ## 与动态分区联用
 
-自动分区支持与[动态分区](./dynamic-partition)同时作用于同一张表上,例如:
+为使分区逻辑清晰,Doris 禁止自动分区(Auto Partition)和动态分区(Dynamic 
Partition)同时作用于一张表上,这种用法容易引发误用,应当以单独的自动分区功能代替。
 
-```sql
-CREATE TABLE tbl3
-(
-    k1 DATETIME NOT NULL,
-    col1 int 
-)
-AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year')) ()
-DISTRIBUTED BY HASH(k1)
-PROPERTIES
-(
-    "replication_num" = "1",
-    "dynamic_partition.create_history_partition"="true",
-    "dynamic_partition.enable" = "true",
-    "dynamic_partition.time_unit" = "year",
-    "dynamic_partition.start" = "-2",
-    "dynamic_partition.end" = "2",
-    "dynamic_partition.prefix" = "p",
-    "dynamic_partition.buckets" = "8"
-); 
-```
-
-当两种功能联用时,它们的原始功能均不受影响,依旧作用于整张表上,行为包括但不限于:
-
-1. 无论创建方式如何,过期的历史分区都会按动态分区功能指定的规则定期清理或转入冷存储
-2. 分区范围不能重叠、冲突。如果动态分区需要创建的新分区范围已经被自动或手动创建的分区覆盖,则该分区创建会失败,但不影响业务过程。
-
-其原则在于,自动分区仅是对创建分区引入的一种补充手段,一个分区无论是手动、经自动分区创建,还是经动态分区创建的,均会受到动态分区的管理。
-
-### 限制
-
-为简化两种分区方式联用的行为模式,当前自动分区和动态分区联用时,两者的**分区间隔必须一致**,否则建表将会失败:
-
-```sql
-mysql > CREATE TABLE tbl3
-        (
-            k1 DATETIME NOT NULL,
-            col1 int 
-        )
-        AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year')) ()
-        DISTRIBUTED BY HASH(k1)
-        PROPERTIES
-        (
-            "replication_num" = "1",
-            "dynamic_partition.create_history_partition"="true",
-            "dynamic_partition.enable" = "true",
-            "dynamic_partition.time_unit" = "HOUR",
-            "dynamic_partition.start" = "-2",
-            "dynamic_partition.end" = "2",
-            "dynamic_partition.prefix" = "p",
-            "dynamic_partition.buckets" = "8"
-        ); 
-ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = 
If support auto partition and dynamic partition at same time, they must have 
the same interval unit.
-```
+:::caution
+在 Doris 2.1 的某些早期版本中,该功能未被禁止,但不推荐使用。
+:::
 
 ## 注意事项
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/advanced/partition/auto-partition.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/advanced/partition/auto-partition.md
index b01080173a..538d6848d5 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/advanced/partition/auto-partition.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/advanced/partition/auto-partition.md
@@ -255,61 +255,11 @@ mysql> show partitions from `DAILY_TRADE_VALUE`;
 
 ## 与动态分区联用
 
-自动分区支持与[动态分区](./dynamic-partition)同时作用于同一张表上,例如:
+为使分区逻辑清晰,Doris 禁止自动分区(Auto Partition)和动态分区(Dynamic 
Partition)同时作用于一张表上,这种用法容易引发误用,应当以单独的自动分区功能代替。
 
-```sql
-CREATE TABLE tbl3
-(
-    k1 DATETIME NOT NULL,
-    col1 int 
-)
-AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year')) ()
-DISTRIBUTED BY HASH(k1)
-PROPERTIES
-(
-    "replication_num" = "1",
-    "dynamic_partition.create_history_partition"="true",
-    "dynamic_partition.enable" = "true",
-    "dynamic_partition.time_unit" = "year",
-    "dynamic_partition.start" = "-2",
-    "dynamic_partition.end" = "2",
-    "dynamic_partition.prefix" = "p",
-    "dynamic_partition.buckets" = "8"
-); 
-```
-
-当两种功能联用时,它们的原始功能均不受影响,依旧作用于整张表上,行为包括但不限于:
-
-1. 无论创建方式如何,过期的历史分区都会按动态分区功能指定的规则定期清理或转入冷存储
-2. 分区范围不能重叠、冲突。如果动态分区需要创建的新分区范围已经被自动或手动创建的分区覆盖,则该分区创建会失败,但不影响业务过程。
-
-其原则在于,自动分区仅是对创建分区引入的一种补充手段,一个分区无论是手动、经自动分区创建,还是经动态分区创建的,均会受到动态分区的管理。
-
-### 限制
-
-为简化两种分区方式联用的行为模式,当前自动分区和动态分区联用时,两者的**分区间隔必须一致**,否则建表将会失败:
-
-```sql
-mysql > CREATE TABLE tbl3
-        (
-            k1 DATETIME NOT NULL,
-            col1 int 
-        )
-        AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year')) ()
-        DISTRIBUTED BY HASH(k1)
-        PROPERTIES
-        (
-            "replication_num" = "1",
-            "dynamic_partition.create_history_partition"="true",
-            "dynamic_partition.enable" = "true",
-            "dynamic_partition.time_unit" = "HOUR",
-            "dynamic_partition.start" = "-2",
-            "dynamic_partition.end" = "2",
-            "dynamic_partition.prefix" = "p",
-            "dynamic_partition.buckets" = "8"
-        ); 
-ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = 
If support auto partition and dynamic partition at same time, they must have 
the same interval unit.
-```
+:::caution
+在 Doris 2.1 的某些早期版本中,该功能未被禁止,但不推荐使用。
+:::
 
 ## 注意事项
 
diff --git a/versioned_docs/version-2.1/advanced/partition/auto-partition.md 
b/versioned_docs/version-2.1/advanced/partition/auto-partition.md
index f9ea908efe..0021419cb1 100644
--- a/versioned_docs/version-2.1/advanced/partition/auto-partition.md
+++ b/versioned_docs/version-2.1/advanced/partition/auto-partition.md
@@ -255,61 +255,11 @@ A partition created by the AUTO PARTITION function has 
the exact same functional
 
 ## Coupled with dynamic partitioning
 
-AUTO PARTITION is supported on the same table as [DYNAMIC 
PARTITION](./dynamic-partition). for example:
+To make the partitioning logic clear, Doris prohibits Auto Partition and 
Dynamic Partition from working together on a single table. This usage is prone 
to misuse and should be replaced by a separate Auto Partition function.
 
-```sql
-CREATE TABLE tbl3
-(
-    k1 DATETIME NOT NULL,
-    col1 int 
-)
-AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year') ())
-DISTRIBUTED BY HASH(k1)
-PROPERTIES
-(
-    "replication_num" = "1",
-    "dynamic_partition.create_history_partition"="true",
-    "dynamic_partition.enable" = "true",
-    "dynamic_partition.time_unit" = "year",
-    "dynamic_partition.start" = "-2",
-    "dynamic_partition.end" = "2",
-    "dynamic_partition.prefix" = "p",
-    "dynamic_partition.buckets" = "8"
-); 
-```
-
-When the two functions are used in combination, neither of their original 
functions is affected and they still act on the entire table. The behavior 
includes but is not limited to:
-
-1. regardless of the creation method, the expired historical partitions will 
be periodically cleaned up or transferred to cold storage according to the 
rules specified by the DYNAMIC PARTITION properties
-2. partition ranges cannot overlap or conflict. If a new partition range that 
needs to be created by DYNAMIC PARTITION has already been covered by an 
automatically or manually created partition, the partition creation will fail 
without affecting the business process.
-
-The principle is that AUTO PARTITION is only a complementary means introduced 
to the creation of partitions, and that a partition, whether created manually, 
by AUTO PARTITION, or by DYNAMIC PARTITION, will be governed by DYNAMIC 
PARTITION functions.
-
-### Constraint
-
-In order to simplify the behavioral pattern of combine two partition methods, 
when the AUTO PARTITION and DYNAMIC PARTITION are both used, the **partition 
intervals of the two must be consistent** or the table creating will fail:
-
-```sql
-mysql > CREATE TABLE tbl3
-        (
-            k1 DATETIME NOT NULL,
-            col1 int 
-        )
-        AUTO PARTITION BY RANGE (date_trunc(`k1`, 'year') ())
-        DISTRIBUTED BY HASH(k1)
-        PROPERTIES
-        (
-            "replication_num" = "1",
-            "dynamic_partition.create_history_partition"="true",
-            "dynamic_partition.enable" = "true",
-            "dynamic_partition.time_unit" = "HOUR",
-            "dynamic_partition.start" = "-2",
-            "dynamic_partition.end" = "2",
-            "dynamic_partition.prefix" = "p",
-            "dynamic_partition.buckets" = "8"
-        ); 
-ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = 
If support auto partition and dynamic partition at same time, they must have 
the same interval unit.
-```
+:::caution
+In some early versions of Doris 2.1, this feature is not disabled, but is not 
recommended.
+:::
 
 ## caveat
 


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

Reply via email to