| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`getJob` returns `null` when a job wasn't actually created - e.g. when you're running a dry run query
|
I don't think this is the right thing to do. The documentation recommends checking against null to see if the job still exists. What's the motivation for this change? |
Sorry, something went wrong.
|
@pongad My motivation was dry run queries but it might be more general. Running a dry-run query job doesn't actually create a job. Without this change, a dry run query job with an invalid query just returned null instead of anything helpful. With this change, it throws a proper syntax error exception. In a larger scope, this is in the error path for createing a job. Specifically this is after the job fails creation with an exception. It seemed reasonable to me that if the create fails and the job isn't found (not like a 5XX scenario) we should rethrow the creation exception. See the comment above the code I changed. |
Sorry, something went wrong.
|
Ah you're right. And because this is in create, it shouldn't change behavior of getting jobs elsewhere. Thank you for the PR and explanation. This LGTM, but @tswast should sign off. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Since this method could already throw createException it totally makes sense to be consistent in the case of this final check.
Sorry, something went wrong.
* test: Add picosecond test cases * chore: Add constant and fix assertions * test: Add ITs for writing pico timestamps using Protobuf Message * chore: generate libraries at Wed Dec 17 22:51:39 UTC 2025 * chore: Add additional test comments * chore: Fix compile issues --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
* test: Add picosecond test cases * chore: Add constant and fix assertions * test: Add ITs for writing pico timestamps using Protobuf Message * chore: generate libraries at Wed Dec 17 22:51:39 UTC 2025 * chore: Add additional test comments * chore: Fix compile issues --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
chore: update googleapis commit at Wed Sep 4 02:21:25 UTC 2024
* chore(main): release 2.53.2 * chore: generate libraries at Wed Jun 25 22:14:47 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
| Back | FazBrowse Home | New Git URL |
getJob returns null when a job wasn't actually created - e.g. when you're running a dry run query