|
Author:
{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}
Message: SERVER-78297 Introduce and enforce `RemoveOrphansRequirement`
This patch implements barebones support for Bonsai to start generating physical plans that perform shard filtering.
- Add bit to optimizer metadata to indicate whether a `ScanDefinition` can have orphans.
- Introduce new physical property, `RemoveOrphansRequirement`, which indicates whether a group needs to perform shard filtering.
- Write an enforcer rewrite which satisfies `RemoveOrphansRequirement` by inserting an `EvaluationNode` for each field of the shard key from the scan projection and inserting a `FilterNode` that uses those projections to invoke the `shardFilter` SBE builtin.
This patch only ever satisfies `RemoveOrphansRequirement` with a fetch. We will support shard filtering over index keys (enabling covered plans) in a followup.
Branch: master
https://github.com/mongodb/mongo/commit/812fc17a43496511c230f14a5d3618d8aa434d09
|