Skip to content

Commit 0567adf

Browse files
committed
add query system test
1 parent a8d5f5c commit 0567adf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/system/test_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,16 @@ def test_dml_statistics(self):
19451945
assert query_job.dml_stats.updated_row_count == 0
19461946
assert query_job.dml_stats.deleted_row_count == 3
19471947

1948+
def test_query_w_picosecond_timestamp(self):
1949+
query_job = Config.CLIENT.query(
1950+
"SELECT CAST(\"2025-10-20\" AS TIMESTAMP(12)) as time_pico;",
1951+
)
1952+
expected_schema = [
1953+
bigquery.SchemaField("time_pico", "TIMESTAMP", mode="NULLABLE", timestamp_precision=12),
1954+
]
1955+
iterator = query_job.result()
1956+
self.assertEqual(iterator.schema, expected_schema)
1957+
19481958
def test_transaction_info(self):
19491959
table_schema = (
19501960
bigquery.SchemaField("foo", "STRING"),

0 commit comments

Comments
 (0)