Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
6.3.0-rc0, 7.0.0-rc0, 7.1.0-rc0
-
None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
Description
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.
Attachments
Issue Links
- depends on
-
SERVER-78246 Add $project and $addFields to the set of stages handled by findSbeCompatibleStagesForPushdown
-
- Closed
-