Repository navigation
playground: say when the in-browser DuckDB, not the translation, failed - #150
Merged
Merged
Conversation
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.
This branch was previously 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.
Website-only change:
playground.js,spans.jsand the playground test. Nothing underwebsite/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
nextis 1.33.1-dev114.0, published 3 Nov from the repositorys current head, andlatestis 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:
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, andcheck_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 redDuckDB: Catalog Error.