-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Fully Compatible
-
Query 2019-07-01
During development of SERVER-5477 we realized that we have many of the utilities necessary to track whether the shard key is preserved throughout the pipeline up until the first $group, but these helpers we developed to work backwards through a pipeline (for use in $merge optimizations).
We should add a library that can compute the new names of fields in either direction. It should be able to answer both:
- Given the paths which represent the shard key before this stage, where are the values that represent the shard key after this stage's transformation takes effect?
- Given the paths which represent the shard key after this stage, where are the values that represent the shard key before this stage's transformation takes effect?
- is depended on by
-
SERVER-5477 when sharded, no need to merge groups if $group _id is the shard key or original document _id
- Backlog