Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45453

Change name and usage of $_internalJs to $function

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Fully Compatible
    • Query 2020-01-27, Query 2020-02-10, Query 2020-02-24

    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.

      Attachments

        Activity

          People

            katherine.wu@mongodb.com Katherine Wu (Inactive)
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: