Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions bigframes/_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,21 @@ class Options:
"""Global options affecting BigQuery DataFrames behavior."""

def __init__(self):
self.reset()

def reset(self) -> Options:
"""Reset the option settings to defaults.

Returns:
bigframes._config.Options: Options object with default values.
"""
self._local = ThreadLocalConfig()

# BigQuery options are special because they can only be set once per
# session, so we need an indicator as to whether we are using the
# thread-local session or the global session.
self._bigquery_options = bigquery_options.BigQueryOptions()
return self

def _init_bigquery_thread_local(self):
"""Initialize thread-local options, based on current global options."""
Expand Down
2 changes: 1 addition & 1 deletion samples/snippets/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def run_quickstart(project_id: str) -> None:

# close session and reset option so not to affect other tests
bpd.close_session()
bpd.options.bigquery.ordering_mode = "strict"
bpd.options.reset()