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

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


The following commit(s) were added to 
refs/heads/updateChunkMetadataAfterRewrite by this push:
     new 85f0526116e fix
85f0526116e is described below

commit 85f0526116eb1a2781cdd82250eef93d39dfb500
Author: shuwenwei <[email protected]>
AuthorDate: Thu Jan 29 11:47:10 2026 +0800

    fix
---
 .../db/schemaengine/schemaregion/utils/ResourceByPathUtils.java   | 4 ++--
 .../src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java      | 8 --------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
index ca1f9f25995..690cea9f03b 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
@@ -564,13 +564,13 @@ class MeasurementResourceByPathUtils extends 
ResourceByPathUtils {
       if (chunkMetadata != null && (chunkMetadata.getDataType() != 
targetDataType)) {
         // create new statistics object via new data type, and merge 
statistics information
         chunkMetadata =
-            SchemaUtils.rewriteNonAlignedChunkMetadataStatistics(
-                chunkMetadataList, index, targetDataType);
+            SchemaUtils.rewriteChunkMetadata((ChunkMetadata) chunkMetadata, 
targetDataType);
         if (chunkMetadata == null) {
           // data type not match and cannot convert
           // ignore current file
           return null;
         }
+        chunkMetadataList.set(index, chunkMetadata);
         chunkMetadata.setModified(true);
       }
       if (!useFakeStatistics) {
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
index 94c31bdfb0e..2b3818c7be4 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
@@ -415,14 +415,6 @@ public class SchemaUtils {
     }
   }
 
-  public static ChunkMetadata rewriteNonAlignedChunkMetadataStatistics(
-      List<IChunkMetadata> chunkMetadataList, int index, TSDataType 
targetDataType) {
-    ChunkMetadata newChunkMetadata =
-        rewriteChunkMetadata((ChunkMetadata) chunkMetadataList.get(index), 
targetDataType);
-    chunkMetadataList.set(index, newChunkMetadata);
-    return newChunkMetadata;
-  }
-
   public static ChunkMetadata rewriteChunkMetadata(
       ChunkMetadata origin, TSDataType targetDataType) {
     if (origin != null && targetDataType.isCompatible(origin.getDataType())) {

Reply via email to