Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XOR to translate more == and != expressions #34168

Merged
merged 3 commits into from
Jul 9, 2024

Commits on Jul 5, 2024

  1. Use XOR to translate some == and != expressions

    When the parent expression is not a predicate, translate `x != y` to:
    ```sql
    CAST(x ^ y AS BIT)
    ```
    
    instead of
    
    ```sql
    CASE
        WHEN x <> y THEN CAST(1 AS bit)
        ELSE CAST(0 AS bit)
    END
    ```
    
    Similarly, translate `x == y` to:
    
    ```sql
    CAST(x ^ y AS BIT) ^ CAST(1 AS bit)
    ```
    
    instead of
    
    ```sql
    CASE
        WHEN x == y THEN CAST(1 AS bit)
        ELSE CAST(0 AS bit)
    END
    ```
    
    Contributes to dotnet#34001.
    ranma42 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    15dba34 View commit details
    Browse the repository at this point in the history
  2. Update baselines

    ranma42 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    7b29e48 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    eda8388 View commit details
    Browse the repository at this point in the history