Repository navigation
feat(effect): add the trino SQL dialect - #10622
Open
creatifcoding wants to merge 20 commits into
Open
creatifcoding wants to merge 20 commits into
creatifcoding wants to merge 20 commits into
Conversation
Co-authored-by: Effect Bot <[email protected]> Co-authored-by: Tim <[email protected]>
…00 (Effect-TS#10130) Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Effect Bot <[email protected]> Co-authored-by: Tim <[email protected]>
…S#10090) Co-authored-by: creatifcoding <[email protected]> Co-authored-by: Effect Bot <[email protected]>
Co-authored-by: Tim <[email protected]>
Co-authored-by: Effect Bot <[email protected]>
…S#10258) Co-authored-by: Effect Bot <[email protected]>
…ffect-TS#10371) Co-authored-by: Effect Bot <[email protected]>
…e parsers (Effect-TS#10274) Co-authored-by: Tim <[email protected]>
Co-authored-by: Tim Smart <[email protected]>
Co-authored-by: Effect Bot <[email protected]>
🦋 Changeset detectedLatest commit: c5e6a57 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
creatifcoding
marked this pull request as ready for review
November 13, 2026 19:39
creatifcoding
force-pushed
the
feat/sql-dialect-trino
branch
from
November 13, 2026 19:39
04565f4 to
5c08ed4
Compare
effect-bot
force-pushed
the
v4/next-minor
branch
30 times, most recently
from
November 24, 2026 00:01
5a51d79 to
86eca1b
Compare
This branch is waiting to be deployed
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 #10621 (dialect part).
Base:
main. The release queue retargets this PR tov4/next-minorbecause the changeset is"effect": minor.Problem
Statement.Dialectis a closed union, andonDialecttakes one callback per member. A Trino driver cannot reuse an existing tag:RETURNING,ArrayHelperandMigratorbranch on the dialect and would take the wrong path (Trino has noRETURNING, no column defaults or primary keys, and its connectors do not run DDL and writes across several statements in one transaction). So@effect/sql-trino(the next PR, stacked on this one) needs atrinomember.This PR is only that change, so the break to
Statementis reviewable on its own.Changes
"trino"joinsStatement.Dialect;onDialectrequires atrinocallback andonDialectOrElseaccepts an optional one.Migratoron Trino creates its table without defaults or keys (created_atis sent with each ledger row instead), and runs without a wrapping transaction, recording each migration after it succeeds, as it already does for ClickHouse.clickhouse/test/Client.test.ts,pg/test/Client.integration.test.ts) gain thetrinokey, andStatement.test.tscovers selecting thetrinobranch and the emptyINlist the Trino compiler produces.Decisions
minor, notpatch.Statementis@stability unstable, where only a break isminor. A requiredonDialectkey breaks exhaustive external callers (Fix sql.insert and sql.updateValues crashing on an empty list #9453 shipped a comparable type-level break to unstableStatementas"effect": minor). The changeset says what to do: add atrinobranch to exhaustivesql.onDialectcalls.onDialectOrElsecallers are unaffected.orElsefall-through. Theeffectmodules that pick SQL withonDialectOrElseand have no Trino branch (Persistence,KeyValueStore.layerSql,PersistedQueue, the event journal and event log servers, cluster message and runner storage) run their SQLite SQL on Trino, which Trino rejects. ClickHouse falls through the same way today. They are listed as unsupported in the Trino package's README rather than given Trino branches here.created_atstamp andtransactional.Tested
effectSQL tests (packages/effect/test/sql) and the ClickHouse tests: 90 tests pass.pnpm check(tsgo),oxlintanddprint checkare clean.@effect/sql-trino's integration suite on Trino 484 (next PR); it is not exercised in this PR alone.AI tools assisted with this change and this PR. Made with Claude Opus 5.5 in omp. The test results above come from runs of this branch.