-
Notifications
You must be signed in to change notification settings - Fork 48
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
base: main
Are you sure you want to change the base?
Conversation
@@ -89,7 +89,6 @@ def __init__( | |||
kms_key_name: Optional[str] = None, | |||
skip_bq_connection_check: bool = False, | |||
*, | |||
allow_large_results: bool = False, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
b1aa2e4
to
a9a6354
Compare
@@ -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 |
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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.
bpd.options.bigquery.allow_large_results
in favor of bpd.options.compute.allow_large_results
Co-authored-by: Tim Sweña (Swast) <[email protected]>
Co-authored-by: Tim Sweña (Swast) <[email protected]>
Co-authored-by: Tim Sweña (Swast) <[email protected]>
@@ -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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Co-authored-by: Tim Sweña (Swast) <[email protected]>
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:
Fixes #<issue_number_goes_here> 🦕