[SERVER-70028] [CQF] Sort unioned intervals in sargable node Created: 27/Sep/22  Updated: 29/Oct/23  Resolved: 08/Nov/22

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

Type: Improvement Priority: Major - P3
Reporter: Matt Boros Assignee: Svilen Mihaylov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QO 2022-11-14
Participants:

 Description   

We have some tests where identical explains should be produced, but aren't exactly equal due to the unioned intervals in a sargable node not being sorted. This is not an issue for intersections.

It would be nice if we could canonicalize union intervals to help with readability and checks for identical plans.

 

One possible way to approach is to extend IndexPath3WCompare to handle all abt types and use it to sort the BoolExpr tree.



 Comments   
Comment by Githook User [ 08/Nov/22 ]

Author:

{'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'svilen-mihaylov'}

Message: SERVER-70028 [CQF] Sort unioned intervals in sargable node
Branch: master
https://github.com/mongodb/mongo/commit/5d5670daae8717156a37950ad4490cbfa801bdd5

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