Skip to content

Comments

test(bigquery): add type coverage tests#118

Merged
anoop-narang merged 4 commits intomainfrom
feat/bigquery-type-coverage-tests
Feb 19, 2026
Merged

test(bigquery): add type coverage tests#118
anoop-narang merged 4 commits intomainfrom
feat/bigquery-type-coverage-tests

Conversation

@anoop-narang
Copy link
Contributor

@anoop-narang anoop-narang commented Feb 12, 2026

Summary

  • Add comprehensive type coverage tests for the BigQuery datasource, covering 12 types (BOOL, INT64, FLOAT64, NUMERIC, BIGNUMERIC, STRING, BYTES, DATE, DATETIME, TIMESTAMP, TIME, JSON)
  • Tests are gated behind env vars (BQ_SERVICE_ACCOUNT_KEY_PATH, BQ_PROJECT_ID, BQ_DATASET) and skip gracefully when not set
  • Deduplicate create_test_secret_manager from postgres/mysql/duckdb/bigquery test files into harness.rs

Cover all 12 BigQuery types (BOOL, INT64, FLOAT64, NUMERIC, BIGNUMERIC,
STRING, BYTES, DATE, DATETIME, TIMESTAMP, TIME, JSON) with the same
fixture-based harness used by Postgres, MySQL, and DuckDB tests.

Tests are gated behind BQ_SERVICE_ACCOUNT_KEY_PATH, BQ_PROJECT_ID, and
BQ_DATASET env vars and skip gracefully when credentials are unavailable.
Move the shared `create_test_secret_manager` helper from four duplicate
definitions (postgres, mysql, duckdb, bigquery) into `harness.rs` and
re-export `SecretManager` so backend test files import it from one place.
BigQuery REST API strips trailing zeros from NUMERIC/BIGNUMERIC values
(e.g. 0.00 → "0", 100.00 → "100"), causing exact string comparisons to
fail even though the values are numerically equal.

Use Approx{epsilon:0.0} for Decimal semantic types so rust_decimal
normalizes trailing zeros before comparing, matching the existing
pattern used for JSON semantic comparison.
@anoop-narang anoop-narang force-pushed the feat/bigquery-type-coverage-tests branch from 8dd54a9 to c926fd5 Compare February 19, 2026 09:48
@anoop-narang anoop-narang merged commit 6dd60c7 into main Feb 19, 2026
8 checks passed
@anoop-narang anoop-narang deleted the feat/bigquery-type-coverage-tests branch February 19, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant