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

JackieTien97 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 1512190c043 Fix the 552 message of ALTER VIEW ADD COLUMN (#19158)
1512190c043 is described below

commit 1512190c04323644d8617fd935c02e614f035bc6
Author: alpass163 <[email protected]>
AuthorDate: Fri Nov 6 12:18:01 2026 +0800

    Fix the 552 message of ALTER VIEW ADD COLUMN (#19158)
---
 .../java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java     | 4 +++-
 .../i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java    | 5 +++--
 .../i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java    | 4 +++-
 .../apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java | 3 ++-
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
 
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
index 078a6a71a71..ef003debab6 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
@@ -414,7 +414,9 @@ public class IoTDBTableIT {
       try {
         statement.execute("alter table table2 add column speed DOUBLE FIELD");
       } catch (final SQLException e) {
-        assertEquals("552: Column 'speed' already exist", e.getMessage());
+        assertEquals(
+            "552: Column 'speed' already exists or its source measurement is 
already mapped",
+            e.getMessage());
       }
 
       statement.execute("alter table table2 add column if not exists speed 
DOUBLE FIELD");
diff --git 
a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java
 
b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java
index a6df250eed7..fa87cfb7dc2 100644
--- 
a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java
+++ 
b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java
@@ -655,8 +655,9 @@ public final class ManagerMessages {
   public static final String
       
MESSAGE_ARG_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_DEFAULT_ARGREGIONGROUPNUM_ARG_4C00E92C
 =
           "%s should be greater than or equal to default %sRegionGroupNum: 
%d.";
-  public static final String MESSAGE_COLUMN_ARG_ALREADY_EXIST_92F91B6A =
-      "Column '%s' already exist";
+  public static final String
+      
MESSAGE_COLUMN_ARG_ALREADY_EXISTS_OR_ITS_SOURCE_MEASUREMENT_IS_ALREADY_MAPPED_8421FEAD
 =
+          "Column '%s' already exists or its source measurement is already 
mapped";
   public static final String MESSAGE_COLUMN_ARG_DOES_NOT_EXIST_FF67AE82 =
       "Column '%s' does not exist";
   public static final String
diff --git 
a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java
 
b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java
index 34aa75da479..aa51ba247f1 100644
--- 
a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java
+++ 
b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java
@@ -643,7 +643,9 @@ public final class ManagerMessages {
   public static final String
       
MESSAGE_ARG_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_DEFAULT_ARGREGIONGROUPNUM_ARG_4C00E92C
 =
           "%s 应大于或等于默认的 %sRegionGroupNum:%d。";
-  public static final String MESSAGE_COLUMN_ARG_ALREADY_EXIST_92F91B6A = "列 
'%s' 已存在";
+  public static final String
+      
MESSAGE_COLUMN_ARG_ALREADY_EXISTS_OR_ITS_SOURCE_MEASUREMENT_IS_ALREADY_MAPPED_8421FEAD
 =
+          "列 '%s' 已存在,或它引用的源测点已被映射";
   public static final String MESSAGE_COLUMN_ARG_DOES_NOT_EXIST_FF67AE82 = "列 
'%s' 不存在";
   public static final String
       
MESSAGE_CONFIGNODE_LEADER_IS_WAITING_FOR_CLUSTER_HEARTBEAT_SAMPLING_EDB0331F =
diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
index f6988828f40..0b3262c64ed 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
@@ -1703,7 +1703,8 @@ public class ClusterSchemaManager {
     // the table read above is a copy, which this check expands and returns
     final String errorMsg =
         String.format(
-            ManagerMessages.MESSAGE_COLUMN_ARG_ALREADY_EXIST_92F91B6A,
+            ManagerMessages
+                
.MESSAGE_COLUMN_ARG_ALREADY_EXISTS_OR_ITS_SOURCE_MEASUREMENT_IS_ALREADY_MAPPED_8421FEAD,
             columnSchemaList.stream()
                 .map(TsTableColumnSchema::getColumnName)
                 .collect(Collectors.joining(", ")));

Reply via email to