dotnet / dotnet/efcore

Investigate alternative translations for (in)equality comparison

Open
#34,165 5 comments 0 reactions 0 assignees View on GitHub
area-query consider-for-next-release customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

The current translation of `nullableA == B` is `nullableA = B AND nullableA IS NOT NULL`.
Similarly, `nullableA != B` is translated to `nullableA <> B OR nullableA IS NULL`.

This causes the duplication of the `nullableA` expression.

Alternative translations that could avoid this issue are `CASE WHEN nullableA == b THEN TRUE ELSE FALSE END` / `CASE WHEN nullableA == b THEN FALSE ELSE TRUE END`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.