Repository navigation
Add a DuckDB engine (PostgreSQL query set, local reference) - #11
Merged
Merged
Conversation
…rify (#10) DuckDB runs the PostgreSQL-dialect queries of this repository, so it serves as a local reference for engines that parse PostgreSQL SQL. - tools/sync-upstream.sh duckdb: the PostgreSQL text plus a DuckDB-only fix only for the two queries that fail to parse on DuckDB 1.5.6 (q77 "returns" alias needs AS, q90 "at" alias quoted); the script fails if a fix goes stale or an unfixed query drifts from the PostgreSQL text. 101 of 103 files are identical to engines/postgres. - tools/derive-ddl.sh duckdb: same types as PostgreSQL; DuckDB accepted all of them. - engines/duckdb/load/load.sh: COPY per .dat file (DuckDB accepts dsdgen's trailing delimiter), row count checked against the file line count, CHECKPOINT at the end. - bin/: duckdb in ENGINES, engine_exec (-bail, DUCKDB_THREADS/MEMORY_LIMIT), no-op engine_exec_nodb, check_client; run.sh reads query files without mapfile so it runs on macOS bash 3.2 where the duckdb client lives. - tools/verify.sh --engine duckdb: host CLI and a temporary database, no docker; added to --all. - CI: duckdb in the query-count loop and the engine matrix, CLI pinned to v1.5.6 and checked against the release asset digest. - Docs: docs/engines/duckdb.md with the dated PostgreSQL-on-DuckDB compatibility table. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s, clickhouse, starrocks, duckdb) (#10) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10
What
DuckDB as a sixth engine, wired like the others. Its query set is the PostgreSQL query set of this
repository, so it can serve as a local reference for engines that parse PostgreSQL SQL.
tools/sync-upstream.sh duckdb— PostgreSQL text + a DuckDB-only fix only for the two queries that fail on DuckDB.The script aborts if a fix stops changing its query or if an unfixed query drifts from the PostgreSQL text.
tools/derive-ddl.sh duckdb— same types as PostgreSQL; DuckDB accepted every one.engines/duckdb/load/load.sh—COPYper.datfile; row count checked against the file line count;CHECKPOINT.bin/—duckdbinENGINES,engine_exec(-bail,-nullvalue '', optionalDUCKDB_THREADS/DUCKDB_MEMORY_LIMIT),check_client,ddl.sh/load.sh/run.shhelp.bin/run.shno longer usesmapfile, so it runs on macOS bash 3.2 (the duckdb client runs on the host).tools/verify.sh --engine duckdb— host CLI + temporary database file, no docker; added to--all.duckdb_cli-linux-amd64.zipchecked against the release asset digest. No new job.docs/engines/duckdb.md, engine index, nav, README, NOTICE, quickstart, commands, licensing, verification page.Compatibility of the PostgreSQL files on DuckDB (measured 2026-10-09, DuckDB v1.5.6, macOS arm64, fixture from
tools/make-fixture.py)101 of 103
engines/postgres/queries/*.sqlrun unchanged. The two that do not fail at parse time:Parser Error: syntax error at or near "returns"coalesce(returns, 0) returns->coalesce(returns, 0) as returnsParser Error: syntax error at or near "at") at,->) as "at",Full per-query table:
docs/engines/duckdb.md. "Runs" = parse, bind and execute with exit status 0; 47 of the 103 return zero rows on this fixture, and no answer was compared.Verification
tools/verify.sh --allon 2026-10-09: postgres 103/103, clickhouse 102/103 (+1 known), starrocks 103/103, duckdb 103/103 (also inresults/verification.md).Fault injection: a broken
from date_dim_missinginengines/duckdb/queries/query42.sqlmadeverify.sh --engine duckdbreport102/103 (1 unexpected)and q42; a stale q77 pattern in the generator aborts with "pattern is stale"; a missingduckdbbinary fails with a clear message.Not run
tools/verify-docs.sh(browser check;tools/verify-docs.jshardcodes its engine list and was not touched, so DuckDB is not covered by it).Delegated-work cost (
cost.py): not measured.🤖 Generated with Claude Code