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

rong pushed a commit to branch rc/1.3.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/1.3.3 by this push:
     new 7c59ea1e837 Pipe: Fix the problem of missing precision when converting 
String type to Int32 and int64 types (#13643) (#13645)
7c59ea1e837 is described below

commit 7c59ea1e8378ccc1b01d58f4d00390caf847e6d9
Author: Zhenyu Luo <[email protected]>
AuthorDate: Thu Sep 26 20:33:41 2024 +0800

    Pipe: Fix the problem of missing precision when converting String type to 
Int32 and int64 types (#13643) (#13645)
---
 .../db/pipe/receiver/transform/converter/ValueConverter.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/transform/converter/ValueConverter.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/transform/converter/ValueConverter.java
index db38102ca9d..09e2f265ec5 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/transform/converter/ValueConverter.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/transform/converter/ValueConverter.java
@@ -527,11 +527,11 @@ public class ValueConverter {
   }
 
   public static int convertTextToInt32(final Binary value) {
-    return parseInteger(value.toString());
+    return (int) parseDouble(value.toString());
   }
 
   public static long convertTextToInt64(final Binary value) {
-    return parseLong(value.toString());
+    return (long) parseDouble(value.toString());
   }
 
   public static float convertTextToFloat(final Binary value) {
@@ -653,11 +653,11 @@ public class ValueConverter {
   }
 
   public static int convertBlobToInt32(final Binary value) {
-    return parseInteger(value.toString());
+    return (int) parseDouble(value.toString());
   }
 
   public static long convertBlobToInt64(final Binary value) {
-    return parseLong(value.toString());
+    return (long) parseDouble(value.toString());
   }
 
   public static float convertBlobToFloat(final Binary value) {
@@ -691,11 +691,11 @@ public class ValueConverter {
   }
 
   public static int convertStringToInt32(final Binary value) {
-    return parseInteger(value.toString());
+    return (int) parseDouble(value.toString());
   }
 
   public static long convertStringToInt64(final Binary value) {
-    return parseLong(value.toString());
+    return (long) parseDouble(value.toString());
   }
 
   public static float convertStringToFloat(final Binary value) {

Reply via email to