[SERVER-45453] Change name and usage of $_internalJs to $function Created: 09/Jan/20  Updated: 29/Oct/23  Resolved: 10/Feb/20

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

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

Issue Links:
Depends
is depended on by SERVER-45458 Test mapReduce performance without $_... Closed
Documented
is documented by DOCS-13493 Investigate changes in SERVER-45453: ... Closed
Related
is related to SERVER-45454 Desugar $where to $expr + $function Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2020-01-27, Query 2020-02-10, Query 2020-02-24
Participants:

 Description   

Rename $_internalJs to $function, and change how it parses its arguments.
$function takes the following required fields:

  • body - a function given as a constant expression of the String or Code BSON type
  • args - function’s arguments given by an expression evaluating to the Array BSON type.
  • lang - a language specifier given as a constant expression of the String type; the only acceptable value for now is 'js'

Update MapReduce where necessary to generate $function expressions instead of $_internalJs.

Because this is a new operator, we should restrict its use to FCV 4.4 to prevent problems with downgrade (for example, to prevent users from creating views that would be invalid on 4.2). But we should also make sure MapReduce still works on FCV 4.2, even though it uses this new operator internally.



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

Author:

{'name': 'Katherine Wu', 'username': 'kaywux', 'email': 'katherine.wu@mongodb.com'}

Message: SERVER-45453 Change name and usage of '$_internalJs' to '$function'
Branch: master
https://github.com/mongodb/mongo/commit/48e9e0edecd6a0359e809ba041c898244cb0cb01

Comment by Githook User [ 07/Feb/20 ]

Author:

{'username': 'kaywux', 'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com'}

Message: SERVER-45453 Change name and usage of '$_internalJs' to '$function'
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/af509c51bc2373d589f4af67fc83ed9d621f2faf

Comment by Githook User [ 07/Feb/20 ]

Author:

{'name': 'Katherine Wu', 'username': 'kaywux', 'email': 'katherine.wu@mongodb.com'}

Message: Revert "SERVER-45453 Change name and usage of '$_internalJs' to '$function'"

This reverts commit 656313f6c949a5c49c42d080548067d5a8c37047.
Branch: master
https://github.com/mongodb/mongo/commit/e4b4eabe774fc5ab54e52761ca3293ca2a73340e

Comment by Githook User [ 07/Feb/20 ]

Author:

{'name': 'Katherine Wu', 'username': 'kaywux', 'email': 'katherine.wu@mongodb.com'}

Message: Revert "SERVER-45453 Change name and usage of '$_internalJs' to '$function'"

This reverts commit f728989e5fd60166670ff223532be27ca1c81164.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/6ed0f0548508c28e0e8102d9abc58d4e55463c72

Comment by Katherine Wu (Inactive) [ 07/Feb/20 ]

I reverted my commit, it's in the commit queue now.

Comment by William Schultz (Inactive) [ 07/Feb/20 ]

katherine.wu It looks like this commit may have broken some sharding suites.

Comment by Githook User [ 07/Feb/20 ]

Author:

{'name': 'Katherine Wu', 'username': 'kaywux', 'email': 'katherine.wu@mongodb.com'}

Message: SERVER-45453 Change name and usage of '$_internalJs' to '$function'
Branch: master
https://github.com/mongodb/mongo/commit/656313f6c949a5c49c42d080548067d5a8c37047

Comment by Githook User [ 07/Feb/20 ]

Author:

{'name': 'Katherine Wu', 'username': 'kaywux', 'email': 'katherine.wu@mongodb.com'}

Message: SERVER-45453 Change name and usage of '$_internalJs' to '$function'
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/f728989e5fd60166670ff223532be27ca1c81164

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