Skip to content

chore(python/sedonadb): Add geography integration test framework#756

Open
paleolimbot wants to merge 13 commits intoapache:mainfrom
paleolimbot:testing-geography
Open

chore(python/sedonadb): Add geography integration test framework#756
paleolimbot wants to merge 13 commits intoapache:mainfrom
paleolimbot:testing-geography

Conversation

@paleolimbot
Copy link
Copy Markdown
Member

@paleolimbot paleolimbot commented Apr 10, 2026

This PR adds a framework for geography integration tests. This specifically adds one for each category (categories based on the BigQuery categories here: https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions ), and, critically, adds a BigQuery engine to test against (because PostGIS only supports a subset of the functions we implement now and bigquery uses the same underlying library so the results in theory should match more closely).

For BigQuery, the engine uses application default credentials (i.e., gcloud login) and caches the responses by query in a YAML file. This is a bit crude but is needed because the latency of a single BigQuery roundtrip is very slow. We may need something that scales better at some point but this should get us through the basic suite of "is all of this plugged in and can we add regression tests".

@paleolimbot paleolimbot marked this pull request as draft April 10, 2026 22:42
@paleolimbot paleolimbot changed the title chore(python/sedonadb): Add geography integration tests chore(python/sedonadb): Add geography integration test framework Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a geography integration test framework for SedonaDB’s Python package, including a new BigQuery-backed engine (via ADBC) with a YAML-based query-result cache to avoid repeated slow BigQuery roundtrips.

Changes:

  • Added a BigQuery DBEngine implementation plus a YAML-backed ArrowSQLCache for cached Arrow IPC results.
  • Added new geography-focused integration test modules (accessors/measures/predicates/transformations/constructors) that run across SedonaDB/PostGIS/BigQuery where applicable.
  • Added a checked-in BigQuery cache file and updated Python test extras to include pyyaml; removed the old ST_GeogPoint test from the generic functions suite.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
python/sedonadb/python/sedonadb/testing.py Adds BigQuery engine and ArrowSQLCache YAML cache support.
python/sedonadb/tests/geography/test_geog_accessors.py New geography accessor tests (e.g., ST_Area) across engines.
python/sedonadb/tests/geography/test_geog_measures.py New geography measure tests (e.g., ST_Distance) across engines.
python/sedonadb/tests/geography/test_geog_predicates.py New geography predicate tests (e.g., ST_Intersects) across engines.
python/sedonadb/tests/geography/test_geog_transformations.py New geography transformation tests (e.g., ST_Centroid) across engines.
python/sedonadb/tests/geography/test_constructors_parsers_formatters.py New geography constructor/formatter tests (e.g., ST_GeogPoint, ST_AsBinary).
python/sedonadb/tests/geography/bigquery_cache.yml Adds cached BigQuery query results to run tests without a live BigQuery connection.
python/sedonadb/tests/functions/test_functions.py Removes the older test_st_geogpoint from the generic functions tests.
python/sedonadb/pyproject.toml Adds pyyaml to the test optional dependency group.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paleolimbot paleolimbot marked this pull request as ready for review April 13, 2026 22:05
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.

2 participants