[SERVER-68274] [SBE] Missing query results when comparing field to Min/MaxKey and field is missing from document Created: 25/Jul/22 Updated: 05/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ben Shteinfeld | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | mql-semantics, sbe | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Operating System: | ALL |
| Sprint: | QE 2022-09-19 |
| Participants: |
| Description |
|
Consider the following example running the classic engine:
Because the `a` field is missing in the document, it is implicitly `null` for the purposes of evaluating `a > MinKey()`. Because of BSON ordering semantics, `null` is greater than `MinKey()`, and results in the document being matched. When SBE (featureFlagSbeFull) is enabled, the server incorrectly omits this document. |
| Comments |
| Comment by Kyle Suarez [ 29/Sep/22 ] |
|
I spoke to christopher.harris@mongodb.com about this today:
Based on the decision to not prioritize this ticket; I'm sending it back to the backlog, but marking it with the mql-semantics label to start tracking these "weird MQL behavior" tickets in one place. |