-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Labels
Description
What happened?
The compiler panics when compiling the PRQL input given below.
I am using prqlc 0.9.2 on Manjaro Linux x86_64.
PRQL input
prql target:sql.postgres
# prql target:sql.clickhouse
# prql target:sql.duckdb
from a
join b (b.a_id == a.id)
group {a.id} (
sort b.x
take 1
)
select {a.id, b.y}SQL output
--Expected SQL output
No response
MVCE confirmation
- Minimal example
- New issue
Anything else?
The compiler does not crash when
- adding the column
b.xto the final select statement, OR - changing the target language to anything other than
sql.postgres,sql.clickhouse,sql.duckdb
Playground-friendly version of the offending input:
prql target:sql.postgres
# prql target:sql.clickhouse
# prql target:sql.duckdb
from customers
join invoices (invoices.customer_id == customers.customer_id)
group {customers.customer_id} (
sort {- invoices.total}
take 1
)
sort { customers.customer_id }
select { customers.customer_id, invoices.billing_country }
stderr output with RUST_LOG=trace: https://gist.github.com/exit91/410a49f7d7b8d7ccf14b3dbf781e7bec
Reactions are currently unavailable