You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/06/16 05:04:48 UTC

[GitHub] [incubator-iotdb] SailVR opened a new pull request #1370: [IOTDB-769]Modify lost precision when using PLAIN encoding for floating data

SailVR opened a new pull request #1370:
URL: https://github.com/apache/incubator-iotdb/pull/1370


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] qiaojialin merged pull request #1370: [IOTDB-769]Fix precision lost when using PLAIN for FLOAT/DOUBLE

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #1370:
URL: https://github.com/apache/incubator-iotdb/pull/1370


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1370: [IOTDB-769]Modify lost precision when using PLAIN encoding for floating data

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #1370:
URL: https://github.com/apache/incubator-iotdb/pull/1370#discussion_r440628217



##########
File path: server/src/test/java/org/apache/iotdb/db/utils/datastructure/TVListTest.java
##########
@@ -26,8 +26,18 @@
 import org.junit.Assert;
 import org.junit.Test;
 
-public class LongTVListTest {
+public class TVListTest {
 
+  @Test
+  public void testDoubleTVList1(){
+    TVList tvList = new DoubleTVList();
+    for (long i = 0; i < 1000; i++) {
+      double j = 1.2345678+Math.random();
+      tvList.putDouble(i, j);
+    }
+    tvList.sort();
+    tvList.getTimeValuePair(0);
+  }

Review comment:
       LGTM. Why not add a `testFloatTVList` as well? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] SailVR commented on a change in pull request #1370: [IOTDB-769]Modify lost precision when using PLAIN encoding for floating data

Posted by GitBox <gi...@apache.org>.
SailVR commented on a change in pull request #1370:
URL: https://github.com/apache/incubator-iotdb/pull/1370#discussion_r440631340



##########
File path: server/src/test/java/org/apache/iotdb/db/utils/datastructure/TVListTest.java
##########
@@ -26,8 +26,18 @@
 import org.junit.Assert;
 import org.junit.Test;
 
-public class LongTVListTest {
+public class TVListTest {
 
+  @Test
+  public void testDoubleTVList1(){
+    TVList tvList = new DoubleTVList();
+    for (long i = 0; i < 1000; i++) {
+      double j = 1.2345678+Math.random();
+      tvList.putDouble(i, j);
+    }
+    tvList.sort();
+    tvList.getTimeValuePair(0);
+  }

Review comment:
       OK,add




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1370: [IOTDB-769]Modify lost precision when using PLAIN encoding for floating data

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #1370:
URL: https://github.com/apache/incubator-iotdb/pull/1370#discussion_r440632247



##########
File path: server/src/test/java/org/apache/iotdb/db/utils/datastructure/TVListTest.java
##########
@@ -26,8 +26,29 @@
 import org.junit.Assert;
 import org.junit.Test;
 
-public class LongTVListTest {
+public class TVListTest {
 
+  @Test
+  public void testFloatTVList1(){
+    TVList tvList = new FloatTVList();
+    for (long i = 0; i < 1000; i++) {
+      double j = 1.2345678+Math.random();
+      tvList.putDouble(i, j);

Review comment:
       Still double here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org