-
Notifications
You must be signed in to change notification settings - Fork 127
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
Conversation
@@ -94,6 +95,21 @@ public enum Priority { | |||
BATCH | |||
} | |||
|
|||
/** Job Creation Mode provides different options on job creation. */ | |||
enum JobCreationMode { |
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 enum JobCreationMode
since both are package-private. The only (relevant) external method added in this change is setQueryPreviewEnabled
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.
@shollyman @PhongChuong friendly ping |
🤖 I have created a release *beep* *boop* --- ## [2.34.0](https://togithub.com/googleapis/java-bigquery/compare/v2.33.2...v2.34.0) (2023-10-26) ### Features * Add BigLakeConfiguration Property in StandardTableDefinition.java ([#2916](https://togithub.com/googleapis/java-bigquery/issues/2916)) ([1d660fa](https://togithub.com/googleapis/java-bigquery/commit/1d660fa19f0d82c2b6ec2ea9590881e513274c25)) * Add support for Dataset property storageBillingModel ([#2913](https://togithub.com/googleapis/java-bigquery/issues/2913)) ([f452cf4](https://togithub.com/googleapis/java-bigquery/commit/f452cf4e100b6cc211681a840ddbd0be5108d01e)) * Add support for preview features ([#2923](https://togithub.com/googleapis/java-bigquery/issues/2923)) ([113b8f2](https://togithub.com/googleapis/java-bigquery/commit/113b8f27419365c7277c6a300c5f07cea954cca1)) ### Dependencies * Update actions/checkout action to v4.1.1 ([#2950](https://togithub.com/googleapis/java-bigquery/issues/2950)) ([c556c18](https://togithub.com/googleapis/java-bigquery/commit/c556c1837baf0d53245452d6a152910df7883262)) * Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.30.0 ([#2942](https://togithub.com/googleapis/java-bigquery/issues/2942)) ([e760fca](https://togithub.com/googleapis/java-bigquery/commit/e760fcae98b23ff4e7fc3ae25f2437be220e9df9)) * Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.31.0 ([#2967](https://togithub.com/googleapis/java-bigquery/issues/2967)) ([7ed55b5](https://togithub.com/googleapis/java-bigquery/commit/7ed55b5c075dbac827c6201d0398ff87d8240b38)) * Update dependency com.google.apis:google-api-services-bigquery to v2-rev20231008-2.0.0 ([#2946](https://togithub.com/googleapis/java-bigquery/issues/2946)) ([3d0da5b](https://togithub.com/googleapis/java-bigquery/commit/3d0da5b5a20f49721477afbed10ea3fff43652bb)) * Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.34.0 ([#2943](https://togithub.com/googleapis/java-bigquery/issues/2943)) ([18162c3](https://togithub.com/googleapis/java-bigquery/commit/18162c37c97eff6387e0f58d211f2c1725a9c8d3)) * Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.35.0 ([#2968](https://togithub.com/googleapis/java-bigquery/issues/2968)) ([219db2c](https://togithub.com/googleapis/java-bigquery/commit/219db2c0023610d2adcba4889a9b785df2113893)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#2955](https://togithub.com/googleapis/java-bigquery/issues/2955)) ([1ee18eb](https://togithub.com/googleapis/java-bigquery/commit/1ee18ebeb90adeb371ef04cbfc7b18be2c24d1e8)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.28 ([#2956](https://togithub.com/googleapis/java-bigquery/issues/2956)) ([b03effd](https://togithub.com/googleapis/java-bigquery/commit/b03effd3b5f5fd6365de9a6267a1a8ace46d7718)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.28 ([#2957](https://togithub.com/googleapis/java-bigquery/issues/2957)) ([6465e41](https://togithub.com/googleapis/java-bigquery/commit/6465e413c93e01069f86c80fc424715d46f9067b)) * Update github/codeql-action action to v2.22.2 ([#2944](https://togithub.com/googleapis/java-bigquery/issues/2944)) ([f584e59](https://togithub.com/googleapis/java-bigquery/commit/f584e59571f0c7918d2d83a19b00d49bd5b558c4)) * Update github/codeql-action action to v2.22.3 ([#2954](https://togithub.com/googleapis/java-bigquery/issues/2954)) ([1b2bc18](https://togithub.com/googleapis/java-bigquery/commit/1b2bc18bf49d06e1ccd29745be649108dd28cfa5)) * Update github/codeql-action action to v2.22.4 ([#2958](https://togithub.com/googleapis/java-bigquery/issues/2958)) ([de9bcee](https://togithub.com/googleapis/java-bigquery/commit/de9bcee50ba682ffa93aae063191a8880741507d)) * Update ossf/scorecard-action action to v2.3.1 ([#2960](https://togithub.com/googleapis/java-bigquery/issues/2960)) ([855e698](https://togithub.com/googleapis/java-bigquery/commit/855e69889f68592608c8a56070ffdafdf8365f57)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Enables preview query features, which currently only includes stateless queries (queries without jobId). These features won't always be enabled on the service side and there are additional checks and conditions.
Fixes #2949