SERVER-135984ClosedFixed
Implement aggregation pipeline equality type inference
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 becom