csun5285 commented on code in PR #22159:
URL: https://github.com/apache/doris/pull/22159#discussion_r1278307752


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyTablePropertiesClause.java:
##########
@@ -140,6 +180,49 @@ public void analyze(Analyzer analyzer) throws 
AnalysisException {
                 || 
properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_BYTES)
                 || 
properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_HISTORY_NUMS)) {
             // do nothing, will be alter in 
SchemaChangeHandler.updateBinlogConfig
+        } else if 
(properties.containsKey(PropertyAnalyzer.PROPERTIES_COMPACTION_POLICY)) {
+            String compactionPolicy = 
properties.getOrDefault(PropertyAnalyzer.PROPERTIES_COMPACTION_POLICY, "");
+            if (!Strings.isNullOrEmpty(compactionPolicy)
+                    && !compactionPolicy.equals("time_series") && 
!compactionPolicy.equals("size_based")) {

Review Comment:
   done



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyTablePropertiesClause.java:
##########
@@ -140,6 +180,49 @@ public void analyze(Analyzer analyzer) throws 
AnalysisException {
                 || 
properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_BYTES)
                 || 
properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_HISTORY_NUMS)) {
             // do nothing, will be alter in 
SchemaChangeHandler.updateBinlogConfig
+        } else if 
(properties.containsKey(PropertyAnalyzer.PROPERTIES_COMPACTION_POLICY)) {
+            String compactionPolicy = 
properties.getOrDefault(PropertyAnalyzer.PROPERTIES_COMPACTION_POLICY, "");
+            if (!Strings.isNullOrEmpty(compactionPolicy)
+                    && !compactionPolicy.equals("time_series") && 
!compactionPolicy.equals("size_based")) {
+                throw new AnalysisException(
+                        "Table compaction policy only support for time_series 
or size_based");
+            }
+            this.needTableStable = false;
+            setCompactionPolicy(compactionPolicy);
+        } else if 
(properties.containsKey(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES))
 {
+            long goalSizeMbytes;
+            String goalSizeMbytesStr = properties
+                                        
.get(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES);
+            try {
+                goalSizeMbytes = Long.parseLong(goalSizeMbytesStr);

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.

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

Reply via email to