[SERVER-6195] consider $concat to concatenate strings instead of overloading $add Created: 24/Jun/12 Updated: 26/Aug/17 Resolved: 18/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.2 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 11 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
There is a fair amount of implementation overhead for implementing both numeric addition and string concatenation with $add, and there are some related open tickets to fix: Also I can see how '+' might be considered a convenience in javascript (though personally I would prefer a separate operator like '.'), but I'm not sure if there is a benefit in using the same $-expression to perform both addition and concatenation in the aggregation framework. EDIT: $concat currently supports the following:
|
| Comments |
| Comment by Daniel Pasette (Inactive) [ 28/Jun/13 ] |
|
marcin.floryan@comparethemarket.com, $cvoncat only works on strings – this ticket description is misleading. See |
| Comment by Marcin Floryan [ 28/Jun/13 ] |
|
Could someone clarify - the description seems to suggest that concat supports multiple data types but it only appears to work for strings at the moment. |
| Comment by auto [ 20/Dec/12 ] |
|
Author: {u'date': u'2012-12-20T20:46:21Z', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Fix test to not use collection.aggregate since it needs its own error handling Follow up to |
| Comment by auto [ 18/Dec/12 ] |
|
Author: {u'date': u'2012-07-24T21:29:40Z', u'name': u'Matt Dannenberg', u'email': u'dannenberg.matt@gmail.com'}Message: this also eliminates the problems seen in Note: modified by Mathias on 2012/12/17 to use new Doc/Val API |
| Comment by Paul Grinchenko [ 06/Dec/12 ] |
|
We really would like to have this feature |
| Comment by auto [ 27/Jul/12 ] |
|
Author: {u'date': u'2012-07-24T06:59:40-07:00', u'email': u'dannenberg.matt@gmail.com', u'name': u'Matt Dannenberg'}Message: also started |
| Comment by Mathias Stearn [ 24/Jul/12 ] |
|
moving to 2.2 to keep it on the radar, but it is low priority and likely to be bumped 2.3. |