-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler Panic with multiple group transforms #3870
Comments
I've investigated this a bit using a breakpoint in the browser dev tools. The PRQL query gets passed (as the variable named sql = prql.compile(value); However, no exception gets thrown because the compiler successfully compiles the query (I can compile this query with SELECT
item.name,
COUNT(*) AS ct1
FROM
invoices AS inv
JOIN invoice_items AS item ON inv.invoice_id = item.invoice_id
GROUP BY
item.name
-- Generated by PRQL compiler version:0.10.1 (https://prql-lang.org) It then passes the SQL query to DuckDB through the arrow = await c.query(sql); which throws an
which gets caught and sets the React state |
That's right @vanillajonathan, this is not a compiler panic, but bad PRQL program. |
@vanillajonathan great debugging! So the issue is that the old version of the compiler didn't have a panic, so the playground doesn't panic. Only the new version of the compiler panics. So we're all good on #3864 — that works great. Thanks @vanillajonathan . The remaining piece here is the panic from the compiler. The error messages |
I ask more about the "bad program" in #3832 (comment) |
I managed to recreate this with this query:
|
With PR #4582, @haydenflinner 's query returns the error message:
Which makes me think it's related to the |
What happened?
Using a recent Playground from
main
9cc5bc8 in a Dev Container (not the deployed Playground) the PRQL compiler generates an error. PR #3864 now displays an attractive error message when a panic is encountered.Can I provide any further diagnostic info? Thanks.
PRQL input
SQL output
N/A
Expected SQL output
N/A
MVCE confirmation
Anything else?
No response
The text was updated successfully, but these errors were encountered: