PRQL / prql

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
https://prql-lang.org
Apache License 2.0
9.84k stars 216 forks source link

fix: generate `FALSE` instead of `expr in ()` conditions #4598

Closed Globidev closed 3 months ago

Globidev commented 3 months ago

This is an attempt at fixing #4595

Disclaimer: Pretty fluent in Rust but I just discovered the codebase, so I probably missed a bunch of things. I guess we'll want to add tests, and I'll likely need some directions as to where exactly to put them :)

max-sixty commented 3 months ago

Awesome @Globidev ! Nice work.

We can add a test next to https://github.com/PRQL/prql/blob/6b4c4389cff35b04296f234e5639cd45be401087/prqlc/prqlc/tests/integration/sql.rs#L1213-L1226

Then running cargo insta test --accept (or task test-rust) will fill in the generated SQL.

max-sixty commented 3 months ago

A changelog entry would be nice but not strictly required

Globidev commented 3 months ago

Thanks a bunch for the pointers!

Feel free to point out anything that would be missing or need tweaking

max-sixty commented 3 months ago

Super, thanks @Globidev !