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

Desugar $where to $expr + $function

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2 Required
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Query 2020-01-27, Query 2020-02-10, Query 2020-02-24
    • 0

      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.

            Assignee:
            eric.cox@mongodb.com Eric Cox (Inactive)
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: