diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 84bc4f6d01..7d33b7ba39 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -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, ): diff --git a/tests/system/small/test_progress_bar.py b/tests/system/small/test_progress_bar.py index 3139ae5225..9c61c8ea5b 100644 --- a/tests/system/small/test_progress_bar.py +++ b/tests/system/small/test_progress_bar.py @@ -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) diff --git a/tests/unit/_config/test_bigquery_options.py b/tests/unit/_config/test_bigquery_options.py index 98a74d4e4c..b8f3a612d4 100644 --- a/tests/unit/_config/test_bigquery_options.py +++ b/tests/unit/_config/test_bigquery_options.py @@ -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"