Commit Graph

8 Commits

Author SHA1 Message Date
Mathias Stearn
f58fa5f78a Make BSONObj::woCompare a total ordering
Changes:
* Date and Timestamp are now distinct with all Dates before all Timestamps.
* Numeric comparisons now correctly handle Doubles and Long > 2**53.
* CodeWScope doesn't strcmp BSONObjs or strings which may contain NULs.

There should be no changes in any of the cases where woCompare defined a
correct total ordering before. The new behavior matches the ordering defined
by KeyString.

Related tickets:
* SERVER-3304 Error comparing Date and Timestamp
* SERVER-3719 Total ordering over Longs and Doubles
* SERVER-7804 CodeWScope comparisons are broken
* SERVER-16632 Change WiredTiger index key format

Changes to the comparison function for aggregation will be handled separately
as SERVER-16708.
2015-01-07 11:56:33 -05:00
Mathias Stearn
061a086641 SERVER-10165 aggregate() shell helper now returns a cursor
The actual change is in src/mongo/shell/collection.js with the remaining changes
to adjust tests to the new api.

The "ideal" arguments are now an array of pipeline ops and an optional object
with extra top-level options for the command (such as {explain: true}. For
backwards compatibility, we still support the varargs style where each argument
is a pipeline stage, but there is no way to specify extra parameters in this
mode.
2013-10-08 17:35:02 -04:00
Scott Hernandez
6ea3fb90c6 SERVER-7718: JS Timestamp constructor now in seconds (not millis anymore) 2013-02-28 18:19:47 -05:00
Mathias Stearn
68f6dcd2c3 SERVER-6649 have agg helper throw exceptions and fix tests accordingly
Most of this was done by Samantha Ritter. Thanks!
2012-12-18 15:34:56 -05:00
Mathias Stearn
323f3924fb Make Value::compare behave the same as BSONElement::woCompare
Related cases:
SERVER-6125 $sort on heterogeneous types
SERVER-6126 Value::compare transitivity (now exactly as broken as BSONObj)
2012-12-10 18:39:00 -05:00
Matt Dannenberg
859c7268ae SERVER-6142 make compares in aggro consistent
ExpressionCompare now uses Value::compare
2012-07-27 14:30:40 -04:00
Matt Dannenberg
fe6b87756b SERVER-6270 prevent segfault on large aggro result
to check if its getting too large, the result array must be copied later
as a result a few tests needed minor alterations
2012-07-10 17:14:57 -04:00
Matt Dannenberg
38d752f9c7 SERVER-6121 make timestamps exist in aggro 2012-07-03 18:52:37 -04:00