Skip to content
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

BigQuery: Fix deserializing None QueryParameters #9029

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Aug 14, 2019

Closes #9027.

For None parameters, the back-end does not return the parameter value in response, causing an error when deserializing ScalarQueryParameter from JSON.

How to test

Run the example from the issue description. With the fix applied, the error should not occur anymore, and the resulting query_parameters object is correct.

For None parameters, the back-end does not return the parameter
value in response. This commit adjusts the ScalarQueryParameter's
method from_api_repr().
@plamut plamut added the api: bigquery Issues related to the BigQuery API. label Aug 14, 2019
@plamut plamut requested a review from a team August 14, 2019 14:49
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 14, 2019
@plamut plamut merged commit f2df9ca into googleapis:master Aug 14, 2019
@plamut plamut deleted the iss-9027 branch August 14, 2019 15:29
Copy link
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.

LGTM. Thanks.

emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
For None parameters, the back-end does not return the parameter
value in response. This commit adjusts the ScalarQueryParameter's
method from_api_repr().
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 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.

BigQuery: query_parameters fails if None is bound as parameter
4 participants