Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13302

Investigate changes in SERVER-43360: $dateFromParts errors in an aggregation pipeline where the year is 0 and a sort is performed

      Description

      Downstream Change Summary

      As Carl noted in the Jira description, the documentation here shows the lower bound for week and isoWeekYear to be 0 (inclusive):
      https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromParts/

      Our fix for this ticket modifies $dateFromParts so that the new lower bound for week and isoWeekYear is 1 (inclusive). We should update the documentation with the new bounds and perhaps also mention the change in our 4.4 release notes. Thanks.

      Description of Linked Ticket

      The similar $dateFromString expression does not err. The $dateFromParts expression will only err if there is a sort and the year is 0. The documentation says that the value 0 for year is supported. No error results if there are no documents in the database, and the error will occurr no matter what field is sorted on or the direction of the sort.

       

      The equivalent find expression will not produce an error.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            jeffrey.allen@mongodb.com Jeffrey Allen
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 years, 9 weeks, 1 day ago