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

Treat an illegal target type in $convert as an "onError" case

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.4
    • None
    • Aggregation Framework
    • None
    • Fully Compatible
    • Query 2018-03-12, Query 2018-03-26

    Description

      Currently, an illegal target type (e.g., "minKey") results in a query failure, even if there is an "onError" value. This means that attempting to pass the return value of a $type expression as the "to" parameter can result in a failure.

      With this change, an invalid target type will instead return the "onError" value when it is present. Note that a string or number that does not map to any type will still result in an error in all cases.

      Attachments

        Activity

          People

            justin.seyster@mongodb.com Justin Seyster
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: