Repository navigation
Run one builder suite on every dialect; cover the Postgres entry - #5
Merged
Merged
Conversation
Each UNION ALL branch is now parenthesized on Postgres, where a branch with its own WITH, ORDER BY or LIMIT was a syntax error. The placeholder gets the param kind, so float, bool and timestamp params bind with a cast instead of taking an int8 or text type from their context. The exact-int8 recipe now reads a bigint too, which PGlite and postgres.js send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
core-cases.ts runs the shared builder surface (query and union methods, operators, params) on live ClickHouse and on PGlite, pins the SQL per dialect in snapshots, and records real differences per target. The coverage manifest now requires a core case for every shared method and a Postgres case for every ./postgres export, as it already did for the ClickHouse catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Stacked on #4.
Borrowed from how drizzle tests its dialects: one shared suite run against every database, with named, reasoned skips. On top of that, the coverage manifest we already had for ClickHouse now also covers the shared builder and the Postgres entry.
Shared builder suite (
tests/core-cases.ts)format.WITH(values(...)on ClickHouse,VALUESon Postgres), so the suite writes nothing.join_use_nullssettings, and on PGlite on everyvitest run.core-sql.test.tssnapshots the SQL andparametersfor each dialect./is integer division on Postgres, and ClickHouse fills a missing join row with defaults whenjoin_use_nulls=0.rejectscovers clauses a dialect refuses (formaton Postgres).Manifests (
tests/dialect-coverage.test.ts)./postgresexport needs a case indialect-cases.postgres.ts, or an exemption with a reason.Bugs it found, fixed in the first commit
UNION ALLbranch with its ownWITH/ORDER BY/LIMITwas a syntax error. Branches are now parenthesized (clauses.parenthesizeUnionBranches).param.floatcompared with an int8 column was bound as int8, so19.5was rejected. Aparam.boolin a select list was bound as text. Float, bool and timestamp params now bind with a cast.string/intstay uncast so they still compare with enum and int4 columns.custom("int8", Schema.String)for exact int8 fails on drivers that sendbigint(PGlite, postgres.js).Verified: typecheck;
bun run test(427 passed, live-only suites skipped); the full suite against ClickHouse 26.8.2.7 in Docker (593 passed, 0 skipped).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.