From ea79bf093a270d344509e9ed624af7fb175465e6 Mon Sep 17 00:00:00 2001 From: Paul Kenjora Date: Wed, 27 May 2026 13:47:53 -0700 Subject: [PATCH] Fix timestamp scientific notation handling in _helpers.py Casting to float first handles scientific notation returned by API. Otherwise its a noop. --- .../google-cloud-bigquery/google/cloud/bigquery/_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-bigquery/google/cloud/bigquery/_helpers.py b/packages/google-cloud-bigquery/google/cloud/bigquery/_helpers.py index a35fe1677a8f..fc0b9c959f7b 100644 --- a/packages/google-cloud-bigquery/google/cloud/bigquery/_helpers.py +++ b/packages/google-cloud-bigquery/google/cloud/bigquery/_helpers.py @@ -261,7 +261,7 @@ def timestamp_to_py(self, value, field) -> Union[datetime.datetime, str, None]: return value if _not_null(value, field): # value will be a integer in seconds, to microsecond precision, in UTC. - return _datetime_from_microseconds(int(value)) + return _datetime_from_microseconds(int(float(value))) return None def datetime_to_py(self, value, field):