-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
See source. As an example of why MergeFrom
instead of CopyFrom
can be a bug:
>>> from google.protobuf.timestamp_pb2 import Timestamp
>>> from google.cloud.bigtable._generated.bigtable_instance_admin_pb2 import (
... CreateInstanceMetadata)
>>>
>>> metadata1 = CreateInstanceMetadata(request_time=Timestamp(nanos=100))
>>> metadata2 = CreateInstanceMetadata(request_time=Timestamp(nanos=100))
>>> t = Timestamp(seconds=1000)
>>> metadata1
request_time {
nanos: 100
}
>>> metadata2
request_time {
nanos: 100
}
>>> t
seconds: 1000
>>>
>>> metadata1.request_time.MergeFrom(t)
>>> metadata2.request_time.CopyFrom(t)
>>>
>>> metadata1
request_time {
seconds: 1000
nanos: 100
}
>>> metadata2
request_time {
seconds: 1000
}
Metadata
Metadata
Assignees
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.