-
Notifications
You must be signed in to change notification settings - Fork 221
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 sort
in inline join relation
#4063
Comments
Thanks for the issue — I think this is a dupe of the issue from #4037... |
Right, good spot, the result should have an Assuming this is a duplicate, shall we copy-paste that narrower example into a new issue? |
The panic is in the same spot as #4037 but I'm guessing the cause is different. The backtrace shows that the problem starts when lowering the "sorts" that are defined in the pipeline:
I think there's an issue related to the order of the lowering process in
So it looks like the table
|
Super, thanks for tracking that down |
FYI this is no longer a panic, instead now points to #3870 |
…sform closes PRQL#4063 PRQL#4947 Signed-off-by: Luka Peschke <[email protected]>
hello @max-sixty I believe I have a fix for this one and #4947: #5066 . Could you please review ? 🙂 |
What happened?
The PRQL query below results in the following message:
Full backtrace
However, when the join relation is expressed as a variable, the panic does not happen.
Adding an explicit definition of the column within the inline relation definition (
from b | select { key, xyz } | sort { -xyz }
) does not avoid the panic.PRQL input
SQL output
Expected SQL output
No response
MVCE confirmation
Anything else?
Built from git, at 36219a1.
As an aside, I noticed that even without the panic, the
sort
does not translate into anORDER BY
in thefrom_b
CTE. Is this intentional, given the ordering guarantee design of PRQL? I tried to review how ordering works in PRQL in the documentation as well as through some relevant issue discussions, but admit that I still find it a bit confusing, especially around joins.The text was updated successfully, but these errors were encountered: