jiayuasu opened a new pull request, #127:
URL: https://github.com/apache/sedona-spatialbench/pull/127
## Summary
First of two PRs for #126 (a correctness harness that verifies participating
engines return the same answer for the same query). This PR commits the
**ground-truth answers** the harness will check against; the harness itself
follows in PR B.
Committing answers is practical now because #124 bounded every query to
**≤100 rows**, so each fixture is tiny.
## What's here
`benchmark/answers/sf1/q{1..12}.{parquet,csv}` — the expected result of each
query at SF1, in two formats written from the same normalized frame:
- **`q<n>.parquet`** — type-faithful canonical answer (timestamps stay
timestamps, ints stay ints); the harness compares against this.
- **`q<n>.csv`** — review companion: GitHub renders it as a table and diffs
are readable when an answer changes.
Plus `benchmark/answers/README.md` documenting provenance, the canonical
form, and comparison semantics.
## How the answers were produced
- **SedonaDB is the reference oracle** — the answers are the output of the
canonical SedonaDB dialect on the SF1 dataset.
- **DuckDB independently cross-checks** every query it can run; an answer is
blessed only when DuckDB agrees with SedonaDB within `rtol=1e-6`. **11/12
queries agree** between the two engines.
## Canonical, engine-neutral form
Engines represent some types differently, so answers are normalized:
- durations/intervals → **total seconds** (float), `_seconds` column suffix
- decimals → **float**
- timestamps → **datetime** (preserved in parquet; ISO-8601 in csv)
Row order is significant and preserved (deterministic `ORDER BY` + key
tiebreakers, then `LIMIT`).
## Caveat: Q12 at SF1
DuckDB has no KNN operator, so its Q12 uses a lateral cross-join that is
infeasible at SF1 (does not finish in reasonable time). **Q12 is therefore not
cross-checked by DuckDB here** — it will be validated by the KNN-capable
engines (SedonaDB, Spatial Polars, PyCanopy) in the PR B harness.
## Follow-ups
- **PR B**: the correctness harness — run each engine, normalize its output
the same way, and compare against these answers (exact for
keys/strings/timestamps, tolerance for floats, boundary-tie leniency), wired
into CI.
- **SF10** answers once the harness is in place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]