[SERVER-6125] aggregation $sort cannot process heterogenous data types (asserts) Created: 19/Jun/12 Updated: 15/Apr/13 Resolved: 11/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Value::compare does not compare heterogenous data types (however the different numeric types can be compared). In particular this can cause issues if a value may or may not be within an array (even if it's a nested field).
This can cause assertions when trying to $sort different data types for example:
And in particular it can also cause problems when some fields are within arrays (even nested):
Observed behavior: An assertion is raised when an attempt is made to sort a field containing different data types in different documents. |
| Comments |
| Comment by auto [ 27/Feb/13 ] |
|
Author: {u'date': u'2013-02-27T05:58:36Z', u'name': u'Andre de Frere', u'email': u'andre.defrere@10gen.com'}Message: Signed-off-by: Ian Whalen <ian.whalen@gmail.com> |
| Comment by auto [ 14/Feb/13 ] |
|
Author: {u'date': u'2013-01-30T22:56:36Z', u'name': u'Andre de Frere', u'email': u'andre.defrere@gmail.com'}Message: Signed-off-by: Ian Whalen <ian.whalen@gmail.com> |
| Comment by auto [ 11/Dec/12 ] |
|
Author: {u'date': u'2012-11-28T00:34:39Z', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Make Value::compare behave the same as BSONElement::woCompare Related cases: |
| Comment by auto [ 11/Dec/12 ] |
|
Author: {u'date': u'2012-11-26T19:48:16Z', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Move logic from BSONElement::canonicalType to canonicalBSONType free function Prep for |