looker-open-source / bqjdbc

Fork of Starschema's JDBC driver for BigQuery. https://code.google.com/p/starschema-bigquery-jdbc/
BSD 2-Clause "Simplified" License
20 stars 33 forks source link

fix: NPE while logging job status #157

Closed tanclary closed 1 year ago

tanclary commented 1 year ago

BigQuery has a new feature called Query Queues that will queue the queries when the customer reaches the concurrency limit that can be supported by their slot capacity. https://cloud.google.com/bigquery/docs/query-queues

Previously, when a user reaches maximum concurrency, their query would fail with the error: Quota exceeded:: Your project_and_region exceeded quota for concurrent queries. With query queue, the job status will remain in PENDING while it is being queued. When it is in this state, job startTime is not set which causes the NPE.

I opened this PR after https://github.com/looker-open-source/bqjdbc/pull/153 did not have access to secrets and variables necessary for testing. CC: @fzakaria @tjbanghart