KassieZ commented on code in PR #1535: URL: https://github.com/apache/doris-website/pull/1535#discussion_r1893675702
########## docs/table-design/data-partitioning/auto-partitioning.md: ########## @@ -245,35 +245,32 @@ It can be concluded that the partitions created by Auto Partition share the same ## Conjunct with Dynamic Partition -Doris supports both Auto and Dynamic Partition. In this case, both functions are in effect: -1. Auto Partition will automatically create partitions on demand during data import; -2. Dynamic Partition will automatically create, recycle and dump partitions. - -There is no conflict between the two syntaxes, just set the corresponding clauses/attributes at the same time. +Doris supports both Auto and Dynamic Partition. In this case, the functions of both work together on the table: -### Best Practice +1. Auto Partition will automatically create partitions on demand during data import; +2. Dynamic Partition will reclaim and dump partitions as they were originally intended to function. -In scenarios where you need to set a limit on the partition lifecycle, you can **disable the creation of Dynamic Partition, leaving the creation of partitions to be completed by Auto Partition**, and complete the management of the partition lifecycle through the Dynamic Partition's function of dynamically reclaiming partitions: +`dynamic_partition.create_method` property must be set to `AUTO`,That is, the `dynamic_partition.end` attribute will be ignored and the partition creation function will be taken over by Auto Partition. ```sql create table auto_dynamic( k0 datetime(6) NOT NULL ) auto partition by range (date_trunc(k0, 'year')) -( -) +() DISTRIBUTED BY HASH(`k0`) BUCKETS 2 properties( "dynamic_partition.enable" = "true", "dynamic_partition.prefix" = "p", "dynamic_partition.start" = "-50", - "dynamic_partition.end" = "0", --- Dynamic Partition No Partition Creation + "dynamic_partition.end" = "123", --- 将被忽略 Review Comment: 英文文档建议不出现中文字符 ########## versioned_docs/version-3.0/table-design/data-partitioning/auto-partitioning.md: ########## @@ -245,38 +245,37 @@ It can be concluded that the partitions created by Auto Partition share the same ## Conjunct with Dynamic Partition -Since 3.0.3, Doris supports both Auto and Dynamic Partition. In this case, both functions are in effect: -1. Auto Partition will automatically create partitions on demand during data import; -2. Dynamic Partition will automatically create, recycle and dump partitions. - -There is no conflict between the two syntaxes, just set the corresponding clauses/attributes at the same time. +Since 3.0.3, Doris supports both Auto and Dynamic Partition. Since 3.0.4, the functions of both work together on the table: -## Best Practice +1. Auto Partition will automatically create partitions on demand during data import; +2. Dynamic Partition will reclaim and dump partitions as they were originally intended to function. -In scenarios where you need to set a limit on the partition lifecycle, you can **disable the creation of Dynamic Partition, leaving the creation of partitions to be completed by Auto Partition**, and complete the management of the partition lifecycle through the Dynamic Partition's function of dynamically reclaiming partitions: +`dynamic_partition.create_method` property must be set to `AUTO`,That is, the `dynamic_partition.end` attribute will be ignored and the partition creation function will be taken over by Auto Partition. ```sql create table auto_dynamic( k0 datetime(6) NOT NULL ) auto partition by range (date_trunc(k0, 'year')) -( -) +() DISTRIBUTED BY HASH(`k0`) BUCKETS 2 properties( "dynamic_partition.enable" = "true", "dynamic_partition.prefix" = "p", "dynamic_partition.start" = "-50", - "dynamic_partition.end" = "0", --- Dynamic Partition No Partition Creation + "dynamic_partition.end" = "123", --- 将被忽略 "dynamic_partition.time_unit" = "year", + "dynamic_partition.create_method" = "AUTO", "replication_num" = "1" ); ``` +This gives us both partition lifecycle management capabilities in addition to Auto Partition, and partition name consistency. + This way we have both the flexibility of Auto Partition and consistency in partition names. :::note Review Comment: :::info Note -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org