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

jackietien pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/develop by this push:
     new cbceb756 Throw Exception for some getXXXX interface of OBJECT type 
(#660)
cbceb756 is described below

commit cbceb75669997db9f797bc40821045b9a3b42bf4
Author: Jackie Tien <[email protected]>
AuthorDate: Tue Dec 9 19:46:39 2025 +0800

    Throw Exception for some getXXXX interface of OBJECT type (#660)
---
 java/tsfile/src/main/java/org/apache/tsfile/read/common/Field.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/tsfile/src/main/java/org/apache/tsfile/read/common/Field.java 
b/java/tsfile/src/main/java/org/apache/tsfile/read/common/Field.java
index a8de28a7..357c100a 100644
--- a/java/tsfile/src/main/java/org/apache/tsfile/read/common/Field.java
+++ b/java/tsfile/src/main/java/org/apache/tsfile/read/common/Field.java
@@ -146,6 +146,8 @@ public class Field {
   public Binary getBinaryV() {
     if (dataType == null) {
       throw new NullFieldException();
+    } else if (dataType == TSDataType.OBJECT) {
+      throw new UnsupportedOperationException("OBJECT Type only support 
getStringValue");
     }
     return binaryV;
   }
@@ -221,8 +223,9 @@ public class Field {
       case TEXT:
       case BLOB:
       case STRING:
-      case OBJECT:
         return getBinaryV();
+      case OBJECT:
+        return getStringValue();
       default:
         throw new UnSupportedDataTypeException(dataType.toString());
     }

Reply via email to