Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
raghumdani committed Jan 15, 2025
1 parent 2ed1a10 commit 4d76545
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def test_when_record_batches_exceed_int_max_size(self):
grouped_array = group_by_pk_hash_bucket(table, 3, ["pk"])

assert len(grouped_array) == 3
assert len(grouped_array[2].to_batches()) == 2 # two record batches preserved
# two record batches are preserved as combining them
# would exceed 2GB.
assert len(grouped_array[2].to_batches()) == 2

def test_when_record_batches_less_than_int_max_size(self):
record = pa.array(["12bytestring" * 90_000])
Expand All @@ -38,4 +40,6 @@ def test_when_record_batches_less_than_int_max_size(self):
grouped_array = group_by_pk_hash_bucket(table, 3, ["pk"])

assert len(grouped_array) == 3
assert len(grouped_array[1].to_batches()) == 1 # truncated to one record batch
# Combined the arrays into one record batch as the size
# would not exceed 2GB.
assert len(grouped_array[1].to_batches()) == 1

0 comments on commit 4d76545

Please sign in to comment.