[SERVER-75448] [CQF] isIntervalEmpty wrongly considers equality to MinKey/MaxKey empty Created: 29/Mar/23  Updated: 29/Oct/23  Resolved: 26/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: David Percy Assignee: David Percy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Working on SERVER-74539 uncovered a bug in isIntervalEmpty: it wrongly considers  [MinKey, MinKey] and  [MaxKey, MaxKey] to be empty intervals.  This bug was hidden because the ABT translation for comparison with MinKey/MaxKey generates a disjunction, so converting disjunction to SargableNode reveals the bug.

 

We can also expose the bug by simplifying the ABT translation: the disjunction is only necessary when the comparison to MinKey/MaxKey is an inequality.



 Comments   
Comment by Githook User [ 29/Mar/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-75448 In isIntervalEmpty, check inclusivity for MinKey/MaxKey
Branch: master
https://github.com/mongodb/mongo/commit/eb3bd44d8d9f459d024628463ec9efa9262dbdd4

Generated at Thu Feb 08 06:30:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.