Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 7d94282

Browse files
committed
[tests] Fix for BigQuery test
1 parent b83a72a commit 7d94282

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_database_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,8 @@ def _insert_to_table(conn, table, values, type):
434434
value = str(sample)
435435
elif isinstance(sample, datetime) and isinstance(conn, (db.Presto, db.Oracle)):
436436
value = f"timestamp '{sample}'"
437+
elif isinstance(sample, datetime) and isinstance(conn, db.BigQuery) and type == 'datetime':
438+
value = f"cast(timestamp '{sample}' as datetime)"
437439
elif isinstance(sample, bytearray):
438440
value = f"'{sample.decode()}'"
439441
else:

0 commit comments

Comments
 (0)