-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Query Optimization 2021-03-22
The current desugaring code optimizes the generated pipelines for simple field path partitions, but not for constants. We should not generate a preceding $set (and maybe $sort if there's no sortBy) for such a case.