We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0763831 commit d0d6577Copy full SHA for d0d6577
1 file changed
pyiceberg/table/puffin.py
@@ -28,7 +28,7 @@
28
# Short for: Puffin Fratercula arctica, version 1
29
MAGIC_BYTES = b"PFA1"
30
EMPTY_BITMAP = FrozenBitMap()
31
-MAX_JAVA_SIGNED = int(math.pow(2, 31))
+MAX_JAVA_SIGNED = int(math.pow(2, 31)) - 1
32
PROPERTY_REFERENCED_DATA_FILE = "referenced-data-file"
33
34
@@ -38,7 +38,7 @@ def _deserialize_bitmap(pl: bytes) -> List[BitMap]:
38
39
bitmaps = []
40
last_key = -1
41
- while number_of_bitmaps > 0:
+ for _ in range(number_of_bitmaps):
42
key = int.from_bytes(pl[0:4], byteorder="little")
43
if key < 0:
44
raise ValueError(f"Invalid unsigned key: {key}")
@@ -59,8 +59,6 @@ def _deserialize_bitmap(pl: bytes) -> List[BitMap]:
59
60
last_key = key
61
62
- number_of_bitmaps -= 1
63
-
64
return bitmaps
65
66
0 commit comments