Skip to content

'std' panics on lowering #4474

Open
Open

Description

@m-span

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

  • Minimal example
  • 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`
───╯

Activity

  1. added
    bug
    on May 15, 2024
  2. m-span commented on May 16, 2024

    @m-span
    CollaboratorAuthor

    This feels similar to #4317 - I'm going to see whats up here

  3. aljazerzen commented on May 16, 2024

    @aljazerzen
    Member

    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.

  4. max-sixty commented on May 30, 2024

    @max-sixty
    Member

    FWIW something that replaced the panic with an error of type Bug would be a welcome contribution!

  5. m-span commented on Jun 5, 2024

    @m-span
    CollaboratorAuthor

    #4538 created to temporarily prevent crash

    now this input returns:
    Error: internal compiler error; tracked at https://github.com/PRQL/prql/issues/4474

  6. added a commit that references this issue on Jun 5, 2024
  7. korbash commented on Feb 5, 2025

    @korbash

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions