[SERVER-67819] Add logic in cascades optimizer to allow eqMember operation to use an index Created: 06/Jul/22  Updated: 29/Oct/23  Resolved: 03/Oct/22

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

Type: Task Priority: Major - P3
Reporter: Emily Wang (Inactive) Assignee: Matt Boros
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-10-03, QE 2022-10-17
Participants:

 Description   

$in match expressions will in the future be translated into the eqMember op type – for example, $in: [1, 2, 3] becomes the ABT filter:

PathTraverse []
PathCompare [EqMember]
Const [[1, 2, 3]] 

This breaks this ABT unit test. The old implementation of $in was supported with indexing, as it used to be chain of PathCompares with op type eq and that has index support. However, the new implementation involves a new op type, and thus after passing through the optimizer, the ABT cannot use an index.



 Comments   
Comment by Githook User [ 03/Oct/22 ]

Author:

{'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com', 'username': 'mattBoros'}

Message: SERVER-67819 Add logic in cascades optimizer to allow eqMember operation to use an index
Branch: master
https://github.com/mongodb/mongo/commit/6c0a31c8522c1baa78e682814927f571eaaffd9c

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