-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Implement narrowType for ExpressionCompare with ExpressionCompare::EQ with two operands.
$eq: ["$a", "string"] -> makes it string(S)
$eq: ["$a", 1] -> makes it number(S)
$eq: ["$a", null] -> makes it null (or null|missing - double check the sematnics)
Whether the equality holds is given by assumeTrue, e.g.
bool equalityHolds = (expr->getOp() == ExpressionCompare::EQ) == assumeTrue;
Note:
- BSON comparison applies (equality to double(1) will match int(1), so that should just become the number(S) type)
- depends on
-
SERVER-135983 Implement inference for ExpressionConstant and ExpressionFieldPath
-
- Closed
-
- is depended on by
-
SERVER-139188 Implement type narrowing for the remaining comparisons expressions
-
- In Progress
-