tracker issue : CF-3863003

select a category, or use search below
(searches all categories and all time range)
Title:

Map|reduce|sort methods on query objects

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / On behalf of Adam cameron (Awdhesh Kumar)

Created: 12/05/2014

Components: Language, Functions

Versions: 11.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 11 /

Priority/Frequency: Trivial / Few users will encounter

Locale/System: ALL / Mac 10 All,Win XP All

Vote Count: 9

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 25, 2019 using build 2016.0.01.298513
Problem:Map|reduce|sort methods on query objects  

Method: Added support for  each(), filter() (Bug: 3713323). 
Evaluate  and add support for map(), reduce() methods on query objects as well (as per arrays, structs, lists).

Query.sort(callback) & and querySort(query, callback) will also be addressed as part of this bug. 

Result:

Expected:

Workaround:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3863003

External Customer Info:
External Company:  
External Customer Name: On behalf of Adam cameron
External Customer Email:

Attachments:

Comments:

+1. This is essential both for parity with other collections' iteration methods (language predictablity), as well as these two function being *very* useful.
Vote by External U.
9705 | December 05, 2014 06:35:17 AM GMT
Oh, and there should also be a sort method too. Again, for parity with the other collections' iteration methods. All collection types should have the same "Iterable" interface, really (obviously not an *actual* interface, as the method signatures vary from type to type, but you perhaps get what I mean.
Comment by External U.
9702 | December 05, 2014 06:37:03 AM GMT
+1 for map(), reduce() *and* sort() as per Adam's comment
Vote by External U.
9706 | December 06, 2014 04:56:42 AM GMT
+1 "Where we're going, we don't need roads!" - Doc. Brown, Back To The Future
Vote by External U.
9707 | December 06, 2014 06:33:30 PM GMT
This would be really nice actually +1
Vote by External U.
9708 | December 08, 2014 08:39:28 AM GMT
Will be addressing support for Query.sort(callback) & and querySort(query, callback) as part of this bug.
Comment by Immanuel N.
9703 | July 14, 2015 05:57:46 AM GMT
............................
Vote by External U.
9709 | September 30, 2015 05:12:53 PM GMT
+1 ...................................
Vote by External U.
9710 | October 01, 2015 05:11:54 PM GMT
This is 25+ chars so that I can upvote this issue.
Vote by External U.
9711 | October 08, 2015 03:54:07 PM GMT
Very nice!! This is a great idea.
Vote by External U.
9712 | October 14, 2015 08:04:59 PM GMT
I think this issue needs to be reopened as it's not a duplicate of the one that it's been closed in favour of. That one only covers each() and filter(), and points back to THIS issue to cover the rest of them. Currently you have no OPEN issue to deal with sort(), map(), reduce().
Comment by External U.
9704 | October 15, 2015 05:32:09 AM GMT
QueryMap / query.map now accepts an additional (optional) query, which can be used as a template on which the result is based. In case the optional query template is provided, Exception will be thrown for any column that does not exist in the query template. In case the optional query template is not provided, Exception will be thrown for any column that does not exist in the original query.
Comment by Immanuel N.
29891 | December 22, 2015 06:12:16 AM GMT