You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/11/23 08:06:02 UTC

(iotdb) branch master updated: Improve Statistics deserialization

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0f18f38b11d Improve Statistics deserialization
0f18f38b11d is described below

commit 0f18f38b11d5e58ec42e95a53f1470edb01a23d2
Author: Jackie Tien <ja...@gmail.com>
AuthorDate: Thu Nov 23 16:05:55 2023 +0800

    Improve Statistics deserialization
---
 .../iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java
index 75e60e2bc95..1e27147aa17 100644
--- a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java
+++ b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java
@@ -42,8 +42,10 @@ public class BinaryStatistics extends Statistics<Binary> {
       ClassLayout.parseClass(BinaryStatistics.class).instanceSize()
           + 2 * ClassLayout.parseClass(Binary.class).instanceSize();
 
-  private Binary firstValue = new Binary("", TSFileConfig.STRING_CHARSET);
-  private Binary lastValue = new Binary("", TSFileConfig.STRING_CHARSET);
+  private static final Binary EMPTY_VALUE = new Binary("", TSFileConfig.STRING_CHARSET);
+
+  private Binary firstValue = EMPTY_VALUE;
+  private Binary lastValue = EMPTY_VALUE;
 
   @Override
   public TSDataType getType() {