lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.43.0 vs lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.43.1
- old
+ new
@@ -488,11 +488,11 @@
raise ArgumentError, "unable to identify table from #{str.inspect}" unless m
str_table_ref_hash = {
project_id: m["prj"],
dataset_id: m["dts"],
table_id: m["tbl"]
- }.delete_if { |_, v| v.nil? }
+ }.compact
str_table_ref_hash = default_ref.to_h.merge str_table_ref_hash
ref = Google::Apis::BigqueryV2::TableReference.new(**str_table_ref_hash)
validate_table_ref ref
ref
end
@@ -504,10 +504,10 @@
#
def self.dataset_access_entry_from_hash dataset_hash
params = {
dataset: Google::Apis::BigqueryV2::DatasetReference.new(**dataset_hash),
target_types: dataset_hash[:target_types]
- }.delete_if { |_, v| v.nil? }
+ }.compact
Google::Apis::BigqueryV2::DatasetAccessEntry.new(**params)
end
def self.validate_table_ref table_ref
[:project_id, :dataset_id, :table_id].each do |f|