[SERVER-79219] [CQF] $lt, $lte should not match NaN Created: 21/Jul/23 Updated: 29/Oct/23 Resolved: 02/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Militsa Sotirova |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | QO 2023-08-07 | ||||||||
| Participants: | |||||||||
| Description |
|
The fuzzer found this:
All of these predicates should be false because comparisons with NaN should be false. I think the simplest place to fix this is in ABT translation. Here's the initial ABT before optimization:
When translating MQL to ABT we introduce an explicit lower bound so that the query only matches numbers. That way Lt / Gte can be consistent with intervals / index bounds / a total order. If we made the lower bound `Gt nan` or `Gte -inf` that would fix the bug. This seems closely related to |
| Comments |
| Comment by Githook User [ 03/Aug/23 ] |
|
Author: {'name': 'Militsa Sotirova', 'email': 'militsa.sotirova@mongodb.com', 'username': 'militsasotirova'}Message: |
| Comment by Githook User [ 02/Aug/23 ] |
|
Author: {'name': 'Militsa Sotirova', 'email': 'militsa.sotirova@mongodb.com', 'username': 'militsasotirova'}Message: |