prql
prql copied to clipboard
'std' panics on lowering
What happened?
trying to compile just std leads to program panic
PRQL input
std
SQL output
The application panicked (crashed).
Message: called `Option::unwrap()` on a `None` value
Location: prqlc/prqlc/src/semantic/lowering.rs:227
Expected SQL output
n/a
MVCE confirmation
- [X] Minimal example
- [X] New issue
Anything else?
Interestingly enough, if std is later in a pipeline, it errors out appropriately
Error:
╭─[:1:10]
│
1 │ from a | std
│ ─┬─
│ ╰─── expected a function, but found `std`
───╯
This feels similar to #4317 - I'm going to see whats up here
This message should rather say "current implementation of the resolver is half-assed, this should fail earlier, with a better error message".
I'm working on rewriting it all, but I wonder if my new version will cover this case too.
In any case, thanks for the report, this is useful and will be fixed, maybe long time in the future.
FWIW something that replaced the panic with an error of type Bug would be a welcome contribution!
#4538 created to temporarily prevent crash
now this input returns:
Error: internal compiler error; tracked at https://github.com/PRQL/prql/issues/4474
i have related issue. On this prql code:
from `math`
select c
i expect this sql
select c from "math"
but got this error
Error: internal compiler error; tracked at https://github.com/PRQL/prql/issues/4474