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

jackietien pushed a commit to branch ty/fixudfBug
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 9c9a5ebdfd850a1c066926d86774cf4051a381a6
Author: JackieTien97 <[email protected]>
AuthorDate: Fri Dec 19 17:35:49 2025 +0800

    Correct the getObjectPathFromBinary method in ObjectTypeUtils
---
 .../main/java/org/apache/iotdb/db/utils/ObjectTypeUtils.java  | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectTypeUtils.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectTypeUtils.java
index 0d3d9f963bb..ec1fd592617 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectTypeUtils.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectTypeUtils.java
@@ -37,7 +37,6 @@ import 
org.apache.iotdb.db.storageengine.rescon.disk.TierManager;
 import org.apache.iotdb.mpp.rpc.thrift.TReadObjectReq;
 import org.apache.iotdb.rpc.TSStatusCode;
 
-import org.apache.tsfile.common.conf.TSFileConfig;
 import org.apache.tsfile.encoding.decoder.Decoder;
 import org.apache.tsfile.encoding.decoder.DecoderWrapper;
 import org.apache.tsfile.utils.Binary;
@@ -262,14 +261,10 @@ public class ObjectTypeUtils {
   }
 
   public static Optional<File> getObjectPathFromBinary(Binary binary) {
-    byte[] bytes = binary.getValues();
-    String relativeObjectFilePath =
-        new String(bytes, 8, bytes.length - 8, TSFileConfig.STRING_CHARSET);
-    return TIER_MANAGER.getAbsoluteObjectFilePath(relativeObjectFilePath);
+    return getObjectPathFromBinary(binary, false);
   }
 
-  public static Optional<File> getNullableObjectPathFromBinary(
-      Binary binary, boolean needTempFile) {
+  public static Optional<File> getObjectPathFromBinary(Binary binary, boolean 
needTempFile) {
     byte[] bytes = binary.getValues();
     ByteBuffer buffer = ByteBuffer.wrap(bytes, 8, bytes.length - 8);
     String relativeObjectFilePath =
@@ -278,7 +273,7 @@ public class ObjectTypeUtils {
   }
 
   public static void deleteObjectPathFromBinary(Binary binary) {
-    Optional<File> file = 
ObjectTypeUtils.getNullableObjectPathFromBinary(binary, true);
+    Optional<File> file = ObjectTypeUtils.getObjectPathFromBinary(binary, 
true);
     if (!file.isPresent()) {
       return;
     }

Reply via email to