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

select ! should raise an error if it can't exclude #2292

Open
2 tasks done
max-sixty opened this issue Mar 23, 2023 · 0 comments · May be fixed by #2342
Open
2 tasks done

select ! should raise an error if it can't exclude #2292

max-sixty opened this issue Mar 23, 2023 · 0 comments · May be fixed by #2342

Comments

@max-sixty
Copy link
Member

What happened?

Currently an invalid select ! is silently ignored

PRQL input

from tracks
select ![milliseconds,bytes]

SQL output

SELECT
  *
FROM
  tracks

-- Generated by PRQL compiler version:0.6.1 (https://prql-lang.org)

Expected SQL output

Error: we don't know the columns prior to `select ![milliseconds,bytes]`, and we're not using a target that natively supports excluding columns.

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

@max-sixty max-sixty added the bug Invalid compiler output or panic label Mar 23, 2023
@max-sixty max-sixty linked a pull request Mar 29, 2023 that will close this issue
max-sixty added a commit to max-sixty/prql that referenced this issue Mar 29, 2023
Closes PRQL#2292. It was here deliberately (the old code was _more_ work). I would think it's better to raise here — getting this wrong is still wrong...
@aljazerzen aljazerzen added enhancement compiler and removed bug Invalid compiler output or panic labels Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants