From a9a63545a53c34267a7c8fc168d639d6fd455a74 Mon Sep 17 00:00:00 2001 From: Huan Chen Date: Wed, 16 Apr 2025 21:34:08 +0000 Subject: [PATCH 1/9] update allow_large_result warning --- bigframes/_config/bigquery_options.py | 39 +++++++++++++++------ bigframes/_config/compute_options.py | 10 +++++- bigframes/session/bq_caching_executor.py | 6 ++-- tests/system/conftest.py | 12 +++---- tests/system/large/test_dataframe_io.py | 2 +- tests/system/small/test_dataframe.py | 2 +- tests/system/small/test_dataframe_io.py | 4 +-- tests/system/small/test_index_io.py | 4 +-- tests/system/small/test_progress_bar.py | 2 +- tests/system/small/test_series.py | 2 +- tests/system/small/test_series_io.py | 2 +- tests/unit/_config/test_bigquery_options.py | 1 - tests/unit/_config/test_compute_options.py | 21 +++++++++++ 13 files changed, 75 insertions(+), 32 deletions(-) create mode 100644 tests/unit/_config/test_compute_options.py diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 5155b09063..ffe0b96c56 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -19,10 +19,8 @@ from typing import Literal, Optional import warnings -import google.api_core.exceptions import google.auth.credentials -import bigframes.constants import bigframes.enums import bigframes.exceptions as bfe @@ -239,22 +237,43 @@ def skip_bq_connection_check(self, value: bool): @property def allow_large_results(self) -> bool: """ - Sets the flag to allow or disallow query results larger than 10 GB. + DEPRECATED: Checks the legacy global setting for allowing large results. + Use ``bpd.options.compute.allow_large_results`` instead. - The default setting for this flag is True, which allows queries to return results - exceeding 10 GB by creating an explicit destination table. If set to False, it - restricts the result size to 10 GB, and BigQuery will raise an error if this limit - is exceeded. + Warning: Accessing ``bpd.options.bigquery.allow_large_results`` is deprecated + and this property will be removed in a future version. The configuration for + handling large results has moved. Returns: - bool: True if large results are allowed with an explicit destination table, - False if results are limited to 10 GB and errors are raised when exceeded. + bool: The value of the deprecated setting. """ + warnings.warn( + "`bpd.options.bigquery.allow_large_results` is deprecated and will be removed soon. " + "Please use `bpd.options.compute.allow_large_results` instead.", + DeprecationWarning, + stacklevel=2, + ) return self._allow_large_results @allow_large_results.setter def allow_large_results(self, value: bool): - self._allow_large_results = value + """ + DEPRECATED: Setting ``allow_large_results`` via ``bpd.options.bigquery`` + is deprecated and has no effect. Use + ``bpd.options.compute.allow_large_results`` instead. + + Warning: Setting this option here is deprecated, ignored, and this setter + will be removed in a future version. The configuration for handling large + results has moved. + """ + warnings.warn( + "Setting `bpd.options.bigquery.allow_large_results` is deprecated, ignored, " + "and will be removed soon. " + "Please use `bpd.options.compute.allow_large_results = ` instead.", + DeprecationWarning, + stacklevel=2, + ) + pass @property def use_regional_endpoints(self) -> bool: diff --git a/bigframes/_config/compute_options.py b/bigframes/_config/compute_options.py index eb287f6065..30062f8c0e 100644 --- a/bigframes/_config/compute_options.py +++ b/bigframes/_config/compute_options.py @@ -86,6 +86,12 @@ class ComputeOptions: ai_ops_threshold_autofail (bool): Guards against unexpected processing of large amount of rows by semantic operators. When set to True, the operation automatically fails without asking for user inputs. + + allow_large_results (bool): + Specifies whether query results can exceed 10 GB. Defaults to False. Setting this + to False (the default) restricts results to 10 GB for potentially faster execution; + BigQuery will raise an error if this limit is exceeded. Setting to True removes + this result size limit. """ maximum_bytes_billed: Optional[int] = None @@ -97,7 +103,9 @@ class ComputeOptions: semantic_ops_threshold_autofail = False ai_ops_confirmation_threshold: Optional[int] = 0 - ai_ops_threshold_autofail = False + ai_ops_threshold_autofail: bool = False + + allow_large_results: bool = False def assign_extra_query_labels(self, **kwargs: Any) -> None: """ diff --git a/bigframes/session/bq_caching_executor.py b/bigframes/session/bq_caching_executor.py index 983b1918f5..50adae4c87 100644 --- a/bigframes/session/bq_caching_executor.py +++ b/bigframes/session/bq_caching_executor.py @@ -112,7 +112,7 @@ def execute( max_results: Optional[int] = None, ) -> executor.ExecuteResult: if use_explicit_destination is None: - use_explicit_destination = bigframes.options.bigquery.allow_large_results + use_explicit_destination = bigframes.options.compute.allow_large_results if bigframes.options.compute.enable_multi_query_execution: self._simplify_with_caching(array_value) @@ -231,7 +231,7 @@ def peek( msg = bfe.format_message("Peeking this value cannot be done efficiently.") warnings.warn(msg) if use_explicit_destination is None: - use_explicit_destination = bigframes.options.bigquery.allow_large_results + use_explicit_destination = bigframes.options.compute.allow_large_results destination_table = ( self.storage_manager.create_temp_table( @@ -555,7 +555,7 @@ def iterator_supplier(): "The query result size has exceeded 10 GB. In BigFrames 2.0 and " "later, you might need to manually set `allow_large_results=True` in " "the IO method or adjust the BigFrames option: " - "`bigframes.options.bigquery.allow_large_results=True`." + "`bigframes.options.compute.allow_large_results=True`." ) warnings.warn(msg, FutureWarning) # Runs strict validations to ensure internal type predictions and ibis are completely in sync diff --git a/tests/system/conftest.py b/tests/system/conftest.py index c583a24624..eaa8675222 100644 --- a/tests/system/conftest.py +++ b/tests/system/conftest.py @@ -142,7 +142,7 @@ def resourcemanager_client( @pytest.fixture(scope="session") def session() -> Generator[bigframes.Session, None, None]: - context = bigframes.BigQueryOptions(location="US", allow_large_results=False) + context = bigframes.BigQueryOptions(location="US") session = bigframes.Session(context=context) yield session session.close() # close generated session at cleanup time @@ -158,9 +158,7 @@ def session_load() -> Generator[bigframes.Session, None, None]: @pytest.fixture(scope="session", params=["strict", "partial"]) def maybe_ordered_session(request) -> Generator[bigframes.Session, None, None]: - context = bigframes.BigQueryOptions( - location="US", ordering_mode=request.param, allow_large_results=False - ) + context = bigframes.BigQueryOptions(location="US", ordering_mode=request.param) session = bigframes.Session(context=context) yield session session.close() # close generated session at cleanup type @@ -168,9 +166,7 @@ def maybe_ordered_session(request) -> Generator[bigframes.Session, None, None]: @pytest.fixture(scope="session") def unordered_session() -> Generator[bigframes.Session, None, None]: - context = bigframes.BigQueryOptions( - location="US", ordering_mode="partial", allow_large_results=False - ) + context = bigframes.BigQueryOptions(location="US", ordering_mode="partial") session = bigframes.Session(context=context) yield session session.close() # close generated session at cleanup type @@ -1419,7 +1415,7 @@ def floats_product_bf(session, floats_product_pd): @pytest.fixture(scope="session", autouse=True) def use_fast_query_path(): - with bpd.option_context("bigquery.allow_large_results", False): + with bpd.option_context("compute.allow_large_results", False): yield diff --git a/tests/system/large/test_dataframe_io.py b/tests/system/large/test_dataframe_io.py index ee9daa4e31..7c35c770f7 100644 --- a/tests/system/large/test_dataframe_io.py +++ b/tests/system/large/test_dataframe_io.py @@ -21,7 +21,7 @@ import bigframes WIKIPEDIA_TABLE = "bigquery-public-data.samples.wikipedia" -LARGE_TABLE_OPTION = "bigquery.allow_large_results" +LARGE_TABLE_OPTION = "compute.allow_large_results" def test_to_pandas_batches_raise_when_large_result_not_allowed(session): diff --git a/tests/system/small/test_dataframe.py b/tests/system/small/test_dataframe.py index 304f2fea4f..40449aff2a 100644 --- a/tests/system/small/test_dataframe.py +++ b/tests/system/small/test_dataframe.py @@ -5015,7 +5015,7 @@ def test_df_bool_interpretation_error(scalars_df_index): def test_query_job_setters(scalars_df_default_index: dataframe.DataFrame): # if allow_large_results=False, might not create query job - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): job_ids = set() repr(scalars_df_default_index) assert scalars_df_default_index.query_job is not None diff --git a/tests/system/small/test_dataframe_io.py b/tests/system/small/test_dataframe_io.py index a69c26bc54..5456b7f536 100644 --- a/tests/system/small/test_dataframe_io.py +++ b/tests/system/small/test_dataframe_io.py @@ -254,7 +254,7 @@ def test_to_pandas_array_struct_correct_result(session): def test_to_pandas_override_global_option(scalars_df_index): # Direct call to_pandas uses global default setting (allow_large_results=True), # table has 'bqdf' prefix. - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): scalars_df_index.to_pandas() table_id = scalars_df_index._query_job.destination.table_id @@ -324,7 +324,7 @@ def test_to_pandas_dry_run(session, scalars_pandas_df_multi_index): def test_to_arrow_override_global_option(scalars_df_index): # Direct call to_arrow uses global default setting (allow_large_results=True), - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): scalars_df_index.to_arrow() table_id = scalars_df_index._query_job.destination.table_id diff --git a/tests/system/small/test_index_io.py b/tests/system/small/test_index_io.py index fcb3fa3920..78e561c2fd 100644 --- a/tests/system/small/test_index_io.py +++ b/tests/system/small/test_index_io.py @@ -15,7 +15,7 @@ def test_to_pandas_override_global_option(scalars_df_index): - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): bf_index = scalars_df_index.index @@ -39,7 +39,7 @@ def test_to_pandas_dry_run(scalars_df_index): def test_to_numpy_override_global_option(scalars_df_index): - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): bf_index = scalars_df_index.index diff --git a/tests/system/small/test_progress_bar.py b/tests/system/small/test_progress_bar.py index 9c61c8ea5b..35b540966e 100644 --- a/tests/system/small/test_progress_bar.py +++ b/tests/system/small/test_progress_bar.py @@ -64,7 +64,7 @@ def test_progress_bar_scalar_allow_large_results( capsys.readouterr() # clear output with bf.option_context( - "display.progress_bar", "terminal", "bigquery.allow_large_results", "True" + "display.progress_bar", "terminal", "compute.allow_large_results", "True" ): penguins_df_default_index["body_mass_g"].head(10).mean() diff --git a/tests/system/small/test_series.py b/tests/system/small/test_series.py index 7b45bbc707..c9055d74e6 100644 --- a/tests/system/small/test_series.py +++ b/tests/system/small/test_series.py @@ -3925,7 +3925,7 @@ def test_series_bool_interpretation_error(scalars_df_index): def test_query_job_setters(scalars_dfs): # if allow_large_results=False, might not create query job - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): job_ids = set() df, _ = scalars_dfs series = df["int64_col"] diff --git a/tests/system/small/test_series_io.py b/tests/system/small/test_series_io.py index 235ae65750..5390d65268 100644 --- a/tests/system/small/test_series_io.py +++ b/tests/system/small/test_series_io.py @@ -19,7 +19,7 @@ def test_to_pandas_override_global_option(scalars_df_index): - with bigframes.option_context("bigquery.allow_large_results", True): + with bigframes.option_context("compute.allow_large_results", True): bf_series = scalars_df_index["int64_col"] diff --git a/tests/unit/_config/test_bigquery_options.py b/tests/unit/_config/test_bigquery_options.py index b8f3a612d4..227e61e00d 100644 --- a/tests/unit/_config/test_bigquery_options.py +++ b/tests/unit/_config/test_bigquery_options.py @@ -188,5 +188,4 @@ def test_client_endpoints_override_set_shows_warning(): def test_default_options(): options = bigquery_options.BigQueryOptions() - assert options.allow_large_results is False assert options.ordering_mode == "strict" diff --git a/tests/unit/_config/test_compute_options.py b/tests/unit/_config/test_compute_options.py new file mode 100644 index 0000000000..872c3a556f --- /dev/null +++ b/tests/unit/_config/test_compute_options.py @@ -0,0 +1,21 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import bigframes._config.compute_options as compute_options + + +def test_default_options(): + options = compute_options.ComputeOptions() + + assert options.allow_large_results is False From cf9b81c14f8818a3fbd2875827e3660d5e265930 Mon Sep 17 00:00:00 2001 From: Huan Chen <142538604+Genesis929@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:12:23 -0700 Subject: [PATCH 2/9] Update bigframes/_config/bigquery_options.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Sweña (Swast) --- bigframes/_config/bigquery_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index ffe0b96c56..25a649bfcd 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -270,7 +270,7 @@ def allow_large_results(self, value: bool): "Setting `bpd.options.bigquery.allow_large_results` is deprecated, ignored, " "and will be removed soon. " "Please use `bpd.options.compute.allow_large_results = ` instead.", - DeprecationWarning, + FutureWarning, stacklevel=2, ) pass From 5ee146f4ce60d2d55d67a77e3c47e59f22ca2a30 Mon Sep 17 00:00:00 2001 From: Huan Chen <142538604+Genesis929@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:12:41 -0700 Subject: [PATCH 3/9] Update bigframes/_config/bigquery_options.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Sweña (Swast) --- bigframes/_config/bigquery_options.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 25a649bfcd..8b1afff83d 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -247,12 +247,6 @@ def allow_large_results(self) -> bool: Returns: bool: The value of the deprecated setting. """ - warnings.warn( - "`bpd.options.bigquery.allow_large_results` is deprecated and will be removed soon. " - "Please use `bpd.options.compute.allow_large_results` instead.", - DeprecationWarning, - stacklevel=2, - ) return self._allow_large_results @allow_large_results.setter From a0eeddfacdbcbbf0c9ca30e96c30e50b9f13b25b Mon Sep 17 00:00:00 2001 From: Huan Chen <142538604+Genesis929@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:13:14 -0700 Subject: [PATCH 4/9] Update bigframes/_config/bigquery_options.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Sweña (Swast) --- bigframes/_config/bigquery_options.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 8b1afff83d..462390c619 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -267,7 +267,12 @@ def allow_large_results(self, value: bool): FutureWarning, stacklevel=2, ) - pass + if self._session_started and self._allow_large_results != value: + raise ValueError( + SESSION_STARTED_MESSAGE.format(attribute="allow_large_results") + ) + + self._allow_large_results = value @property def use_regional_endpoints(self) -> bool: From 846ab611c602b566b30c819cfe70fefddea67554 Mon Sep 17 00:00:00 2001 From: Huan Chen Date: Mon, 28 Apr 2025 21:49:57 +0000 Subject: [PATCH 5/9] update setting --- bigframes/_config/__init__.py | 6 ++++++ bigframes/_config/bigquery_options.py | 6 +++--- bigframes/_config/compute_options.py | 2 +- bigframes/session/bq_caching_executor.py | 4 ++-- tests/unit/_config/test_bigquery_options.py | 1 + tests/unit/_config/test_compute_options.py | 7 ++++--- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bigframes/_config/__init__.py b/bigframes/_config/__init__.py index db860e6b1d..e15500db87 100644 --- a/bigframes/_config/__init__.py +++ b/bigframes/_config/__init__.py @@ -150,6 +150,12 @@ def is_bigquery_thread_local(self) -> bool: """ return self._local.bigquery_options is not None + @property + def _allow_large_results(self) -> bool: + if self.compute.allow_large_results is None: + return self.bigquery.allow_large_results + return self.compute.allow_large_results + options = Options() """Global options for default session.""" diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 462390c619..d6d3c472fe 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -253,16 +253,16 @@ def allow_large_results(self) -> bool: def allow_large_results(self, value: bool): """ DEPRECATED: Setting ``allow_large_results`` via ``bpd.options.bigquery`` - is deprecated and has no effect. Use + will be deprecated. Use ``bpd.options.compute.allow_large_results`` instead. - Warning: Setting this option here is deprecated, ignored, and this setter + Warning: Setting this option here will be deprecated, and this setter will be removed in a future version. The configuration for handling large results has moved. """ warnings.warn( "Setting `bpd.options.bigquery.allow_large_results` is deprecated, ignored, " - "and will be removed soon. " + "and will be removed in the future. " "Please use `bpd.options.compute.allow_large_results = ` instead.", FutureWarning, stacklevel=2, diff --git a/bigframes/_config/compute_options.py b/bigframes/_config/compute_options.py index 30062f8c0e..89c0dc8d6a 100644 --- a/bigframes/_config/compute_options.py +++ b/bigframes/_config/compute_options.py @@ -105,7 +105,7 @@ class ComputeOptions: ai_ops_confirmation_threshold: Optional[int] = 0 ai_ops_threshold_autofail: bool = False - allow_large_results: bool = False + allow_large_results: Optional[bool] = None def assign_extra_query_labels(self, **kwargs: Any) -> None: """ diff --git a/bigframes/session/bq_caching_executor.py b/bigframes/session/bq_caching_executor.py index 50adae4c87..8aa36d4a34 100644 --- a/bigframes/session/bq_caching_executor.py +++ b/bigframes/session/bq_caching_executor.py @@ -112,7 +112,7 @@ def execute( max_results: Optional[int] = None, ) -> executor.ExecuteResult: if use_explicit_destination is None: - use_explicit_destination = bigframes.options.compute.allow_large_results + use_explicit_destination = bigframes.options._allow_large_results if bigframes.options.compute.enable_multi_query_execution: self._simplify_with_caching(array_value) @@ -231,7 +231,7 @@ def peek( msg = bfe.format_message("Peeking this value cannot be done efficiently.") warnings.warn(msg) if use_explicit_destination is None: - use_explicit_destination = bigframes.options.compute.allow_large_results + use_explicit_destination = bigframes.options._allow_large_results destination_table = ( self.storage_manager.create_temp_table( diff --git a/tests/unit/_config/test_bigquery_options.py b/tests/unit/_config/test_bigquery_options.py index 227e61e00d..b8f3a612d4 100644 --- a/tests/unit/_config/test_bigquery_options.py +++ b/tests/unit/_config/test_bigquery_options.py @@ -188,4 +188,5 @@ def test_client_endpoints_override_set_shows_warning(): def test_default_options(): options = bigquery_options.BigQueryOptions() + assert options.allow_large_results is False assert options.ordering_mode == "strict" diff --git a/tests/unit/_config/test_compute_options.py b/tests/unit/_config/test_compute_options.py index 872c3a556f..e06eb76c37 100644 --- a/tests/unit/_config/test_compute_options.py +++ b/tests/unit/_config/test_compute_options.py @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import bigframes._config.compute_options as compute_options +import bigframes._config as config def test_default_options(): - options = compute_options.ComputeOptions() + options = config.compute_options.ComputeOptions() - assert options.allow_large_results is False + assert options.allow_large_results is None + assert config.options._allow_large_results is False From eae77aeb0f4bc8626c02f7f8cff34725a52bc0c3 Mon Sep 17 00:00:00 2001 From: Huan Chen <142538604+Genesis929@users.noreply.github.com> Date: Thu, 1 May 2025 10:46:01 -0700 Subject: [PATCH 6/9] Update bigframes/_config/bigquery_options.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Sweña (Swast) --- bigframes/_config/bigquery_options.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index d6d3c472fe..9cd2a159b5 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -261,9 +261,11 @@ def allow_large_results(self, value: bool): results has moved. """ warnings.warn( - "Setting `bpd.options.bigquery.allow_large_results` is deprecated, ignored, " + "Setting `bpd.options.bigquery.allow_large_results` is deprecated, " "and will be removed in the future. " - "Please use `bpd.options.compute.allow_large_results = ` instead.", + "Please use `bpd.options.compute.allow_large_results = ` instead. " + "The `bpd.options.bigquery.allow_large_results` option is ignored if " + "`bpd.options.compute.allow_large_results` is set.", FutureWarning, stacklevel=2, ) From b3a9b47cf1b7dbc056280a220e9e10001bc9cc08 Mon Sep 17 00:00:00 2001 From: Huan Chen Date: Thu, 1 May 2025 17:58:46 +0000 Subject: [PATCH 7/9] update docs --- bigframes/_config/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bigframes/_config/__init__.py b/bigframes/_config/__init__.py index e15500db87..775ef70bc7 100644 --- a/bigframes/_config/__init__.py +++ b/bigframes/_config/__init__.py @@ -152,6 +152,18 @@ def is_bigquery_thread_local(self) -> bool: @property def _allow_large_results(self) -> bool: + """The effective 'allow_large_results' setting. + + This value is `self.compute.allow_large_results` if set (not `None`), + otherwise it defaults to `self.bigquery.allow_large_results`. + + Returns: + bool: + Whether large query results are permitted. + - `True`: The BigQuery result size limit (e.g., 10 GB) is removed. + - `False`: Results are restricted to this limit (potentially faster). + BigQuery will raise an error if this limit is exceeded. + """ if self.compute.allow_large_results is None: return self.bigquery.allow_large_results return self.compute.allow_large_results From b19ce618eb4853c89fffce9be5813dce478a01cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a=20=28Swast=29?= Date: Tue, 6 May 2025 09:29:36 -0500 Subject: [PATCH 8/9] Update bigframes/_config/bigquery_options.py --- bigframes/_config/bigquery_options.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/bigframes/_config/bigquery_options.py b/bigframes/_config/bigquery_options.py index 9cd2a159b5..3a6008eaa8 100644 --- a/bigframes/_config/bigquery_options.py +++ b/bigframes/_config/bigquery_options.py @@ -251,15 +251,6 @@ def allow_large_results(self) -> bool: @allow_large_results.setter def allow_large_results(self, value: bool): - """ - DEPRECATED: Setting ``allow_large_results`` via ``bpd.options.bigquery`` - will be deprecated. Use - ``bpd.options.compute.allow_large_results`` instead. - - Warning: Setting this option here will be deprecated, and this setter - will be removed in a future version. The configuration for handling large - results has moved. - """ warnings.warn( "Setting `bpd.options.bigquery.allow_large_results` is deprecated, " "and will be removed in the future. " From 94c308e04107da5121b4b1e67e5f75b72eb08cf6 Mon Sep 17 00:00:00 2001 From: Huan Chen Date: Mon, 12 May 2025 17:56:27 +0000 Subject: [PATCH 9/9] fix execute --- bigframes/session/bq_caching_executor.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/bigframes/session/bq_caching_executor.py b/bigframes/session/bq_caching_executor.py index 1fb384d001..9288fdf641 100644 --- a/bigframes/session/bq_caching_executor.py +++ b/bigframes/session/bq_caching_executor.py @@ -157,9 +157,6 @@ def execute( ordered: bool = True, use_explicit_destination: Optional[bool] = None, ) -> executor.ExecuteResult: - if use_explicit_destination is None: - use_explicit_destination = bigframes.options._allow_large_results - if bigframes.options.compute.enable_multi_query_execution: self._simplify_with_caching(array_value)