aggregation framework converts Timestamp to long long in result set

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.2.0-rc0
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      A Timestamp Value is converted to BSON as a long long:

              case Timestamp:
                  pBuilder->append((long long)getTimestamp());
                  break;
      

      Test

      c = db.c;
      c.drop();
      
      c.save( { a:new Timestamp( 0, 0 ) } );
      assert.eq( c.findOne().a, c.aggregate( { $sort:{ _id:1 } } ).result[ 0 ].a );
      

      Observed behavior: A timestamp field is converted to a long long in the aggregate command's output.
      Expected behavior: A timestamp field remains of timestamp type in the aggregate command's output.

            Assignee:
            Matt Dannenberg (Inactive)
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: