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

Add uasserts for type mismatches in collection for $densify

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Hide

      in the shell:

      db.test.insertMany([

      {val: 1}

      ,

      {val: 3}

      ,

      {val: 5}

      ])

      db.test.aggregate([{$densify: {field: "val", range:

      {step: 1, bounds: "full", unit: "day"}

      }}])

      tassert "PlanExecutor error during aggregation :: caused by :: Unit must not be specified with non-date values" with code 5733506.

       

      db.test.insertMany([

      {val: new Date()}

      ,

      {val: 2}

      ])

      db.test.aggregate([{$densify: {field: "val", range:

      {step: 1, bounds: "full", unit: "day"}

      }}])

       

      Mongod log: "{"t":

      {"$date":"2021-10-07T16:05:59.342+00:00"}

      ,"s":"F", "c":"CONTROL", "id":4757800, "ctx":"conn1","msg":"Writing fatal message","attr":{"message":"std::exception::what(): bad_variant_access\nActual exception type: mpark::bad_variant_access\n"}}"

      Show
      in the shell: db.test.insertMany([ {val: 1} , {val: 3} , {val: 5} ]) db.test.aggregate([{$densify: {field: "val", range: {step: 1, bounds: "full", unit: "day"} }}]) tassert "PlanExecutor error during aggregation :: caused by :: Unit must not be specified with non-date values" with code 5733506.   db.test.insertMany([ {val: new Date()} , {val: 2} ]) db.test.aggregate([{$densify: {field: "val", range: {step: 1, bounds: "full", unit: "day"} }}])   Mongod log: "{"t": {"$date":"2021-10-07T16:05:59.342+00:00"} ,"s":"F", "c":"CONTROL", "id":4757800, "ctx":"conn1","msg":"Writing fatal message","attr":{"message":"std::exception::what(): bad_variant_access\nActual exception type: mpark::bad_variant_access\n"}}"
    • QO 2021-10-18
    • 45

          Assignee:
          davis.haupt@mongodb.com Davis Haupt (Inactive)
          Reporter:
          davis.haupt@mongodb.com Davis Haupt (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: