-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
QE 2023-07-24
-
0
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Currently we use std::set<std::string> in BucketSpec and BucketUnpacker: https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/db/exec/timeseries/bucket_spec.h#L259
This forces us to do some unnecessary string copying, for example, here:
https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/db/exec/timeseries/bucket_spec.h#L281
We should replace it with StringSet that supports heterogeneous lookup.
Important: we need to make sure order of elements is not important before we replace things, because StringSet is unordered: https://github.com/mongodb/mongo/blob/8b473650c85276ab5d14526fbb466e961b1111b4/src/mongo/util/string_map.h#L113