|
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?
|