Skip to content

Commit

Permalink
fix(bigquery): Avoid dataset reload when accessing location (#22905)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandeepTuniki authored Sep 11, 2023
1 parent cfa2ab1 commit a2b85cf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def modified_at
#
def location
return nil if reference?
ensure_full_data!
@gapi.location
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,4 @@ def self.attr_test attr, val
attr_test :default_expiration, 999
attr_test :etag, "etag123456789"
attr_test :api_url, "http://googleapi/bigquery/v2/projects/test-project/datasets/my_dataset"
attr_test :location, "US"

end
3 changes: 2 additions & 1 deletion google-cloud-bigquery/test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def random_dataset_partial_hash id = nil, name = nil
"datasetId" => id,
"projectId" => project
},
"friendlyName" => name
"friendlyName" => name,
"location": "US"
}
end

Expand Down

0 comments on commit a2b85cf

Please sign in to comment.