[SERVER-67506] [CQF] Dotted path equality to null incorrectly matches non-object array elements Created: 24/Jun/22 Updated: 12/Sep/23 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nicholas Zolnierz | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | bonsai-semantic-difference | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Description |
|
The following query incorrectly returns the one document when run through CQF:
The semantics are that if the leading path resolves to an object, then the `b` field of that object must be null/missing. But in this case, the leading path `a` does not find an object even with implicit array traversal so the command should return 0 documents. The existing test that exercises this is here. |
| Comments |
| Comment by Hana Pearlman [ 12/Sep/23 ] |
|
After a discussion yesterday, we decided to defer changing behavior here. We think there is room for improvement in both the classic and CQF behavior, but are not prepared to commit to a change now. For now, we will fall back to classic on dotted path equality to null queries but otherwise leave the CQF behavior unchanged. I'm moving this ticket out of the correctness project and leaving it open so we can pick the discussion back up when we're ready. |
| Comment by Svilen Mihaylov (Inactive) [ 13/Jul/22 ] |
|
Possibly related to https://jira.mongodb.org/browse/SERVER-36635? |