-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: 8.0.4
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
ALL
-
(copied to CRM)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The situation described in the title can be reproduced as below:
use test1
db.restaurantReviewsMultiple.insertMany( [
{
date: ISODate("2021-03-08"),
restaurant: "Joe's Pizza",
score: 90
},
{
date: ISODate("2021-03-08"),
restaurant: "Sally's Deli",
score: 75
}
] )
db.restaurantReviewsMultiple.aggregate( [
{
$fill:
{
sortBy: { date: 1 },
partitionBy: { "restaurant": "$restaurant" },
output:
{
"score": { method: "linear" }
}
}
}
] )
MongoServerError: PlanExecutor error during aggregation :: caused by :: There can be no repeated values in the sort field
In the example above, the error message obtained can be confusing as each partitionBy - restaurant has only 1 entry and with the same date, there are no values for $fill to interpolate between.
The question is:
1. Could this be changed to a no-op?
2. If not, can this error message be updated?
Thanks,
Baptiste