WingsGo commented on a change in pull request #3799:
URL: https://github.com/apache/incubator-doris/pull/3799#discussion_r437503604



##########
File path: 
fe/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java
##########
@@ -148,11 +151,25 @@ private static void checkStartDayOfWeek(String val) 
throws DdlException {
         }
     }
 
+    private static void checkTimeZone(String val) throws DdlException {

Review comment:
       In fact, i don't konw the function...

##########
File path: docs/en/administrator-guide/dynamic-partition.md
##########
@@ -89,6 +89,10 @@ The rules of dynamic partition are prefixed with 
`dynamic_partition.`:
 
     When specified as `MONTH`, the suffix format of the dynamically created 
partition name is `yyyyMM`, for example, `202003`.
 
+* `dynamic_partition.time_zone`
+
+    The time zone of the dynamic partition, if not filled in, defaults to the 
time zone of the current machine's system, such as `Asia/Shanghai`, if you want 
to know the supported TimeZone, you can run `TimeZone.getAvailableIDs()` in 
Java.

Review comment:
       done

##########
File path: 
fe/src/main/java/org/apache/doris/catalog/DynamicPartitionProperty.java
##########
@@ -46,15 +48,14 @@
     private int buckets;
     private StartOfDate startOfWeek;
     private StartOfDate startOfMonth;
-    // TODO: support setting timezone.
     private TimeZone tz = TimeUtils.getDefaultTimeZone();
 
-
     public DynamicPartitionProperty(Map<String, String> properties) {
         if (properties != null && !properties.isEmpty()) {
             this.exist = true;
             this.enable = Boolean.parseBoolean(properties.get(ENABLE));
             this.timeUnit = properties.get(TIME_UNIT);
+            this.tz = TimeZone.getTimeZone(properties.getOrDefault(TIME_ZONE, 
ZoneId.systemDefault().toString()));

Review comment:
       done




----------------------------------------------------------------
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.

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

Reply via email to