Skip to content

Java SDK: getQuery overload that enables RPC call does not make jobId available to caller #1592

@jeff303

Description

@jeff303

Is your feature request related to a problem? Please describe.
When using the com.google.cloud.bigquery.BigQueryImpl#query(com.google.cloud.bigquery.QueryJobConfiguration, com.google.cloud.bigquery.BigQuery.JobOption...) overload, the randomly generated jobId is not available to the caller. This means that, in practice, the caller can't cancel this job without using reflection.

The version of query that accepts the jobId parameter (meaning, the caller can supply it) can't use the RPC/fast path.

Describe the solution you'd like
Either the query overload accepting the jobId should allow the RPC/fast path, or else the generated jobId should be made available somehow to the caller via the TableResult (perhaps a .getJobReference method).

Describe alternatives you've considered
Using reflection to access private methods or fields that would be necessary to implement cancellation behavior on the caller side.

Additional context
We would like to be able to both cancel queries (to save user cost/resources) and use the fast RPC path.

Metadata

Metadata

Labels

api: bigqueryIssues related to the googleapis/java-bigquery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions