This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new e923aecd2f3 branch-3.1: [fix](schema_change) fix incorrect unique id 
in rollup after schema change #57073 (#58110)
e923aecd2f3 is described below

commit e923aecd2f35c94401e678da31d18a46fc0d2bb0
Author: Luwei <[email protected]>
AuthorDate: Tue Nov 25 11:21:28 2025 +0800

    branch-3.1: [fix](schema_change) fix incorrect unique id in rollup after 
schema change #57073 (#58110)
    
    pick master #57073
---
 .../src/main/java/org/apache/doris/alter/SchemaChangeHandler.java  | 1 +
 .../suites/schema_change_p0/test_alter_rollup_table.groovy         | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java 
b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
index 364cacab538..4532c9b1d31 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
@@ -760,6 +760,7 @@ public class SchemaChangeHandler extends AlterHandler {
                     modColIndex = i;
                     otherCol = new Column(modColumn);
                     otherCol.setName(col.getName());
+                    otherCol.setUniqueId(col.getUniqueId());
                     otherCol.setDefineExpr(col.getDefineExpr());
                     Preconditions.checkState(modColIndex != -1);
                     Preconditions.checkState(otherCol != null);
diff --git 
a/regression-test/suites/schema_change_p0/test_alter_rollup_table.groovy 
b/regression-test/suites/schema_change_p0/test_alter_rollup_table.groovy
index 96b0578f60f..fd05220b7fd 100644
--- a/regression-test/suites/schema_change_p0/test_alter_rollup_table.groovy
+++ b/regression-test/suites/schema_change_p0/test_alter_rollup_table.groovy
@@ -64,6 +64,7 @@ suite("test_alter_rollup_table") {
         DUPLICATE KEY(`user_id`, `event_time`, `event_date`)
         DISTRIBUTED BY HASH(`user_id`) BUCKETS 3
         PROPERTIES (
+        "replication_num" = "1",
         "file_cache_ttl_seconds" = "0",
         "bloom_filter_columns" = "country, city",
         "is_being_synced" = "false",
@@ -132,5 +133,11 @@ suite("test_alter_rollup_table") {
         (1003, '2025-09-19', '2025-09-19 10:00:00', 'japan', 'tokyo', 30, 1, 
1000.50, 88.8, '192.168.0.1', '{"device":"iphone"}', 1),
         (1004, '2025-09-19', '2025-09-19 11:30:00', 'usa', null, null, 0, 
500.00, null, '10.0.0.2', '{"device":"android"}', 2);
     """
+
+    sleep(10000)
+
+    sql """
+        select event_date, user_id from ${tbName}
+    """
 }
 


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

Reply via email to