-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: add support for preview features #2923
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d809bb9
feat: add jobCreationMode to QueryRequestInfo
obada-ab 8b6c3c5
chore: clean up stateless queries feature
obada-ab 2c06a4a
chore: update BigQueryImpl.java
obada-ab 9355e2c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] e9fa8bc
Merge branch 'main' into job-creation-mode
obada-ab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I think the interesting question is whether we want to expose the enum and setter at all to users. It's only available on the jobs.query path so it feels a bit unusual to overload JobConfiguration with this.
Originally I envisioned the only control over the setting being the env variable, and the library would set it appropriately when we're on the fast query path. After preview we'd simply always set it on the fast query path, much like how the idempotence request ID is handled. If you truly want a job to be created, you can invoke the proper method that returns a job rather than an iterator.
The issue manifests here in some way as how the enum is documented. The default really isn't static in terms of the setter, as the client library is going to be setting values automatically so you need to potentially describe this either more ambiguously, or possibly use JOB_CREATION_MODE_UNSPECIFIED to describe the situations in which the library will set one value vs another.
I'm not sure I hold particularly strong views here, so I'd love to hear your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shollyman thanks for taking a look and bringing this up
I'm not entirely sure what you mean by "expose the enum and setter at all to users", users wouldn't be able to use the setter
setJobCreationMode
or the enumJobCreationMode
since both are package-private. The only (relevant) external method added in this change issetQueryPreviewEnabled
which I used for integration tests.I added the enum/setter/documentation to make the internal client dev process a bit better, I am not sure how/when this part of the code would be changed/removed later on though.
If you still think some parts of the code/documentation should be removed please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies, I missed the package private. That makes more sense.