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

aggregation framework converts Timestamp to long long in result set

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.0-rc0
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      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 Matt Dannenberg
            Reporter:
            aaron Aaron Staple
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: