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

Caideyipi 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 89e0a9a0d91 Fixed the missing time column with non-default name & INF 
without '' when explicitly defined in show create && the bug that the db ttl is 
non-default for replacing tree views && Pipe: NPE of Deletion Sync & failed 
logic for compressing progressReportEvent (#17457)
89e0a9a0d91 is described below

commit 89e0a9a0d91998f5e0a43c99164cc6ffe0e8eb96
Author: Caideyipi <[email protected]>
AuthorDate: Mon Apr 27 10:47:10 2026 +0800

    Fixed the missing time column with non-default name & INF without '' when 
explicitly defined in show create && the bug that the db ttl is non-default for 
replacing tree views && Pipe: NPE of Deletion Sync & failed logic for 
compressing progressReportEvent (#17457)
---
 .../relational/it/schema/IoTDBDatabaseIT.java      |  2 +-
 .../iotdb/relational/it/schema/IoTDBTableIT.java   | 39 ++++++++++------
 .../table/view/CreateTableViewProcedure.java       | 18 ++++----
 .../thrift/sync/IoTDBDataRegionSyncSink.java       |  2 +-
 .../realtime/PipeRealtimeDataRegionSource.java     |  7 ++-
 .../metadata/relational/ShowCreateTableTask.java   | 20 +++++---
 .../metadata/relational/ShowCreateViewTask.java    | 19 +++++---
 .../apache/iotdb/commons/schema/table/TsTable.java | 54 ++++++++++------------
 .../schema/table/column/TsTableColumnSchema.java   |  8 +++-
 9 files changed, 99 insertions(+), 70 deletions(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java
 
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java
index 3ff36d0cad9..2b367b70b22 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java
@@ -717,7 +717,7 @@ public class IoTDBDatabaseIT {
           statement.executeQuery("select * from views"),
           "database,table_name,view_definition,",
           Collections.singleton(
-              "test,view_table,CREATE VIEW \"view_table\" (\"tag1\" STRING 
TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" INT32 FIELD FROM \"s2\") 
RESTRICT WITH (ttl=100) AS root.\"a\".**,"));
+              "test,view_table,CREATE VIEW \"view_table\" (\"time\" TIMESTAMP 
TIME,\"tag1\" STRING TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" INT32 
FIELD FROM \"s2\") RESTRICT WITH (ttl=100) AS root.\"a\".**,"));
 
       TestUtils.assertResultSetEqual(
           statement.executeQuery(
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 66635919755..c3a72d3c23a 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
@@ -306,7 +306,7 @@ public class IoTDBTableIT {
       }
 
       statement.execute(
-          "create table table2(region_id STRING TAG, plant_id STRING TAG, 
color STRING ATTRIBUTE, temperature FLOAT FIELD) with (TTL=6600000)");
+          "create table table2(t1 TIMESTAMP TIME, region_id STRING TAG, 
plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD) with 
(TTL=6600000)");
 
       statement.execute("alter table table2 add column speed DOUBLE FIELD 
COMMENT 'fast'");
 
@@ -314,7 +314,7 @@ public class IoTDBTableIT {
           statement.executeQuery("show create table table2"),
           "Table,Create Table,",
           Collections.singleton(
-              "table2,CREATE TABLE \"table2\" (\"region_id\" STRING 
TAG,\"plant_id\" STRING TAG,\"color\" STRING ATTRIBUTE,\"temperature\" FLOAT 
FIELD,\"speed\" DOUBLE FIELD COMMENT 'fast') WITH (ttl=6600000),"));
+              "table2,CREATE TABLE \"table2\" (\"t1\" TIMESTAMP 
TIME,\"region_id\" STRING TAG,\"plant_id\" STRING TAG,\"color\" STRING 
ATTRIBUTE,\"temperature\" FLOAT FIELD,\"speed\" DOUBLE FIELD COMMENT 'fast') 
WITH (ttl=6600000),"));
 
       try {
         statement.execute("alter table table2 add column speed DOUBLE FIELD");
@@ -422,7 +422,7 @@ public class IoTDBTableIT {
         assertEquals(columnNames.length, cnt);
       }
 
-      columnNames = new String[] {"time", "region_id", "plant_id", "color", 
"temperature", "speed"};
+      columnNames = new String[] {"t1", "region_id", "plant_id", "color", 
"temperature", "speed"};
       dataTypes = new String[] {"TIMESTAMP", "STRING", "STRING", "STRING", 
"FLOAT", "DOUBLE"};
       categories = new String[] {"TIME", "TAG", "TAG", "ATTRIBUTE", "FIELD", 
"FIELD"};
 
@@ -451,7 +451,7 @@ public class IoTDBTableIT {
 
       // Test comment
       // Before
-      columnNames = new String[] {"time", "region_id", "plant_id", 
"temperature", "speed"};
+      columnNames = new String[] {"t1", "region_id", "plant_id", 
"temperature", "speed"};
       dataTypes = new String[] {"TIMESTAMP", "STRING", "STRING", "FLOAT", 
"DOUBLE"};
       categories = new String[] {"TIME", "TAG", "TAG", "FIELD", "FIELD"};
       statuses = new String[] {"USING", "USING", "USING", "USING", "USING"};
@@ -480,7 +480,7 @@ public class IoTDBTableIT {
       // After
       statement.execute("COMMENT ON COLUMN table2.region_id IS '重庆'");
       statement.execute("COMMENT ON COLUMN table2.region_id IS NULL");
-      statement.execute("COMMENT ON COLUMN test2.table2.time IS 'recent'");
+      statement.execute("COMMENT ON COLUMN test2.table2.t1 IS 'recent'");
       statement.execute("COMMENT ON COLUMN test2.table2.region_id IS ''");
 
       comments = new String[] {"recent", "", null, null, "fast"};
@@ -527,7 +527,7 @@ public class IoTDBTableIT {
       }
 
       try {
-        statement.execute("alter table table2 drop column time");
+        statement.execute("alter table table2 drop column t1");
       } catch (final SQLException e) {
         assertEquals("701: Dropping tag or time column is not supported.", 
e.getMessage());
       }
@@ -619,8 +619,14 @@ public class IoTDBTableIT {
 
       // Test time column
       // More time column tests are included in other IT
-      statement.execute("create table test100 (time time)");
-      statement.execute("create table test101 (time timestamp time)");
+      statement.execute("create table test100 (t1 time) with (ttl='INF')");
+      statement.execute("create table test101 (t1 timestamp time)");
+
+      TestUtils.assertResultSetEqual(
+          statement.executeQuery("show create table test100"),
+          "Table,Create Table,",
+          Collections.singleton(
+              "test100,CREATE TABLE \"test100\" (\"t1\" TIMESTAMP TIME) WITH 
(ttl='INF'),"));
     } catch (final SQLException e) {
       e.printStackTrace();
       fail(e.getMessage());
@@ -1043,13 +1049,18 @@ public class IoTDBTableIT {
     }
 
     try (final Connection connection =
-            EnvFactory.getEnv()
-                .getConnection("testUser", "testUser123456", 
BaseEnv.TABLE_SQL_DIALECT);
+            EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
         final Statement statement = connection.createStatement()) {
+      statement.execute("alter database tree_view_db set properties ttl=100");
       statement.execute(
-          "create or replace view tree_view_db.view_table (tag1 tag, tag2 tag, 
s11 int32 field, s3 from s2) restrict with (ttl=100) as root.\"重庆\".\"1\".**");
+          "create or replace view tree_view_db.view_table (tag1 tag, tag2 tag, 
s11 int32 field, s3 from s2) restrict as root.\"重庆\".\"1\".**");
+
+      TestUtils.assertResultSetEqual(
+          statement.executeQuery("show tables from tree_view_db"),
+          "TableName,TTL(ms),",
+          Collections.singleton("view_table,100,"));
     } catch (final SQLException e) {
-      fail();
+      fail(e.getMessage());
     }
 
     try (final Connection connection =
@@ -1066,14 +1077,14 @@ public class IoTDBTableIT {
           statement.executeQuery("show create view view_table"),
           "View,Create View,",
           Collections.singleton(
-              "view_table,CREATE VIEW \"view_table\" (\"tag1\" STRING 
TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" STRING FIELD FROM \"s2\") 
RESTRICT WITH (ttl=100) AS root.\"重庆\".\"1\".**,"));
+              "view_table,CREATE VIEW \"view_table\" (\"time\" TIMESTAMP 
TIME,\"tag1\" STRING TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" STRING 
FIELD FROM \"s2\") RESTRICT WITH (ttl=100) AS root.\"重庆\".\"1\".**,"));
 
       // Can also use "show create table"
       TestUtils.assertResultSetEqual(
           statement.executeQuery("show create table view_table"),
           "View,Create View,",
           Collections.singleton(
-              "view_table,CREATE VIEW \"view_table\" (\"tag1\" STRING 
TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" STRING FIELD FROM \"s2\") 
RESTRICT WITH (ttl=100) AS root.\"重庆\".\"1\".**,"));
+              "view_table,CREATE VIEW \"view_table\" (\"time\" TIMESTAMP 
TIME,\"tag1\" STRING TAG,\"tag2\" STRING TAG,\"s11\" INT32 FIELD,\"s3\" STRING 
FIELD FROM \"s2\") RESTRICT WITH (ttl=100) AS root.\"重庆\".\"1\".**,"));
 
       statement.execute("create table a ()");
       try {
diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/view/CreateTableViewProcedure.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/view/CreateTableViewProcedure.java
index b7fb458c8bb..c6defba4c86 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/view/CreateTableViewProcedure.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/view/CreateTableViewProcedure.java
@@ -91,18 +91,16 @@ public class CreateTableViewProcedure extends 
CreateTableProcedure {
           } else {
             oldView = oldTableAndStatus.get().getLeft();
             oldStatus = oldTableAndStatus.get().getRight();
-            setNextState(CreateTableState.PRE_CREATE);
           }
-        } else {
-          final TDatabaseSchema schema =
-              
env.getConfigManager().getClusterSchemaManager().getDatabaseSchemaByName(database);
-          if (!table.getPropValue(TsTable.TTL_PROPERTY).isPresent()
-              && schema.isSetTTL()
-              && schema.getTTL() != Long.MAX_VALUE) {
-            table.addProp(TsTable.TTL_PROPERTY, 
String.valueOf(schema.getTTL()));
-          }
-          setNextState(CreateTableState.PRE_CREATE);
         }
+        final TDatabaseSchema schema =
+            
env.getConfigManager().getClusterSchemaManager().getDatabaseSchemaByName(database);
+        if (!table.getPropValue(TsTable.TTL_PROPERTY).isPresent()
+            && schema.isSetTTL()
+            && schema.getTTL() != Long.MAX_VALUE) {
+          table.addProp(TsTable.TTL_PROPERTY, String.valueOf(schema.getTTL()));
+        }
+        setNextState(CreateTableState.PRE_CREATE);
       } catch (final MetadataException | DatabaseNotExistsException e) {
         setFailure(new ProcedureException(e));
       }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java
index d711c65b9e3..9357a8c6a6d 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java
@@ -252,7 +252,7 @@ public class IoTDBDataRegionSyncSink extends 
IoTDBDataNodeSyncSink {
           String.format(
               "Transfer deletion %s error, result status %s.",
               pipeDeleteDataNodeEvent.getDeleteDataNode().getType(), status),
-          pipeDeleteDataNodeEvent.getDeletionResource().toString(),
+          pipeDeleteDataNodeEvent.getDeleteDataNode().toString(),
           true);
     }
 
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
index 73ea557b8ff..da5b81c6e36 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
@@ -442,8 +442,11 @@ public abstract class PipeRealtimeDataRegionSource 
implements PipeExtractor {
       }
       pendingQueue.pollLast();
     }
-    if (pendingQueue.peekLast() instanceof ProgressReportEvent) {
-      final ProgressReportEvent oldEvent = (ProgressReportEvent) 
pendingQueue.peekLast();
+    final Event last = pendingQueue.peekLast();
+    if (last instanceof PipeRealtimeEvent
+        && ((PipeRealtimeEvent) last).getEvent() instanceof 
ProgressReportEvent) {
+      final ProgressReportEvent oldEvent =
+          (ProgressReportEvent) ((PipeRealtimeEvent) last).getEvent();
       oldEvent.bindProgressIndex(
           oldEvent
               .getProgressIndex()
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
index 64581425f01..5acb26d90fc 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
@@ -96,7 +96,13 @@ public class ShowCreateTableTask extends AbstractTableTask {
               .append("TAG");
           break;
         case TIME:
-          continue;
+          builder
+              .append(getIdentifier(schema.getColumnName()))
+              .append(" ")
+              .append(schema.getDataType())
+              .append(" ")
+              .append("TIME");
+          break;
         case FIELD:
           builder
               .append(getIdentifier(schema.getColumnName()))
@@ -123,7 +129,7 @@ public class ShowCreateTableTask extends AbstractTableTask {
       builder.append(",");
     }
 
-    if (table.getColumnList().size() > 1) {
+    if (!table.getColumnList().isEmpty()) {
       builder.deleteCharAt(builder.length() - 1);
     }
 
@@ -131,10 +137,12 @@ public class ShowCreateTableTask extends 
AbstractTableTask {
     if (table.getPropValue(TsTable.COMMENT_KEY).isPresent()) {
       builder.append(" COMMENT 
").append(getString(table.getPropValue(TsTable.COMMENT_KEY).get()));
     }
-    builder
-        .append(" WITH (ttl=")
-        .append(table.getPropValue(TsTable.TTL_PROPERTY).orElse("'" + 
TTL_INFINITE + "'"))
-        .append(")");
+
+    String ttlString = 
table.getPropValue(TsTable.TTL_PROPERTY).orElse(TTL_INFINITE);
+    if (ttlString.equals(TTL_INFINITE)) {
+      ttlString = "'" + ttlString + "'";
+    }
+    builder.append(" WITH (ttl=").append(ttlString).append(")");
 
     return builder.toString();
   }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
index 42f6397083a..9fc573f8988 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
@@ -99,7 +99,13 @@ public class ShowCreateViewTask extends AbstractTableTask {
               .append("TAG");
           break;
         case TIME:
-          continue;
+          builder
+              .append(getIdentifier(schema.getColumnName()))
+              .append(" ")
+              .append(schema.getDataType())
+              .append(" ")
+              .append("TIME");
+          break;
         case FIELD:
           builder
               .append(getIdentifier(schema.getColumnName()))
@@ -122,7 +128,7 @@ public class ShowCreateViewTask extends AbstractTableTask {
       builder.append(",");
     }
 
-    if (table.getColumnList().size() > 1) {
+    if (!table.getColumnList().isEmpty()) {
       builder.deleteCharAt(builder.length() - 1);
     }
 
@@ -136,10 +142,11 @@ public class ShowCreateViewTask extends AbstractTableTask 
{
       builder.append(" RESTRICT");
     }
 
-    builder
-        .append(" WITH (ttl=")
-        .append(table.getPropValue(TsTable.TTL_PROPERTY).orElse("'" + 
TTL_INFINITE + "'"))
-        .append(")");
+    String ttlString = 
table.getPropValue(TsTable.TTL_PROPERTY).orElse(TTL_INFINITE);
+    if (ttlString.equals(TTL_INFINITE)) {
+      ttlString = "'" + ttlString + "'";
+    }
+    builder.append(" WITH (ttl=").append(ttlString).append(")");
 
     builder.append(" AS ");
 
diff --git 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TsTable.java
 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TsTable.java
index 48cd81b39e1..4a82bdd70a0 100644
--- 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TsTable.java
+++ 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TsTable.java
@@ -22,9 +22,7 @@ package org.apache.iotdb.commons.schema.table;
 import org.apache.iotdb.commons.conf.CommonDescriptor;
 import org.apache.iotdb.commons.exception.MetadataException;
 import org.apache.iotdb.commons.exception.runtime.SchemaExecutionException;
-import org.apache.iotdb.commons.schema.table.column.AttributeColumnSchema;
-import org.apache.iotdb.commons.schema.table.column.FieldColumnSchema;
-import org.apache.iotdb.commons.schema.table.column.TagColumnSchema;
+import org.apache.iotdb.commons.schema.table.column.TimeColumnSchema;
 import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory;
 import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema;
 import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchemaUtil;
@@ -93,6 +91,9 @@ public class TsTable {
   private transient int tagNums = 0;
   private transient int fieldNum = 0;
 
+  // Initiated during creation and never changed the reference
+  private transient TsTableColumnSchema timeColumnSchema;
+
   public TsTable(final String tableName) {
     this.tableName = tableName;
   }
@@ -101,7 +102,12 @@ public class TsTable {
   public TsTable(String tableName, ImmutableList<TsTableColumnSchema> 
columnSchemas) {
     this.tableName = tableName;
     columnSchemas.forEach(
-        columnSchema -> columnSchemaMap.put(columnSchema.getColumnName(), 
columnSchema));
+        columnSchema -> {
+          columnSchemaMap.put(columnSchema.getColumnName(), columnSchema);
+          if (columnSchema instanceof TimeColumnSchema) {
+            timeColumnSchema = columnSchema;
+          }
+        });
   }
 
   public TsTable(TsTable origin) {
@@ -141,6 +147,19 @@ public class TsTable {
     }
   }
 
+  // No need to acquire lock, because the time column is fixed after table 
creation
+  // And the inner name is protected by the volatile keyword
+  public TsTableColumnSchema getTimeColumnSchema() {
+    if (Objects.isNull(timeColumnSchema)) {
+      timeColumnSchema =
+          columnSchemaMap.values().stream()
+              .filter(column -> column instanceof TimeColumnSchema)
+              .findFirst()
+              .orElse(null);
+    }
+    return timeColumnSchema;
+  }
+
   /**
    * Execute a write operation with optimistic lock support. This method 
handles the write flag and
    * version increment automatically.
@@ -215,33 +234,10 @@ public class TsTable {
         () -> {
           // Ensures idempotency
           if (columnSchemaMap.containsKey(oldName)) {
-            final TsTableColumnSchema schema = columnSchemaMap.remove(oldName);
+            final TsTableColumnSchema schema = columnSchemaMap.get(oldName);
             final Map<String, String> oldProps = schema.getProps();
             oldProps.computeIfAbsent(TreeViewSchema.ORIGINAL_NAME, k -> 
schema.getColumnName());
-            switch (schema.getColumnCategory()) {
-              case TAG:
-                columnSchemaMap.put(
-                    newName, new TagColumnSchema(newName, 
schema.getDataType(), oldProps));
-                break;
-              case FIELD:
-                columnSchemaMap.put(
-                    newName,
-                    new FieldColumnSchema(
-                        newName,
-                        schema.getDataType(),
-                        ((FieldColumnSchema) schema).getEncoding(),
-                        ((FieldColumnSchema) schema).getCompressor(),
-                        oldProps));
-                break;
-              case ATTRIBUTE:
-                columnSchemaMap.put(
-                    newName, new AttributeColumnSchema(newName, 
schema.getDataType(), oldProps));
-                break;
-              case TIME:
-              default:
-                // Do nothing
-                columnSchemaMap.put(oldName, schema);
-            }
+            schema.setColumnName(newName);
           }
         });
   }
diff --git 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java
 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java
index 8f773f19be4..8342c08365f 100644
--- 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java
+++ 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java
@@ -34,7 +34,7 @@ import static 
com.google.common.base.MoreObjects.toStringHelper;
 
 public abstract class TsTableColumnSchema {
 
-  protected String columnName;
+  protected volatile String columnName;
 
   protected TSDataType dataType;
 
@@ -52,6 +52,12 @@ public abstract class TsTableColumnSchema {
     this.props = props;
   }
 
+  // Only used for column renaming
+  public TsTableColumnSchema setColumnName(String columnName) {
+    this.columnName = columnName;
+    return this;
+  }
+
   public String getColumnName() {
     return columnName;
   }

Reply via email to