Skip to content

feat!: set allow_large_results=False by default #1541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bigframes/_config/bigquery_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(
kms_key_name: Optional[str] = None,
skip_bq_connection_check: bool = False,
*,
allow_large_results: bool = True,
allow_large_results: bool = False,
ordering_mode: Literal["strict", "partial"] = "strict",
client_endpoints_override: Optional[dict] = None,
):
Expand Down
13 changes: 13 additions & 0 deletions tests/system/small/test_progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ def test_progress_bar_scalar(penguins_df_default_index: bf.dataframe.DataFrame,
with bf.option_context("display.progress_bar", "terminal"):
penguins_df_default_index["body_mass_g"].head(10).mean()

assert capsys.readouterr().out == ""


def test_progress_bar_scalar_allow_large_results(
penguins_df_default_index: bf.dataframe.DataFrame, capsys
):
capsys.readouterr() # clear output

with bf.option_context(
"display.progress_bar", "terminal", "bigquery.allow_large_results", "True"
):
penguins_df_default_index["body_mass_g"].head(10).mean()

assert_loading_msg_exist(capsys.readouterr().out)


Expand Down
7 changes: 7 additions & 0 deletions tests/unit/_config/test_bigquery_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,10 @@ def test_client_endpoints_override_set_shows_warning():

with pytest.warns(UserWarning):
options.client_endpoints_override = {"bqclient": "endpoint_address"}


def test_default_options():
options = bigquery_options.BigQueryOptions()

assert options.allow_large_results is False
assert options.ordering_mode == "strict"