Skip to content

test: compare generated queries against SQLite - #55

Merged
Aybavs merged 1 commit into
mainfrom
test/47-differential
Aug 4, 2026
Merged

test: compare generated queries against SQLite#55
Aybavs merged 1 commit into
mainfrom
test/47-differential

Conversation

@Aybavs

@Aybavs Aybavs commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Runs generated queries through this engine and through SQLite over identical data and requires the results to agree. The fixture is small but deliberately awkward: NULLs in join keys and group keys, duplicate values, and ties.

The generator now also emits joins. Without them the hash join — the most intricate operator in the engine — would have sat outside the oracle entirely, which would have made "verified against SQLite" mean much less than it sounds. The runner asserts joins are a real share of what it checks (81 of 300 at the default seed), not an occasional accident.

A query that both engines reject is skipped; a query one accepts and the other rejects fails the test rather than being quietly ignored.

Verified beyond the default seed: 5,000 queries on each of seeds 1, 2, 3, 99, 12345, 777, and 31337 — 35,000 comparisons, no disagreements. Replay any run with -seed.

Closes #47

@Aybavs
Aybavs merged commit ac37b06 into main Aug 4, 2026
1 check passed
@Aybavs
Aybavs deleted the test/47-differential branch August 4, 2026 13:57
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.

test: compare generated queries against SQLite

1 participant