-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.3.0-rc0, 7.0.0-rc0, 7.1.0-rc0
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
Expected behavior of a query like this
db.a.aggregate([{$project: {_id: 0, result: {$sqrt: [NaN]}}}])
is to return the following for each document in the collection
{ "result" : NaN }
This $project does not get pushed down to SBE until the SBE Pushdown feature (PM-3162), which is still in progress. Working on this feature, the above $project does get pushed down to SBE and fails with this assertion:
uncaught exception: Error: command failed: { "ok" : 0, "errmsg" : "PlanExecutor error during aggregation :: caused by :: $sqrt's argument must be greater than or equal to 0", "code" : 7157710, "codeName" : "Location7157710" } with original command request: { "aggregate" : "sqrt", "pipeline" : [ { "$project" : { "_id" : 0, "result" : { "$sqrt" : [ NaN ] } } } ], "cursor" : { }, "lsid" : { "id" : UUID("5494ede8-1225-47e6-9396-7975688eaf2a") } }
This assertion was introduced in 6.3.0-rc0 by SERVER-71577.
- depends on
-
SERVER-78246 Add $project and $addFields to the set of stages handled by findSbeCompatibleStagesForPushdown
- Closed