[SERVER-57762] Create an internal, bucketed $geoWithin operator Created: 16/Jun/21 Updated: 29/Oct/23 Resolved: 09/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Ruoxin Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-08-23 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Currently when you use $geoWithin on a time-series collection, it can only be pushed down if the predicate is on a metadata field. We'd like to also push down geo predicates on measurements. But $geoWithin can't express this bucket-level predicate. We should introduce a new internal-only operator, say "$_internalBucketGeoWithin", that can discard buckets that definitely don't contain points in the given region. For example:
could be optimized to something like:
The implementation could use control.min.location / control.max.location to quickly discard many buckets. This ticket is only about creating the new operator. Optimization and indexing will be separate. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 06/Aug/21 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |
| Comment by Githook User [ 06/Aug/21 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |
| Comment by Githook User [ 06/Aug/21 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |
| Comment by David Percy [ 12/Jul/21 ] |
|
This should be a MatchExpression (as opposed to DocumentSource) because we'll also want to allow it in a partial filter expression ( I think it should be a pathless match expression, because we want to allow it to read any field in the bucket. |