Skip to content

playground: say when the in-browser DuckDB, not the translation, failed - #150

Merged
kvlonge merged 1 commit into
mainfrom
website/wasm-run-limits
Nov 7, 2026
Merged

kvlonge merged 1 commit into
mainfrom
website/wasm-run-limits

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Website-only change: playground.js, spans.js and the playground test. Nothing under website/wasm/.

Why. After group 1 landed, SELECT order_id FROM orders WHERE ordered_at >= DATEADD(day, -30, CURRENT_DATE) translates, but the DuckDB-WASM preview build the page serves (1.33.1-dev114.0, core v2.0.0) cannot run the translated SQL. In the browser it gives either a binder error ("No function matches … +(DATE, INTERVAL)") or a wasm crash ("memory access out of bounds"), and the Node build crashes the same way. Native DuckDB 2.0.0 runs the identical SQL correctly against the same fixture. The Run stage showed this as a red failure, which reads as a wrong translation.

Newer DuckDB-WASM? There isnt one. npm next is 1.33.1-dev114.0, published 3 Nov from the repositorys current head, and latest is the older dev57. GitHubs latest release is v1.33.0. So this PR changes no version.

What changes. When the translated statement itself fails (the fixture tables and rows loaded) with an engine-class error, meaning a Binder, Catalog, Parser, Not-implemented or INTERNAL error or a WebAssembly trap, the Run stage shows an amber not run here pill and says:

A limit of the in-browser DuckDB, not of the translation. This page runs a preview build of DuckDB-WASM, which could not run this translated SQL. SQLQuack translates for native DuckDB 2.0: sqlquack convert binds every translated statement in native DuckDB before returning it, so run it there to see the result.

DuckDB-WASMs own error follows underneath. Three cases keep their existing messages, because native DuckDB would raise them too or because they are not about the translation: errors about values (conversion, out of range), errors from the fixture rows, and errors Snowflake would raise.

Checked locally: npm run -s test:engine (13 pass, including a new test that the observed binder error and wasm crash count as preview-build limits and that value errors do not), npm run build, and check_links.py (0 broken). In the browser, the last-30-days query shows the new message with the error underneath. Afterwards "Converts and runs" and "Decimal division" still run and pass with their rows, so DuckDB recovers, and broken fixture rows still show a plain red DuckDB: Catalog Error.

The preview build of DuckDB-WASM the playground runs cannot bind or
crashes on some translated statements that native DuckDB 2.0 runs, such
as a DATEADD over CURRENT_DATE. The Run stage showed those as a red
failure, which reads as a wrong translation.

When the translated statement itself fails with an error from the engine
(a binder, catalog, parser, not-implemented or internal error, or a
WebAssembly crash), the Run stage now says it is a limit of the
in-browser DuckDB, not of the translation, that SQLQuack translates for
native DuckDB 2.0, and shows DuckDB-WASM's error underneath. Errors
about values, errors from the fixture rows and errors Snowflake would
raise keep their existing messages.
@kvlonge
kvlonge merged commit 09d77da into main Nov 7, 2026
2 checks passed
@kvlonge
kvlonge deleted the website/wasm-run-limits branch November 9, 2026 21:32

This branch was previously deployed

1 inactive deployment
github-pages — 09d77da7 Deployed Nov 7, 2026 by kvlonge via Deploy to GitHub Pages #179
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.

1 participant