diff --git a/google/cloud/bigtable/data/execute_query/metadata.py b/google/cloud/bigtable/data/execute_query/metadata.py index 98b94a644..4c08cbad3 100644 --- a/google/cloud/bigtable/data/execute_query/metadata.py +++ b/google/cloud/bigtable/data/execute_query/metadata.py @@ -214,6 +214,12 @@ class Bool(Type): type_field_name = "bool_type" class Timestamp(Type): + """ + Timestamp supports :class:`DatetimeWithNanoseconds` but Bigtable SQL does + not currently support nanoseconds precision. We support this for potential + compatibility in the future. Nanoseconds are currently ignored. + """ + type_field_name = "timestamp_type" expected_types = ( datetime.datetime, diff --git a/google/cloud/bigtable/data/execute_query/values.py b/google/cloud/bigtable/data/execute_query/values.py index 450f6f855..394bef71e 100644 --- a/google/cloud/bigtable/data/execute_query/values.py +++ b/google/cloud/bigtable/data/execute_query/values.py @@ -100,6 +100,9 @@ def __repr__(self) -> str: bool, bytes, str, + # Note that Bigtable SQL does not currently support nanosecond precision, + # only microseconds. We use this for compatibility with potential future + # support DatetimeWithNanoseconds, date_pb2.Date, "Struct",