[SERVER-6121] aggregation framework converts Timestamp to long long in result set Created: 18/Jun/12  Updated: 11/Jul/16  Resolved: 03/Jul/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.2.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Aaron Staple Assignee: Matt Dannenberg
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-5182 appendTimestamp should take an OpTime Closed
Participants:

 Description   

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.



 Comments   
Comment by Matt Dannenberg [ 03/Jul/12 ]

ended up being a very large reworking of how timestamp fits into aggro

Comment by auto [ 03/Jul/12 ]

Author:

{u'date': u'2012-07-03T07:11:17-07:00', u'email': u'dannenberg.matt@gmail.com', u'name': u'Matt Dannenberg'}

Message: SERVER-6121 make timestamps exist in aggro
Branch: master
https://github.com/mongodb/mongo/commit/38d752f9c7c98ccd3b67965bc1a8b85bba8c2922

Generated at Thu Feb 08 03:10:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.