Skip to content

Commit 4f5532d

Browse files
committed
Revert "Refactor batch handling in collect_gil_bench.py to use partitions for better organization"
This reverts commit e7290a7.
1 parent e7290a7 commit 4f5532d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

benchmarks/collect_gil_bench.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323

2424
def run(n_batches: int = 8, batch_size: int = 1_000_000) -> None:
2525
ctx = SessionContext()
26-
partitions = []
26+
batches = []
2727
for i in range(n_batches):
2828
start = i * batch_size
2929
arr = pa.array(range(start, start + batch_size))
30-
batch = pa.record_batch([arr], names=["a"])
31-
partitions.append([batch]) # Each batch in its own partition
30+
batches.append(pa.record_batch([arr], names=["a"]))
3231

33-
df = ctx.create_dataframe(partitions)
32+
df = ctx.create_dataframe([batches])
3433

3534
start = time.perf_counter()
3635
df.collect()

0 commit comments

Comments
 (0)