[SERVER-45454] Desugar $where to $expr + $function Created: 09/Jan/20  Updated: 29/Oct/23  Resolved: 13/Feb/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2 Required

Type: Task Priority: Major - P3
Reporter: David Percy Assignee: Eric Cox (Inactive)
Resolution: Fixed Votes: 0
Labels: qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
related to SERVER-46242 $where should return an informative e... Closed
related to SERVER-53370 Complete TODO listed in SERVER-45454 Backlog
related to SERVER-65079 Investigate if the MozJS upgrade made... Backlog
related to SERVER-45453 Change name and usage of $_internalJs... Closed
related to SERVER-52993 Complete TODO listed in SERVER-45454 Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2020-01-27, Query 2020-02-10, Query 2020-02-24
Participants:
Linked BF Score: 0

 Description   

Support $where by translating it to $function. Then remove the existing implementation of $where.

$function is an aggregation expression while $where is a match expression, so we can use $expr to embed the agg expression where a match expression is expected.

This new implementation of $where will not support passing a CodeWithScope as the function.

Make sure $where still works on FCV 4.2, even though $function may be restricted to FCV 4.4.



 Comments   
Comment by Githook User [ 13/Feb/20 ]

Author:

{'name': 'Eric Cox', 'username': 'ericox', 'email': 'eric.cox@mongodb.com'}

Message: SERVER-45454 Desugar where to expr + function
Branch: master
https://github.com/mongodb/mongo/commit/e289b78c61033674f6440d9ddc402b50903717ac

Comment by Githook User [ 13/Feb/20 ]

Author:

{'username': 'ericox', 'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com'}

Message: SERVER-45454 Desugar where to expr + function
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/30936ad9c08a3c93cb126c3e6adcea10be9795e3

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