fix(bigquery): route JOB_CREATION_REQUIRED through fast query path#13437
fix(bigquery): route JOB_CREATION_REQUIRED through fast query path#13437jinseopkim0 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables fast query support when the job creation mode is set to JOB_CREATION_REQUIRED in QueryRequestInfo. This allows queries with this configuration to execute via the fast query path, returning a TableResult directly (with both JobId and QueryId populated) rather than creating a separate job. Unit and integration tests have been updated to reflect and verify this behavior. I have no feedback to provide.
| && config.getTimePartitioning() == null | ||
| && config.getUserDefinedFunctions() == null | ||
| && config.getWriteDisposition() == null | ||
| && config.getJobCreationMode() != JobCreationMode.JOB_CREATION_REQUIRED; |
There was a problem hiding this comment.
qq, wouldn't this just end up always doing a fast query (default is set to required)? IIUC, I think should be a fast query only for JobCreationMode.JOB_CREATION_OPTIONAL?
Is there any performance impact or behavioral change if default to a fast query even if a user explicitly sets job_required?
Routes queries under
JobCreationMode.JOB_CREATION_REQUIREDto the fast query path (jobs.queryAPI / 1 RPC) to avoid the slow fallback path (jobs.insertAPI / 2 RPCs).https://docs.cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#QueryResponse says:
Thus, routing
JOB_CREATION_REQUIREDthrough the fast path is preferred.b/522363981