Skip to content

fix: forall with only one criteria#701

Merged
tobymao merged 2 commits intoSQLMesh:mainfrom
plaflamme:forall-audit-fix
Apr 13, 2023
Merged

fix: forall with only one criteria#701
tobymao merged 2 commits intoSQLMesh:mainfrom
plaflamme:forall-audit-fix

Conversation

@plaflamme
Copy link
Contributor

Apply the NOT predicate before REDUCE to handle cases where only one criteria is specified.

Apply the `NOT` predicate before `REDUCE` to handle cases where only
one criteria is specified.
@criteria,
c -> NOT (c)
),
(l, r) -> (l) OR (r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need the extra parens can just do l or r because you're already wrapping everything in NOT (x)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm always pretty cautious about this. Given that parens are cheap, I tend to add them regardless especially in "code generators" like this. Removed in d098677

@tobymao tobymao merged commit 2ab17f8 into SQLMesh:main Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants