-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mssql): restore any, all and cumulative versions (#8409)
## Description of changes I took a look through what sqlalchemy was generating for these failing test cases and then reimplemented it using sqlglot. Any and All: * Instead of `logical or` we do a `Max(IIF(condition, 1, 0))` * Instead of `logical and` we do a `Min(IIF(condition, 1, 0))` Cumulative versions: The cumulative versions work, but required an additional check in the `visit_Not` node. MSSQL doesn't support doing `IFF(MAX(IFF(...` -- the argument to IFF has to be a boolean and the Window function isn't considered a boolean for some reason, so the outer conditional needs to be a case statement.- fix(mssql): restore any, all and cumulative versions - fix(mssql): support aggregations with any/all ## Issues closed * Resolves #8073
- Loading branch information
Showing
3 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters