Skip to content

Commit 6e80190

Browse files
docs: add clarification around SQL timestamps (#1012)
1 parent 45bc8c4 commit 6e80190

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

google/cloud/bigtable/data/execute_query/metadata.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ class Bool(Type):
214214
type_field_name = "bool_type"
215215

216216
class Timestamp(Type):
217+
"""
218+
Timestamp supports :class:`DatetimeWithNanoseconds` but Bigtable SQL does
219+
not currently support nanoseconds precision. We support this for potential
220+
compatibility in the future. Nanoseconds are currently ignored.
221+
"""
222+
217223
type_field_name = "timestamp_type"
218224
expected_types = (
219225
datetime.datetime,

google/cloud/bigtable/data/execute_query/values.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ def __repr__(self) -> str:
100100
bool,
101101
bytes,
102102
str,
103+
# Note that Bigtable SQL does not currently support nanosecond precision,
104+
# only microseconds. We use this for compatibility with potential future
105+
# support
103106
DatetimeWithNanoseconds,
104107
date_pb2.Date,
105108
"Struct",

0 commit comments

Comments
 (0)