You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the issues and found no similar issues.
Description
It would be super cool if SQLfluff caught things like this:
select
(important_number / totally_never_gonna_be_zero) as important_fact
and then told you not to (at a minimum), and/or redirected you to use dialect-appropriate divide-by-zero protections.
Use case
If SQLfluff flagged potentially unsafe division, then it might save a small number of growing SQL authors from footgunning themselves and breaking their data pipelines.
Dialect
Every dialect lets you divide using /
Are you willing to work on and submit a PR to address the issue?
While I mostly agree, I’d also throw the opposite argument your way: isn’t it better to loudly break your data pipeline instead of silently masking a potential bug that could lead to misleading results? I’m hesitant to implement a rule that is maybe worse in some situations.
Search before asking
Description
It would be super cool if SQLfluff caught things like this:
and then told you not to (at a minimum), and/or redirected you to use dialect-appropriate divide-by-zero protections.
Use case
If SQLfluff flagged potentially unsafe division, then it might save a small number of growing SQL authors from footgunning themselves and breaking their data pipelines.
Dialect
Every dialect lets you divide using
/
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: