[SERVER-82174] Vectorizer is not folding output of 'exists' Created: 13/Oct/23  Updated: 29/Oct/23  Resolved: 17/Oct/23

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

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2023-10-30
Participants:
Linked BF Score: 155

 Description   

> db.fuzzer_coll.explain().aggregate([{$match: {"array": {$exists: true}}}, {$count: "num" }])
 
[4] project [s13 = makeBsonObj(MakeObjSpec([\"num\"], Closed, ReturnNothing), s12)] 
[3] mkobj s12 [_id = s11, num = s9] true false 
[3] project [s11 = null] 
[3] group [] [s9 = sum(1)] spillSlots[s10] mergingExprs[sum(s10)] 
[2] block_to_row blocks[s5] row[s8] s7 
[2] project [s7 = valueBlockExists(cellBlockGetFlatValuesBlock(s6))] 
[2] ts_bucket_to_cellblock s3 pathReqs[s5 = Get(array)/Id, s6 = Get(array)/Traverse/Id] 
[1] filter {(traverseF(s2, lambda(l101.0) { traverseF(getField(move(l101.0), \"max\"), lambda(l102.0) { exists(getField(move(l102.0), \"array\")) }, false) }, false) && traverseF(s2, lambda(l103.0) { traverseF(getField(move(l103.0), \"min\"), lambda(l104.0) { exists(getField(move(l104.0), \"array\")) }, false) }, false))} 
[1] scan s3 s4 none none none none none none lowPriority [s2 = control] @\"dcc8f30a-4eb1-4e28-9d50-129c139ba23f\" true false 



 Comments   
Comment by Githook User [ 13/Oct/23 ]

Author:

{'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}

Message: SERVER-82174 Ensure that vectorized 'exists' are folded
Branch: master
https://github.com/mongodb/mongo/commit/20c005ebd5af662f66dab0506b16dc9bbc85db31

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