morningman commented on a change in pull request #3679:
URL: https://github.com/apache/incubator-doris/pull/3679#discussion_r429859199



##########
File path: 
fe/src/main/java/org/apache/doris/common/util/DynamicPartitionUtil.java
##########
@@ -114,6 +118,34 @@ private static void checkEnable(String enable) throws 
DdlException {
         }
     }
 
+    private static void checkStartDayOfMonth(String val) throws DdlException {
+        if (Strings.isNullOrEmpty(val)) {
+            throw new DdlException("Invalid properties: " + 
DynamicPartitionProperty.START_DAY_OF_MONTH);
+        }
+        try {
+            int dayOfMonth = Integer.parseInt(val);
+            if (dayOfMonth < 1 || dayOfMonth > 28) {
+                throw new 
DdlException(DynamicPartitionProperty.START_DAY_OF_MONTH + " should between 1 
and 28");
+            }
+        } catch (NumberFormatException e) {
+            throw new DdlException("Invalid properties: " + 
DynamicPartitionProperty.START_DAY_OF_MONTH);
+        }
+    }
+
+    private static void checkStartDayOfWeek(String val) throws DdlException {
+        if (Strings.isNullOrEmpty(val)) {
+            throw new DdlException("Invalid properties: " + 
DynamicPartitionProperty.START_DAY_OF_WEEK);
+        }
+        try {
+            int dayOfMonth = Integer.parseInt(val);

Review comment:
       OK




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to