lib/google/cloud/bigquery/data.rb in google-cloud-bigquery-1.9.0 vs lib/google/cloud/bigquery/data.rb in google-cloud-bigquery-1.10.0
- old
+ new
@@ -148,9 +148,10 @@
# schema = data.schema
# field = schema.field "name"
# field.required? #=> true
#
def schema
+ return nil unless @table_gapi
Schema.from_gapi(@table_gapi.schema).freeze
end
##
# The fields of the data, obtained from the schema of the table from