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

critas pushed a commit to branch wx_bitmap_1.3
in repository https://gitbox.apache.org/repos/asf/iotdb-client-csharp.git

commit b311bd76a53441d69ee101860e45e64b0e0aa8f1
Author: CritasWang <[email protected]>
AuthorDate: Tue Apr 1 15:55:13 2025 +0800

    [to dev/1.3] fix: bitmap error
---
 src/Apache.IoTDB/DataStructure/BitMap.cs | 4 ++--
 src/Apache.IoTDB/DataStructure/Tablet.cs | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/Apache.IoTDB/DataStructure/BitMap.cs 
b/src/Apache.IoTDB/DataStructure/BitMap.cs
index d5a66c6..c4c1ff8 100644
--- a/src/Apache.IoTDB/DataStructure/BitMap.cs
+++ b/src/Apache.IoTDB/DataStructure/BitMap.cs
@@ -23,7 +23,7 @@ using Grax32.Extensions;
 #endif
 public class BitMap
 {
-    private static byte[] BIT_UTIL = new byte[] { 1, 2, 4, 8, 16, 32, 64, 255 
};
+    private static byte[] BIT_UTIL = new byte[] { 1, 2, 4, 8, 16, 32, 64, 
unchecked((byte)-128) };
     private static byte[] UNMARK_BIT_UTIL =
       new byte[] {
         (byte) 0XFE, // 11111110
@@ -94,7 +94,7 @@ public class BitMap
     public void reset()
     {
 #if NET461_OR_GREATER || NETSTANDARD2_0
-        bits.Fill((byte)0xFF);
+        bits.Fill((byte)0);
 #else
         Array.Fill(bits, (byte)0);
 #endif
diff --git a/src/Apache.IoTDB/DataStructure/Tablet.cs 
b/src/Apache.IoTDB/DataStructure/Tablet.cs
index 3a19a94..57b1935 100644
--- a/src/Apache.IoTDB/DataStructure/Tablet.cs
+++ b/src/Apache.IoTDB/DataStructure/Tablet.cs
@@ -44,6 +44,8 @@ namespace Apache.IoTDB.DataStructure
     */
     public class Tablet
     {
+
+        private static int EMPTY_DATE_INT = 10000101;
         private readonly List<long> _timestamps;
         private readonly List<List<object>> _values;
 
@@ -361,7 +363,7 @@ namespace Apache.IoTDB.DataStructure
                             for (int j = 0; j < RowNumber; j++)
                             {
                                 var value = _values[j][i];
-                                buffer.AddInt(value != null ? 
Utils.ParseDateToInt((DateTime)value) : int.MinValue);
+                                buffer.AddInt(value != null ? 
Utils.ParseDateToInt((DateTime)value) : EMPTY_DATE_INT);
                             }
                             break;
                         }

Reply via email to