Skip to content

Commit 07fe3c9

Browse files
committed
test(kernel): cover exact row limit boundary
1 parent 54b43e2 commit 07fe3c9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/unit/test_kernel_result_set.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ def test_row_limit_stops_before_fetching_extra_batches(int_schema):
185185
assert handle.fetch_calls == 1
186186

187187

188+
def test_row_limit_exact_batch_boundary_skips_exhaustion_fetch(int_schema):
189+
handle = _FakeKernelHandle(int_schema, [_batch(int_schema, [0, 1, 2])])
190+
rs = _make_rs(handle, row_limit=3)
191+
192+
assert rs.fetchall_arrow().column(0).to_pylist() == [0, 1, 2]
193+
assert handle.fetch_calls == 1
194+
195+
188196
def test_row_limit_larger_than_result_returns_all_rows(int_schema):
189197
handle = _FakeKernelHandle(int_schema, [_batch(int_schema, [1, 2, 3])])
190198
rs = _make_rs(handle, row_limit=10)

0 commit comments

Comments
 (0)