ebyhr commented on code in PR #4425:
URL: https://github.com/apache/iceberg-python/pull/4425#discussion_r4624116649


##########
tests/table/test_deletion_vector.py:
##########
@@ -133,6 +134,23 @@ def test_map_empty() -> None:
     actual = DeletionVector._deserialize_bitmap(puffin)
 
     assert expected == actual
+    vector = DeletionVector("data.parquet", actual).to_vector()
+    assert vector.type == pa.int64()
+    assert vector.to_pylist() == []
+
+
+def test_to_vector_with_empty_bitmaps_for_low_keys() -> None:
+    # Keys without positions have empty bitmaps, such as key 0 when every 
position is at or above 2**32
+    for bitmaps, expected in [
+        ([BitMap(), BitMap([5])], [2**32 + 5]),
+        ([BitMap(), BitMap(), BitMap([0, 7])], [2 * 2**32, 2 * 2**32 + 7]),
+        ([BitMap([2]), BitMap(), BitMap([1])], [2, 2 * 2**32 + 1]),
+        ([BitMap()], []),
+        ([BitMap(), BitMap()], []),

Review Comment:
   If one case fails, the output shows only the assert on raw BitMaps and large 
integers, so it's hard to tell which scenario broke. Not blocking, since the 
project prefers a for loop over parametrize for many simple cases.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to