Skip to content

Commit 12d22d0

Browse files
committed
docs(bigquery): document location resolution fallback in ArrowQueryPageFetcher
1 parent 01d110c commit 12d22d0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery

‎java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ public Page<FieldValueList> getNextPage() {
359359
List<FieldValueList> rowBatch = new ArrayList<>((int) Math.min(pageSize, 10000L));
360360

361361
try {
362+
// Resolve job location in order: JobId location -> BigQueryOptions location -> "global"
363+
// default.
364+
// The Storage Read API stream resource name requires a location component (e.g.
365+
// projects/{project}/locations/{location}/jobs/{job}/streams/_default). If no specific
366+
// location
367+
// was provided on the job or service options, defaulting to "global" allows queries created
368+
// without an explicit location to still stream results without failing.
362369
String location = jobId.getLocation();
363370
if (location == null) {
364371
location = serviceOptions.getLocation();

0 commit comments

Comments
 (0)