Implement date overflow check in SBE

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • Query Execution 2021-05-03
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Code below is a simplified repro from this fuzzer failure.

      It gives PlanExecutor error during aggregation :: caused by :: date overflow in $add error when executed with classic engine and object with invalid date ISODate("0NaN-NaN-NaNTNaN:NaN:NaNZ") when executed with SBE.

      (function() {
      
      db.test.drop();
      db.test.insertOne({num: NaN});
      
      const results = db.test.aggregate([
          {
              "$project" : {
                  "a" : {
                      "$add" : [
                          ISODate("2019-12-29T03:22:55.159Z"),
                          "$num"
                      ]
                  }
              }
          }
      ]).toArray();
      print(tojson(results));
      
      }());
      

              Assignee:
              Nikita Lapkov (Inactive)
              Reporter:
              Nikita Lapkov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: