morningman commented on a change in pull request #6554:
URL: https://github.com/apache/incubator-doris/pull/6554#discussion_r704424855
##########
File path: docs/zh-CN/administrator-guide/dynamic-partition.md
##########
@@ -149,6 +149,27 @@ under the License.
p20210523:["2021-05-23", "2021-05-24") storage_medium=SSD
storage_cooldown_time=2021-05-25 00:00:00
```
+* `dynamic_partition.reserved_history_starts`
+
+ 需要保留的历史分区的开始时间。需要以 `yyyy-MM-dd,yyyy-MM-dd,...` 格式进行设置。如果不设置,默认为
`"9999-12-31"`。
+
+* `dynamic_partition.reserved_history_ends`
+
+ 需要保留的历史分区的结束时间。需要以 `yyyy-MM-dd,yyyy-MM-dd,...` 格式进行设置。如果不设置,默认为
`"9999-12-31"`。
+
+ 我们举例说明。假设今天是 2021-09-06,按天分类,动态分区的属性设置为:
+
+ ```end=3, start=-3, reserved_history_starts="2020-06-01,2020-10-31",
reserved_history_ends="2020-06-20,2020-11-15"```。
+
+ 则系统会自动保留:
+
+ ```
+ ["2020-06-01","2020-06-20"),
+ ["2020-10-31","2020-11-15")
Review comment:
Why using closed open range? Not closed range?
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java
##########
@@ -222,6 +225,63 @@ private static void checkHotPartitionNum(String val)
throws DdlException {
}
}
+ private static void checkReservedHistoryStarts(String
reservedHistoryStarts) throws DdlException{
+ String[] starts = reservedHistoryStarts.split(",");
+ if (starts.length == 0) {
+
//ErrorReport.reportDdlException(ErrorCode.ERROR_DYNAMIC_PARTITION_RESERVED_HISTORY_STARTS_EMPTY);
Review comment:
Why not using `ErrorReport.reportDdlException`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]