Skip to content

docs: deprecate bpd.options.bigquery.allow_large_results in favor of bpd.options.compute.allow_large_results #1597

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Genesis929
Copy link
Collaborator

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Apr 4, 2025
@@ -89,7 +89,6 @@ def __init__(
kms_key_name: Optional[str] = None,
skip_bq_connection_check: bool = False,
*,
allow_large_results: bool = False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have public documentation including the MSA referencing this option. Let's make this immutable instead and raise a warning that this is deprecated. Direct folks to the compute version in the warning.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@Genesis929 Genesis929 marked this pull request as ready for review April 16, 2025 22:31
@Genesis929 Genesis929 requested review from a team as code owners April 16, 2025 22:31
@Genesis929 Genesis929 requested a review from tswast April 16, 2025 22:31
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use the bigquery option if the compute option is not set.

Suggested change
use_explicit_destination = bigframes.options.compute.allow_large_results
allow_large_results = bigframes.options.compute.allow_large_results
if allow_large_results is None:
allow_large_results = bigframes.options.bigquery.allow_large_results
use_explicit_destination = allow_large_results

Since this is going to be used in many places, please make a helper function somewhere in bigframes._config for this.

Copy link
Collaborator Author

@Genesis929 Genesis929 Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added one in Options class, but I'm not sure if that's the best place for it.

@tswast tswast changed the title feat!: move allow_large_results from bigquery option to compute option docs: deprecate bpd.options.bigquery.allow_large_results in favor of bpd.options.compute.allow_large_results Apr 17, 2025
@Genesis929 Genesis929 requested a review from tswast April 28, 2025 22:38
@@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though this is private, please add a docstring explaining the purpose.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@Genesis929 Genesis929 requested a review from tswast May 1, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants