<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:56 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-10736] Modify MapReduce to &quot;map, shuffle, reduce&quot;, and always take lists on the reducer input</title>
                <link>https://jira.mongodb.org/browse/SERVER-10736</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The MapReduce command from MongoDB takes two non-optional functions, &quot;map&quot; and &quot;reduce&quot;, and an optional &quot;finalize&quot; function. &quot;reduce&quot; is supposed to output the same data format from the &quot;map&quot; function.&lt;/p&gt;

&lt;p&gt;In some other frameworks, the functions are &quot;map&quot;, &quot;shuffle&quot; and &quot;reduce&quot;. &quot;shuffle&quot; is the one supposed to output the same data format from &quot;map&quot;, just like the &quot;reduce&quot; from mongoDB, but it is &quot;shuffle&quot; that is the optional function, and the non-optional &quot;reduce&quot; is more like the &quot;finalize&quot; from MongoDB. &quot;shuffle&quot; is also known as &quot;local reduce&quot;.&lt;/p&gt;

&lt;p&gt;It would be great if MongoDB could work like this instead, with the different nomenclature and optional parameters. Maybe changing the mapReduce method, or maybe creating a new method...&lt;/p&gt;

&lt;p&gt;Another interesting modification is to always deliver the data to the final step (&quot;finalize&quot;/&quot;reduce&quot;) inside a list, even if there is just one item. This way we can always assume there is a list to process, and the method becomes simpler to write.&lt;/p&gt;

&lt;p&gt;It should also be easy to have an &quot;identity reducer&quot;, it could be the default when no reducer is specified.&lt;/p&gt;

&lt;p&gt;Related tickets:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5818&quot; title=&quot;reduce in map reduce doesn&amp;#39;t run with only one input document&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5818&quot;&gt;&lt;del&gt;SERVER-5818&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2333&quot; title=&quot;mapreduce optimization: do not execute reduce on unique keys&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2333&quot;&gt;&lt;del&gt;SERVER-2333&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="89303">SERVER-10736</key>
            <summary>Modify MapReduce to &quot;map, shuffle, reduce&quot;, and always take lists on the reducer input</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="nwerneck">Nicolau Leal Werneck</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Sep 2013 03:47:39 +0000</created>
                <updated>Tue, 6 Dec 2022 05:17:59 +0000</updated>
                            <resolved>Fri, 4 Feb 2022 15:09:20 +0000</resolved>
                                                                    <component>MapReduce</component>
                                        <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4335962" author="esha.bhargava" created="Fri, 4 Feb 2022 15:07:29 +0000"  >&lt;p&gt;Closing these tickets as part of the deprecation of mapReduce.&lt;/p&gt;</comment>
                            <comment id="503881" author="rturk" created="Mon, 24 Feb 2014 03:39:43 +0000"  >&lt;p&gt;A design that always deliver the data to the final step (&quot;finalize&quot;/&quot;reduce&quot;) inside a list, even if there is just one item is a more robust long term solution. &lt;/p&gt;

&lt;p&gt;This way we can always assume there is a list to process, and the method becomes simpler to write.&lt;/p&gt;</comment>
                            <comment id="422396" author="nwerneck" created="Wed, 11 Sep 2013 04:01:51 +0000"  >&lt;p&gt;The title is obviously incorrect, it should be &quot;...and always take lists on the reducer input&quot;.&lt;/p&gt;

&lt;p&gt;Also, I should note that we could maintain compatibility with current MongoDB by keep calling it &quot;reduce&quot; instead of &quot;shuffle&quot;, and using it as &quot;finalize&quot; (&quot;reduce&quot; in the Bizarro World) if no &quot;finalize&quot; is specified.&lt;/p&gt;

&lt;p&gt;This is pretty much what happens today, but there would still be some changes: finalize (reduce) and reduce (shuffle) are not exactly optional or non-optional. It is only necessary to have at least one of them. The change is to allow us to have only &quot;finalize&quot; if we so desire. And if none of them is available, the output should be the identity reducer, a list of all values from each key.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="38395">SERVER-5818</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14167">SERVER-2333</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 24 Feb 2014 03:39:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>esha.bhargava@mongodb.com</customfieldvalue>
            <customfieldvalue>nwerneck</customfieldvalue>
            <customfieldvalue>rturk</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmh67:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2dan:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7247</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrxt53:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>