KEMBAR78
feat: updates to fastpath query execution by shollyman · Pull Request #2268 · googleapis/python-bigquery · GitHub
Skip to content

Conversation

@shollyman
Copy link
Contributor

This PR updates query handling to allow base config properties like job timeout, reservation, and a preview max slots field to leverage the faster path (e.g. using jobs.query rather than jobs.insert).

@shollyman shollyman requested review from a team as code owners August 25, 2025 22:06
@shollyman shollyman requested a review from tswast August 25, 2025 22:06
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Aug 25, 2025
@shollyman shollyman requested a review from chalmerlowe August 25, 2025 22:06
chalmerlowe
chalmerlowe previously approved these changes Aug 26, 2025
Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

Just one question to cure my curiosity.

Approved.

if value is not None:
self._properties["maxSlots"] = str(value)
else:
self._properties.pop("maxSlots", None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

#QUESTION

What is the impetus for .pop()?

If value is None, delete the key: value pair entirely?
I know we also did it with jobTimeoutMs and I don't get it there either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#QUESTION

What is the impetus for .pop()?

If value is None, delete the key: value pair entirely? I know we also did it with jobTimeoutMs and I don't get it there either.

It's the easier one liner. We either need to check for the key existence explicitly, or wrap the delete in a try...except block to handle the cases where you're setting the None value and the key doesn't yet exist in the dict. Happy to swap to one of these if you prefer.

Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM

@shollyman shollyman added the automerge Merge the pull request once unit tests and other checks pass. label Aug 26, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit ef2740a into googleapis:main Aug 26, 2025
24 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 26, 2025
@shollyman shollyman deleted the max_slots branch August 26, 2025 15:53
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 API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants