Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test: fix snippets test of using partial ordering mode #1741

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025
Merged
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
4 changes: 4 additions & 0 deletions 4 samples/snippets/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ def run_quickstart(project_id: str) -> None:
model.fit(X, y)
model.score(X, y)
# [END bigquery_bigframes_quickstart]

Copy link
Contributor

Choose a reason for hiding this comment

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

This is better approach, thanks!. For additional sanity let's restore the original ordering mode. (The reason for this PR is because multiple tests are sharing the global session, in which case we give back what we got).

    original_ordering_mode = bpd.options.bigquery.ordering_mode

    # [START bigquery_bigframes_quickstart]
    ...
    # [END bigquery_bigframes_quickstart]
    bpd.close_session()
    bpd.options.bigquery.ordering_mode = original_ordering_mode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lemme know what you think about #1743

# close session and reset option so not to affect other tests
bpd.close_session()
bpd.options.bigquery.ordering_mode = "strict"
Morty Proxy This is a proxified and sanitized view of the page, visit original site.