[SERVER-6290] Remove $isoDate aggregation expression operator Created: 03/Jul/12  Updated: 15/Aug/12  Resolved: 06/Jul/12

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

Type: Task Priority: Major - P3
Reporter: Mathias Stearn Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-4435 aggregation: need a function to reco... Closed
Participants:

 Description   

It isn't very useful and doesn't work correctly.



 Comments   
Comment by alex giamas [ 22/Jul/12 ]

How can we achieve this functionality without $isoDate now?

i.e.
db.CalcImpressions.aggregate( { $project: {"cmp":1, "stp":1, "evt":1, "msg":1, "rdd": {$add: ["$receivedDate", (3/24)]}, count":1}},
{$project: { "rdd2": { $isoDate: { year: {$year:"$rdd"}, month:

{ $month:"$rdd"}

, dayOfMonth: {$dayOfMonth:"$rdd"} } }, "count":1 }},
{$group: { _id:"$rdd2", totalSumPerDay:

{ $sum: "$count" }

} } )

Adding a standard offset to UTC dates to bring them to a timezone, reconstructing a new date object with no hour/minutes/second info and grouping by date (@ the non-UTC timezone)
The only workaround for now that I can think of is projecting in 3 fields and grouping by these fields..And then reconstructing the actual date client side, from the year/month/day of month.

Comment by auto [ 20/Jul/12 ]

Author:

{u'date': u'2012-07-18T18:01:03-07:00', u'email': u'aaron@10gen.com', u'name': u'Aaron'}

Message: SERVER-6290 Test that the $isoDate operator is not available.
Branch: master
https://github.com/mongodb/mongo/commit/2a21b2f2802a78d194a1edce2f7005245e065dc1

Comment by auto [ 20/Jul/12 ]

Author:

{u'date': u'2012-07-18T18:00:05-07:00', u'email': u'aaron@10gen.com', u'name': u'Aaron'}

Message: SERVER-6290 Remove unused Iterator class and ExpressionObject::getFieldIterator() function, which were added for removed $isoDate operator implementation.
Branch: master
https://github.com/mongodb/mongo/commit/89e640f8ad9de84c0735dbbb862b5abab4574f02

Comment by auto [ 06/Jul/12 ]

Author:

{u'date': u'2012-07-05T06:54:13-07:00', u'email': u'dannenberg.matt@gmail.com', u'name': u'Matt Dannenberg'}

Message: SERVER-6290 remove $isoDate aggro operation
Branch: master
https://github.com/mongodb/mongo/commit/c54bf4aa6e95776d093788c3e2b4f54c230ef1ca

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