Skip to content

Commit

Permalink
fixup: fix default backend, make sample data smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala authored and cpcloud committed Nov 14, 2024
1 parent 7741b58 commit 9446ab6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ibis/backends/duckdb/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,19 @@ def test_pyarrow_batches_chunk_size(con): # 10443

t = ibis.memtable(
{
"id": np.arange(500000),
"name": np.random.choice(["Alice", "Bob", "Carol", "Dave"], size=500000),
"age": np.random.randint(20, 70, size=500000),
"id": np.arange(10_000),
"name": np.random.choice(["Alice", "Bob", "Carol", "Dave"], size=10_000),
"age": np.random.randint(20, 70, size=10_000),
}
)
batches = t.to_pyarrow_batches(chunk_size=100_000)
assert len(next(batches)) == 100_000
assert len(next(batches)) == 100_000
batches = con.to_pyarrow_batches(t, chunk_size=4096)
assert len(next(batches)) == 4096
assert len(next(batches)) == 4096

batches = t.to_pyarrow_batches(chunk_size=800)
batches = con.to_pyarrow_batches(t, chunk_size=800)
assert len(next(batches)) == 800
assert len(next(batches)) == 800

batches = t.to_pyarrow_batches(chunk_size=-1)
batches = con.to_pyarrow_batches(t, chunk_size=-1)
with pytest.raises(TypeError):
next(batches)

0 comments on commit 9446ab6

Please sign in to comment.