-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
200
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
The test verifies the error code of several set operations, including $setUnion.
const operators = [ ["$setUnion", 17043], ... ]; for (const [operator, errorCodes] of operators) { ... assertErrorCode(coll, [{$project: {output: {[operator]: ["$arr1", "$arr2"]}}}], errorCodes); ... }
The test expects this failure:
src/mongo/db/exec/expression/evaluate_array.cpp
uassert(17043, str::stream() << "All operands of $setUnion must be arrays. One argument" << " is of type: " << typeName(newEntries.getType()),
An equivalent uassert exists in SBE:
src/mongo/db/query/stage_builder/sbe/gen_expression.cpp
makeABTFail(ErrorCodes::Error{7158100}, str::stream() << "All operands of $" << operatorName << " must be arrays."),
The test should be updated to expect this also.