Skip to content
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

preprocess::reorder panicked on rust 1.82.0 #5053

Open
2 tasks
echou opened this issue Dec 12, 2024 · 2 comments
Open
2 tasks

preprocess::reorder panicked on rust 1.82.0 #5053

echou opened this issue Dec 12, 2024 · 2 comments
Labels
bug Invalid compiler output or panic

Comments

@echou
Copy link

echou commented Dec 12, 2024

What happened?

preprocess::reorder panicked on 1.82.0. (1.80.0 is ok).

See 1.81 new feature:
https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#new-sort-implementations

PRQL input

from foo

filter true
sort {}
derive a = 1
derive b = 1

filter true

select {
  n1 = n1 + 1,
  n2 = n2 + 1,
  n3 = n3 + 1,
  n4 = n4 + 1,
  n5 = n5 + 1,
  n6 = n6 + 1,
  n7 = n7 + 1,
  n8 = n8 + 1,
  n9 = n9 + 1,
  n10 = n10 + 1,
  n11 = n11 + 1,
}
take 1
sort {}

SQL output

Message:  user-provided comparison function does not correctly implement a total order
Location: core/src/slice/sort/shared/smallsort.rs:860

Expected SQL output

No response

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

@echou echou added the bug Invalid compiler output or panic label Dec 12, 2024
@max-sixty
Copy link
Member

Thanks! I think we should be able to fix, I'll have a look.

@richb-hanover
Copy link
Contributor

@max-sixty @echou Using PRQL compiler version:0.13.2-61-gd05b6bd8 (current main), I have a couple weird observations:

  • commenting out any of the nX = nX+1 lines from the original query lets it compile
  • Adding a few other assignments, then commenting out some, the query seems to compile as long as there are 10 or fewer assignments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Invalid compiler output or panic
Projects
None yet
Development

No branches or pull requests

3 participants