w41ter commented on code in PR #49894:
URL: https://github.com/apache/doris/pull/49894#discussion_r2036414435


##########
fe/fe-core/src/main/java/org/apache/doris/persist/ModifyTableDefaultDistributionBucketNumOperationLog.java:
##########
@@ -54,6 +65,18 @@ public int getBucketNum() {
         return bucketNum;
     }
 
+    public DistributionInfoType getType() {
+        return type;
+    }
+
+    public boolean getAutoBucket() {
+        return autoBucket;
+    }
+
+    public String getColumnsName() {
+        return columnsName;

Review Comment:
   ```suggestion
           return columnsName == null ? "" : columnsName;
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/persist/ModifyTableDefaultDistributionBucketNumOperationLog.java:
##########
@@ -33,13 +34,23 @@ public class 
ModifyTableDefaultDistributionBucketNumOperationLog implements Writ
     private long dbId;
     @SerializedName(value = "tableId")
     private long tableId;
+    @SerializedName(value = "type")
+    private DistributionInfoType type;
+    @SerializedName(value = "autoBucket")
+    protected boolean autoBucket;

Review Comment:
   The default value of the new fields, which read from the old metadata, is 
null. To maintain compatibility, those binlogs `type == null` should be 
filtered in `addBinlog`.



##########
fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogManager.java:
##########
@@ -435,6 +436,22 @@ public void addReplaceTable(ReplaceTableOperationLog info, 
long commitSeq) {
         addBinlog(dbId, tableIds, commitSeq, timestamp, type, data, false, 
info);
     }
 
+    public void 
addModifyDistributionNum(ModifyTableDefaultDistributionBucketNumOperationLog 
info, long commitSeq) {
+        if (info.getBucketNum() <= 0) {

Review Comment:
   ```suggestion
           if (info.getBucketNum() <= 0 || info.getType() == null) {
   ```



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