SteveYurongSu commented on a change in pull request #4517:
URL: https://github.com/apache/iotdb/pull/4517#discussion_r766545037



##########
File path: 
server/src/main/java/org/apache/iotdb/db/query/udf/datastructure/tv/SerializableBinaryTVList.java
##########
@@ -43,11 +43,12 @@ protected static int calculateCapacity(float 
memoryLimitInMB, int byteArrayLengt
                     * calculateSingleBinaryTVPairMemory(byteArrayLength)));
   }
 
-  protected static int calculateSingleBinaryTVPairMemory(int byteArrayLength) {
+  protected static float calculateSingleBinaryTVPairMemory(int 
byteArrayLength) {
     return ReadWriteIOUtils.LONG_LEN // time
         + MIN_OBJECT_HEADER_SIZE // value: header length of Binary
         + MIN_ARRAY_HEADER_SIZE // value: header length of values in Binary
-        + byteArrayLength; // value: length of values array in Binary
+        + byteArrayLength // value: length of values array in Binary
+        + 0.125F; // extra bit(1/8 Byte): whether the Binary is null

Review comment:
       We can make the `0.125` as a public static final field :D




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to