-
Notifications
You must be signed in to change notification settings - Fork 122
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: adds Exception handling to handle ALREADY EXISTS error #2788
Merged
Conversation
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
product-auto-label
bot
added
size: m
Pull request size is medium.
api: bigquery
Issues related to the googleapis/java-bigquery API.
labels
Jul 14, 2023
Neenu1995
changed the title
feat: adds Exception handling to handle ALREADy EXISTS error
feat: adds Exception handling to handle ALREADY EXISTS error
Jul 14, 2023
Neenu1995
added
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
owlbot:run
Add this label to trigger the Owlbot post processor.
labels
Jul 14, 2023
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Jul 14, 2023
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 14, 2023
Neenu1995
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 17, 2023
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 17, 2023
Neenu1995
added
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
owlbot:run
Add this label to trigger the Owlbot post processor.
labels
Jul 17, 2023
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Jul 17, 2023
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 17, 2023
@shollyman PTAL |
shollyman
approved these changes
Jul 20, 2023
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.
left some minor feedback, but generally the pattern looks good
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
Show resolved
Hide resolved
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
Neenu1995
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 21, 2023
Neenu1995
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Jul 21, 2023
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Jul 21, 2023
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jul 21, 2023
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Jul 25, 2023
🤖 I have created a release *beep* *boop* --- ## [2.31.0](https://togithub.com/googleapis/java-bigquery/compare/v2.30.1...v2.31.0) (2023-07-25) ### Features * Adds Exception handling to handle ALREADY EXISTS error ([#2788](https://togithub.com/googleapis/java-bigquery/issues/2788)) ([67a07ea](https://togithub.com/googleapis/java-bigquery/commit/67a07ea45c4635a2e9d43220d4bc34780eb512ef)) ### Dependencies * Update arrow.version to v12.0.1 ([#2750](https://togithub.com/googleapis/java-bigquery/issues/2750)) ([f92bee5](https://togithub.com/googleapis/java-bigquery/commit/f92bee558f6de070fb9f525bb47a824dc2c53e07)) * Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.24.0 ([#2811](https://togithub.com/googleapis/java-bigquery/issues/2811)) ([b660063](https://togithub.com/googleapis/java-bigquery/commit/b6600635e01f930fa19769cb2594ef4f43226124)) * Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.28.0 ([#2812](https://togithub.com/googleapis/java-bigquery/issues/2812)) ([921716d](https://togithub.com/googleapis/java-bigquery/commit/921716d54ea34f1914d16f7774124175be488087)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.13.1 ([#2806](https://togithub.com/googleapis/java-bigquery/issues/2806)) ([df3cd76](https://togithub.com/googleapis/java-bigquery/commit/df3cd761b5111bb0f174f691765697aa1bcbebde)) * Update dependency org.junit.vintage:junit-vintage-engine to v5.10.0 ([#2808](https://togithub.com/googleapis/java-bigquery/issues/2808)) ([694f711](https://togithub.com/googleapis/java-bigquery/commit/694f7111d7497126d429c5dda17f44f661279582)) * Update github/codeql-action action to v2.21.0 ([#2803](https://togithub.com/googleapis/java-bigquery/issues/2803)) ([c6c536c](https://togithub.com/googleapis/java-bigquery/commit/c6c536c618908425f288fa0e6f516df2cc6a4b97)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This was referenced Aug 1, 2023
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 googleapis/java-bigquery API.
size: m
Pull request size is medium.
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.
Current Behaviour:
When an explicit Job ID is passed with the query method like this
bigquery.query(config, jobId);
, the library throws anALREADY EXISTS
error, if the job already exists. This could happen due to any number of reasons, including retrying the query after the job has been created in the initial run.see go/bq-java-jobid-exists for more context.
Updated Behaviour:
If the following conditions are met, the
ALREADY EXISTS
error is not thrown for a duplicate job. Instead the queryResult of the corresponding job is fetched and returned.