You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/06/15 11:12:37 UTC
[incubator-iotdb] branch fix_precision created (now 7c7ca7d)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a change to branch fix_precision
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.
at 7c7ca7d fix precision
This branch includes the following new commits:
new 7c7ca7d fix precision
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-iotdb] 01/01: fix precision
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch fix_precision
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 7c7ca7dc185ae2526915d4cf8d24da2df422afea
Author: qiaojialin <64...@qq.com>
AuthorDate: Mon Jun 15 19:12:34 2020 +0800
fix precision
---
.../main/java/org/apache/iotdb/db/utils/datastructure/DoubleTVList.java | 2 +-
.../main/java/org/apache/iotdb/db/utils/datastructure/FloatTVList.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/datastructure/DoubleTVList.java b/server/src/main/java/org/apache/iotdb/db/utils/datastructure/DoubleTVList.java
index 94f8503..f9fb518 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/datastructure/DoubleTVList.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/datastructure/DoubleTVList.java
@@ -183,7 +183,7 @@ public class DoubleTVList extends TVList {
protected TimeValuePair getTimeValuePair(int index, long time, Integer floatPrecision,
TSEncoding encoding) {
double value = getDouble(index);
- if (floatPrecision != null && !encoding.equals(TSEncoding.GORILLA)) {
+ if (floatPrecision != null && encoding.equals(TSEncoding.RLE)) {
value = MathUtils.roundWithGivenPrecision(value, floatPrecision);
}
return new TimeValuePair(time, TsPrimitiveType.getByType(TSDataType.DOUBLE, value));
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/datastructure/FloatTVList.java b/server/src/main/java/org/apache/iotdb/db/utils/datastructure/FloatTVList.java
index 4518227..afe4c10 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/datastructure/FloatTVList.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/datastructure/FloatTVList.java
@@ -183,7 +183,7 @@ public class FloatTVList extends TVList {
protected TimeValuePair getTimeValuePair(int index, long time, Integer floatPrecision,
TSEncoding encoding) {
float value = getFloat(index);
- if (floatPrecision != null && !encoding.equals(TSEncoding.GORILLA)) {
+ if (floatPrecision != null && encoding.equals(TSEncoding.RLE)) {
value = MathUtils.roundWithGivenPrecision(value, floatPrecision);
}
return new TimeValuePair(time, TsPrimitiveType.getByType(TSDataType.FLOAT, value));