From de927d4ced24e613e30a252302826c11788567b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a=20=28Swast=29?= Date: Mon, 14 Jul 2025 10:27:10 -0500 Subject: [PATCH 1/2] chore: update benchmark to assert on empty df returned by to_pandas_batches --- tests/benchmark/read_gbq_colab/filter_output.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/benchmark/read_gbq_colab/filter_output.py b/tests/benchmark/read_gbq_colab/filter_output.py index 5e872bb727..2b5ce6948e 100644 --- a/tests/benchmark/read_gbq_colab/filter_output.py +++ b/tests/benchmark/read_gbq_colab/filter_output.py @@ -40,11 +40,8 @@ def filter_output( # It's possible we don't have any pages at all, since we filtered out all # matching rows. - if rows == 0: - with pytest.raises(StopIteration): - next(iter(df_filtered.to_pandas_batches(page_size=PAGE_SIZE))) - else: - next(iter(df_filtered.to_pandas_batches(page_size=PAGE_SIZE))) + first_page = next(iter(df_filtered.to_pandas_batches(page_size=PAGE_SIZE))) + assert len(first_page.index) <= rows if __name__ == "__main__": From 0bdbeda31ffcff12bc04d1c38f6d3bed9ee2deca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a?= Date: Mon, 14 Jul 2025 10:35:48 -0500 Subject: [PATCH 2/2] lint --- tests/benchmark/read_gbq_colab/filter_output.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/benchmark/read_gbq_colab/filter_output.py b/tests/benchmark/read_gbq_colab/filter_output.py index 2b5ce6948e..0db7ac5fd6 100644 --- a/tests/benchmark/read_gbq_colab/filter_output.py +++ b/tests/benchmark/read_gbq_colab/filter_output.py @@ -14,7 +14,6 @@ import pathlib import benchmark.utils as utils -import pytest import bigframes.session