-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use XOR to translate some == and != expressions (#34124)
* Use XOR to translate some `==` and `!=` expressions When the parent expression is not a predicate, translate `x != y` to: ```sql x ^ y ``` instead of ```sql CASE WHEN x <> y THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END ``` Similarly, translate `x == y` to: ```sql x ^ y ^ CAST(1 AS bit) ``` instead of ```sql CASE WHEN x == y THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END ``` Contributes to #34001 for simple cases (comparison of BIT expressions).
- Loading branch information
Showing
3 changed files
with
51 additions
and
97 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