[SERVER-85586] Error if $lookup is specified with a foreign collection and an initial source in the pipeline Created: 23/Jan/24 Updated: 24/Jan/24 Resolved: 24/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Hana Pearlman | Assignee: | Backlog - Query Optimization |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
Aggregate commands like
fail with "'$documents' can only be run with {aggregate: 1}". However, a $lookup like
succeeds. While executing this $lookup, we will never look at the foreign collection, so it's confusing to allow it to be specified here. This ticket is to consider erroring for these $lookups, too. |
| Comments |
| Comment by Hana Pearlman [ 24/Jan/24 ] |
|
Good news! I must have been wrong about this... suddenly unable to repro locally. |