-
Notifications
You must be signed in to change notification settings - Fork 366
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
fix(bigquery): use absl::optional
for fields in job related structs
#14050
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
88af7cf
to
4925415
Compare
4925415
to
e2f7896
Compare
/gcbrun |
Hi @dbolduc, I'll be happy to fix any tests if you're okay with the |
Cool, and thanks for the PR. I am a dolt when it comes to BigQuery, so I will get some subject matter experts to review this. |
No problem. I'll be waiting for further replies from you or other experts 😃 |
a956e0a
to
bb79154
Compare
@cocoa-xu - tl;dr: Thanks, but we are not prepared to take this PR, even if it is the right thing to do. I talked with @jsrinnn. Google has internal projects that depend on this code. We aren't ready to update them. Note that this code is all in an We recognize that there is no public C++ API for interacting with BigQuery jobs. That is something we plan to do. (See #14061). I can't commit to any timelines but we are hoping to get it done by the 2024-07 release1. Thanks again for the contribution. Your code changes all looks good to me. We are just not ready to take the PR. Sorry. Footnotes
|
Hi @dbolduc, thank you very much for the update! It's understandable and looking forward to the public C++ API for interacting with BigQuery job sometime in the future :) |
It has arrived! The library was included in the https://github.com/googleapis/google-cloud-cpp/tree/v2.27.0/google/cloud/bigquerycontrol Note that the library is initially experimental, and that it may take some extra time to propagate through the ecosystem (e.g. to be available via |
Current implementation of BigQuery's REST API by default sends all fields, which causes problems because the default values like
(literally nothing).
""
are different fromTake the
InsertJobRequest
message as an example, if we only set theconfiguration.query.query
andconfiguration.query.writeDisposition
field, it's expected that following JSON will be sent:However, current implementation will serialise all fields with their initial values by default:
Full JSON string
Similar fix has been attempted in #12988, but was later closed. I'll be happy to work on this further (including update these tests) if we all agree to use
absl::optional
as it's can achieve identical behaviour as in Golang implementation of BigQuery:This change is