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

leirui pushed a commit to branch research/M4-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 294d89b18dcd3276fe5489d1a8bb2aaf9b53992b
Author: Lei Rui <[email protected]>
AuthorDate: Tue Jul 11 16:57:31 2023 +0800

    add
---
 .../iotdb/tsfile/file/metadata/statistics/Statistics.java      |  9 +++++----
 .../iotdb/tsfile/file/metadata/statistics/ValueIndex.java      | 10 ++++++----
 .../java/org/apache/iotdb/tsfile/encoding/SDTEncoderTest.java  |  4 ++--
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java
 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java
index aa1d544205f..da2b27e9233 100644
--- 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java
+++ 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java
@@ -19,8 +19,7 @@
 package org.apache.iotdb.tsfile.file.metadata.statistics;
 
 import org.apache.iotdb.tsfile.encoding.decoder.Decoder;
-import 
org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder.IntDeltaDecoder;
-import org.apache.iotdb.tsfile.encoding.decoder.DoublePrecisionDecoderV2;
+import org.apache.iotdb.tsfile.encoding.decoder.PlainDecoder;
 import org.apache.iotdb.tsfile.exception.filter.StatisticsClassException;
 import org.apache.iotdb.tsfile.exception.write.UnknownColumnTypeException;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
@@ -641,7 +640,8 @@ public abstract class Statistics<T> {
     if (idxSize > 0) {
       ByteBuffer idxBuffer = buffer.slice();
       idxBuffer.limit(idxSize);
-      Decoder idxDecoder = new IntDeltaDecoder();
+      //      Decoder idxDecoder = new IntDeltaDecoder();
+      Decoder idxDecoder = new PlainDecoder();
       while (idxDecoder.hasNext(idxBuffer)) {
         int idx = idxDecoder.readInt(idxBuffer);
         valueIndex.modelPointIdx_list.add(idx);
@@ -655,7 +655,8 @@ public abstract class Statistics<T> {
     if (valueSize > 0) {
       ByteBuffer valueBuffer = buffer.slice();
       valueBuffer.limit(valueSize);
-      Decoder valueDecoder = new DoublePrecisionDecoderV2();
+      //      Decoder valueDecoder = new DoublePrecisionDecoderV2();
+      Decoder valueDecoder = new PlainDecoder();
       int n = 0;
       while (valueDecoder.hasNext(valueBuffer)) {
         double value = valueDecoder.readDouble(valueBuffer);
diff --git 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/ValueIndex.java
 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/ValueIndex.java
index bd16cdfc074..8b2063ce365 100644
--- 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/ValueIndex.java
+++ 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/ValueIndex.java
@@ -1,8 +1,8 @@
 package org.apache.iotdb.tsfile.file.metadata.statistics;
 
-import 
org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder.IntDeltaEncoder;
-import org.apache.iotdb.tsfile.encoding.encoder.DoublePrecisionEncoderV2;
+import org.apache.iotdb.tsfile.encoding.encoder.PlainEncoder;
 import org.apache.iotdb.tsfile.encoding.encoder.SDTEncoder;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 import org.apache.iotdb.tsfile.read.common.ValuePoint;
 import org.apache.iotdb.tsfile.utils.PublicBAOS;
 
@@ -17,8 +17,10 @@ public class ValueIndex {
   private DoubleArrayList values = new DoubleArrayList();
   public SDTEncoder sdtEncoder = new SDTEncoder();
   public double errorBound = 0; // =std*2 =2*std.compDeviation
-  public IntDeltaEncoder idxEncoder = new IntDeltaEncoder();
-  public DoublePrecisionEncoderV2 valueEncoder = new 
DoublePrecisionEncoderV2();
+  //  public IntDeltaEncoder idxEncoder = new IntDeltaEncoder();
+  public PlainEncoder idxEncoder = new PlainEncoder(TSDataType.INT32, 0);
+  //  public DoublePrecisionEncoderV2 valueEncoder = new 
DoublePrecisionEncoderV2();
+  public PlainEncoder valueEncoder = new PlainEncoder(TSDataType.DOUBLE, 0);
   public PublicBAOS idxOut = new PublicBAOS();
   public PublicBAOS valueOut = new PublicBAOS();
   public IntArrayList modelPointIdx_list = new IntArrayList();
diff --git 
a/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/SDTEncoderTest.java 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/SDTEncoderTest.java
index 7bac3fa4181..b1fd977768d 100644
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/SDTEncoderTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/SDTEncoderTest.java
@@ -73,9 +73,9 @@ public class SDTEncoderTest {
   public void mytest1() throws Exception {
     String csvData = "D:\\full-game\\BallSpeed.csv";
     //    String csvData = "D:\\desktop\\tmp2.csv";
-    int start = 200000; // counting from 1
+    int start = 200100; // counting from 1
     //    int start = 1; // counting from 1
-    int range = 200;
+    int range = 100;
     //    int range = 10000;
     int end = start + range;
     SDTEncoder encoder = new SDTEncoder();

Reply via email to