You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d539bbe
Browse filesBrowse the repository at this point in the historyBrowse files
Playground: test every example's stages; mark valid-but-untranslated SQL
The examples move into examples.js, shared with the engine tests, which
now check that the first-load default and the translating examples pass
every stage, and that each error example stops where it is meant to.
The refused example (HASH, a known divergence) gets a caption saying
why SQLQuack refuses rather than guesses.
When the SQL parses and passes the Snowflake checks but is not
translated, the results open with "Valid Snowflake SQL. Not translated
to DuckDB: <reason>", stage 3 reads NOT TRANSLATED in amber instead of a
red FAIL, its underline is amber, and stage 4 says nothing was
translated. Parse and check failures stay red.
syntax: `SELECT customer_id, SUM(total) AS revenue
33
+
FROM orders
34
+
WHERE status = 'shipped' AND
35
+
GROUP BY customer_id`,
36
+
rejected: `SELECT customer_id, SUM(total) AS revenue
37
+
FROM orders
38
+
GROUP BY customer_id
39
+
QUALIFY revenue > 100`,
40
+
unknown: `SELECT order_id, discount
41
+
FROM orders`,
42
+
refused: `SELECT order_id,
43
+
HASH(customer_id) AS bucket
44
+
FROM orders`,
45
+
};
46
+
47
+
// Shown under the editor while an example is loaded and unedited.
48
+
exportconstCAPTIONS={
49
+
refused:
50
+
'Valid Snowflake SQL that SQLQuack will not translate. DuckDB computes HASH differently, so translated SQL would run and return other values. SQLQuack refuses and says why rather than guess; a policy file can allow a known divergence explicitly.',
0 commit comments