[SERVER-81378](https://jira.mongodb.org/browse/SERVER-81378): Make
comparison to null via MatchExpression $eq and $in not match undefined.
Previously, queries like {a: {$eq: null}} matched documents including,
among others, {a: null} and {a: undefined}. This change makes it so that
comparison to null via MatchExpression $eq and $in does not match
documents like the latter. By extension, classic $lookup behavior is
also changed so that null local fields do not match undefined foreign
fields (this was already the case for $lookup executed in SBE). This
commit does not affect the behavior of agg expressions, which have their
own, different semantics for undefined values.
As a result of this change, index scan plans for comparison to null
queries can look different. For example, query {a: {$eq: null}} using
index {a: 1} will only have index bounds for the null interval, rather
than both the null and undefined intervals.
GitOrigin-RevId: 496fd240a87e96bb9a46db9be2610335a002d283
[SERVER-81378](https://jira.mongodb.org/browse/SERVER-81378): Make
comparison to null via MatchExpression $eq and $in not match undefined.
Previously, queries like {a: {$eq: null}} matched documents including,
among others, {a: null} and {a: undefined}. This change makes it so that
comparison to null via MatchExpression $eq and $in does not match
documents like the latter. By extension, classic $lookup behavior is
also changed so that null local fields do not match undefined foreign
fields (this was already the case for $lookup executed in SBE). This
commit does not affect the behavior of agg expressions, which have their
own, different semantics for undefined values.
As a result of this change, index scan plans for comparison to null
queries can look different. For example, query {a: {$eq: null}} using
index {a: 1} will only have index bounds for the null interval, rather
than both the null and undefined intervals.
GitOrigin-RevId: 5998264155e7a83acf1d90aa277a5b9d912cb1f7
[SERVER-81378](https://jira.mongodb.org/browse/SERVER-81378): Make
comparison to null via MatchExpression $eq and $in not match undefined.
Previously, queries like {a: {$eq: null}} matched documents including,
among others, {a: null} and {a: undefined}. This change makes it so that
comparison to null via MatchExpression $eq and $in does not match
documents like the latter. By extension, $lookup behavior is also
changed so that null local fields do not match undefined foreign fields.
This commit does not affect the behavior of agg expressions, which have
their own, different semantics for undefined values.
As a result of this change, index scan plans for comparison to null
queries can look different. For example, query {a: {$eq: null}} using
index {a: 1} will only have index bounds for the null interval, rather
than both the null and undefined intervals.
GitOrigin-RevId: c9d1c87a3c85d260b2b892e274ba374d39bc8f47
Enable the simplifier for 'find' and 'aggregate' commands of the classic optimizer, migrate the simplifier to std::bitset due to performance reasons, improve the simplifier safe heuristics introduced in SERVER-81139.