From ab2c9a9a5fb97db5ccc0b893760f668c6edc8986 Mon Sep 17 00:00:00 2001 From: MrQuansy Date: Fri, 22 Mar 2024 21:07:28 +0800 Subject: [PATCH] fix --- .../apache/tsfile/encoding/encoder/DictionaryEncoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/DictionaryEncoder.java b/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/DictionaryEncoder.java index 27a57842a..4a6fde552 100644 --- a/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/DictionaryEncoder.java +++ b/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/DictionaryEncoder.java @@ -61,15 +61,15 @@ public DictionaryEncoder() { @Override public void encode(Binary value, ByteArrayOutputStream out) { - valuesEncoder.encode( + int i = entryIndex.computeIfAbsent( value, v -> { indexEntry.add(v); mapSize += v.getLength(); return entryIndex.size(); - }), - out); + }); + valuesEncoder.encode(i, out); } @Override