Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: allow queryJob.result() to be called on a dryRun#1015

Merged
tswast merged 3 commits intogoogleapis:mainfrom
steffnay:dry_run_results
Oct 13, 2021
Merged

feat: allow queryJob.result() to be called on a dryRun#1015
tswast merged 3 commits intogoogleapis:mainfrom
steffnay:dry_run_results

Conversation

@steffnay
Copy link
Copy Markdown
Contributor

@steffnay steffnay commented Oct 11, 2021

  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1012 🦕

@steffnay steffnay requested review from a team and loferris October 11, 2021 21:45
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 11, 2021
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Oct 11, 2021
Copy link
Copy Markdown
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

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

I think we can simplify the tests a bit.

Comment thread tests/unit/job/test_query.py Outdated
Comment thread tests/unit/job/test_query.py Outdated

calls = conn.api_request.mock_calls
self.assertEqual(result, None)
self.assertEqual(calls, [])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome! Thanks for checking that there were no API requests.

Comment thread google/cloud/bigquery/job/query.py Outdated
@steffnay steffnay requested a review from tswast October 12, 2021 21:38
@tswast tswast merged commit 685f06a into googleapis:main Oct 13, 2021
@tswast
Copy link
Copy Markdown
Contributor

tswast commented Oct 13, 2021

Thanks @steffnay !

abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
* feat: allow queryJob.result() to be called on a dryRun

* update to return EmptyRowIterator
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: allow QueryJob.result() to be called on a dryRun query

2 participants