<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:49:22 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-18957] Split ExpressionNary::isAssociativeAndCommutative() into separate properties</title>
                <link>https://jira.mongodb.org/browse/SERVER-18957</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Then we can apply the optimizations on expressions that are one but not the other. For example $concat is associative, but not commutative.&lt;/p&gt;</description>
                <environment></environment>
        <key id="210380">SERVER-18957</key>
            <summary>Split ExpressionNary::isAssociativeAndCommutative() into separate properties</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-server-query">Backlog - Query Team</assignee>
                                    <reporter username="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                            <label>pull-request</label>
                    </labels>
                <created>Fri, 12 Jun 2015 20:31:28 +0000</created>
                <updated>Tue, 6 Dec 2022 04:49:57 +0000</updated>
                            <resolved>Tue, 2 Feb 2016 15:08:50 +0000</resolved>
                                                    <fixVersion>3.3.2</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1160980" author="xgen-internal-githook" created="Tue, 2 Feb 2016 15:07:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;salessandri&apos;, u&apos;name&apos;: u&apos;Santiago Alessandri&apos;, u&apos;email&apos;: u&apos;san.lt.ss@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18957&quot; title=&quot;Split ExpressionNary::isAssociativeAndCommutative() into separate properties&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18957&quot;&gt;&lt;del&gt;SERVER-18957&lt;/del&gt;&lt;/a&gt; Separate isAssociativeAndCommutative into two functions.&lt;/p&gt;

&lt;p&gt;Closes #1024&lt;/p&gt;

&lt;p&gt;Signed-off-by: Charlie Swanson &amp;lt;charlie.swanson@mongodb.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/83afa046ee7470664f877b7d741d0a0e33780f16&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/83afa046ee7470664f877b7d741d0a0e33780f16&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1107600" author="charlie.swanson" created="Mon, 7 Dec 2015 21:56:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; it&apos;s too late for that. See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6618&quot; title=&quot;constant folding implementation assumes $add can can be decomposed (is &amp;quot;commutative and associative&amp;quot;) but typed addition with overflow cannot&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6618&quot;&gt;&lt;del&gt;SERVER-6618&lt;/del&gt;&lt;/a&gt; for one example, we assume &lt;tt&gt;$add&lt;/tt&gt; and &lt;tt&gt;$multiply&lt;/tt&gt; are both commutative and associative already &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="1107598" author="geert.bosch" created="Mon, 7 Dec 2015 21:50:19 +0000"  >&lt;p&gt;Just note that neither floating-point nor integer arithmetic is associative, so we should make sure not to start optimizing based on the assumption they are.&lt;/p&gt;</comment>
                            <comment id="1106795" author="salessandri" created="Mon, 7 Dec 2015 08:54:36 +0000"  >&lt;p&gt;I updated the PR. I refactor the Nary optimization to take into account the possibility of having associative and not commutative expressions.&lt;/p&gt;</comment>
                            <comment id="1074338" author="ramon.fernandez" created="Thu, 29 Oct 2015 17:45:42 +0000"  >&lt;p&gt;Thanks for the pull request &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=salessandri&quot; class=&quot;user-hover&quot; rel=&quot;salessandri&quot;&gt;salessandri&lt;/a&gt;, we&apos;ll run it through internal testing and get back to you.&lt;/p&gt;</comment>
                            <comment id="1074280" author="salessandri" created="Thu, 29 Oct 2015 17:14:18 +0000"  >&lt;p&gt;I started working on this issue. I made a PR to get the first feedback: &lt;a href=&quot;https://github.com/mongodb/mongo/pull/1042&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/1042&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A couple of comments of what I did:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I split the function/property into two separate properties. The same applies to the accumulator.&lt;/li&gt;
	&lt;li&gt;I removed the old dbtest style and re-wrote the tests for &lt;tt&gt;Nary&lt;/tt&gt; expression in unittest format. While doing that I saw that there were tests that were actually wrong and removed them and others that didn&apos;t make sense. I.e: testing multi-level flattening when the flattening is done in optimize, and we are testing that optimize is called for every operand.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;What I haven&apos;t done yet is:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Go through all the expressions and set the correct &lt;tt&gt;isAssociative&lt;/tt&gt; and &lt;tt&gt;isCommutative&lt;/tt&gt; properties. For example, the concat expression should be set as associative but not commutative. Right now is false on both.&lt;/li&gt;
	&lt;li&gt;I didn&apos;t refactor the optimization for &lt;tt&gt;Nary&lt;/tt&gt; expressions to use the associative property only. I want to do that once this is in place.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 29 Oct 2015 17:14:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 2 weeks, 1 day 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>
                            8 years, 2 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>geert.bosch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>salessandri</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl3b3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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|hrvsaf:</customfieldvalue>

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