WingsGo commented on a change in pull request #2317: Support Dynamic Partition
URL: https://github.com/apache/incubator-doris/pull/2317#discussion_r351612521
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java
 ##########
 @@ -373,4 +390,59 @@ public static long analyzeTimeout(Map<String, String> 
properties, long defaultTi
         }
         return timeout;
     }
+
+    public static Map<String, String> analyzeDynamicPartition(Database db, 
OlapTable olapTable,
+                                                              Map<String, 
String> properties) throws DdlException {
+        if (properties == null || properties.isEmpty()) {
+            throw new DdlException("Table " + olapTable.getName() + " is not a 
dynamic partition olap table");
+        }
+        Map<String, String> analyzedProperties = new HashMap<>();
+        if (properties.containsKey(PROPERTIES_DYNAMIC_PARTITION_TIME_UNIT)) {
+            String timeUnit = 
properties.get(PROPERTIES_DYNAMIC_PARTITION_TIME_UNIT);
+            DynamicPartitionUtils.checkTimeUnit(olapTable, timeUnit);
 
 Review comment:
   How about move the function to DynamicPartitionUtils

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


With regards,
Apache Git Services

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

Reply via email to