JingsongLi commented on code in PR #4956:
URL: https://github.com/apache/paimon/pull/4956#discussion_r1928086750


##########
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndex.java:
##########
@@ -251,18 +280,20 @@ private void readInternalMeta(DataType dataType) {
                 this.valueMapper = getValueMapper(dataType);
                 try {
                     seekableInputStream.seek(headStart);
-                    this.version = seekableInputStream.read();
-                    if (this.version > VERSION_1) {
+                    int version = seekableInputStream.read();
+                    if (version == VERSION_1) {
+                        this.bitmapFileIndexMeta = new 
BitmapFileIndexMeta(dataType, options);
+                        
this.bitmapFileIndexMeta.deserialize(seekableInputStream);

Review Comment:
   If we know the length of the bitmap, can we just use 
`RoaringBitmap32.deserialize(ByteBuffer buffer)`?
   
   This can avoid initializing 8K arrays inside.



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