<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:24:49 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-30731] Add $expr support in MatchExpression outside of aggregation</title>
                <link>https://jira.mongodb.org/browse/SERVER-30731</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;All commands that contain MatchExpression filters should support with the exception of partialFilterExpression and upsert which we will ban.&lt;/p&gt;</description>
                <environment></environment>
        <key id="417922">SERVER-30731</key>
            <summary>Add $expr support in MatchExpression outside of aggregation</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13201">Fixed</resolution>
                                        <assignee username="tess.avitabile@mongodb.com">Tess Avitabile</assignee>
                                    <reporter username="james.wahlin@mongodb.com">James Wahlin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Aug 2017 15:03:39 +0000</created>
                <updated>Mon, 30 Oct 2023 23:14:12 +0000</updated>
                            <resolved>Thu, 5 Oct 2017 20:51:37 +0000</resolved>
                                                    <fixVersion>3.6.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1690812" author="xgen-internal-githook" created="Thu, 5 Oct 2017 20:49:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;tess.avitabile@mongodb.com&apos;, &apos;name&apos;: &apos;Tess Avitabile&apos;, &apos;username&apos;: &apos;tessavitabile&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30731&quot; title=&quot;Add $expr support in MatchExpression outside of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30731&quot;&gt;&lt;del&gt;SERVER-30731&lt;/del&gt;&lt;/a&gt; Add expr support in MatchExpression outside of aggregation&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/cb9f7cdcb7eb6ad9077ac8af3a4c0d7275c7e34f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/cb9f7cdcb7eb6ad9077ac8af3a4c0d7275c7e34f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1690811" author="xgen-internal-githook" created="Thu, 5 Oct 2017 20:49:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;tess.avitabile@mongodb.com&apos;, &apos;name&apos;: &apos;Tess Avitabile&apos;, &apos;username&apos;: &apos;tessavitabile&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30731&quot; title=&quot;Add $expr support in MatchExpression outside of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30731&quot;&gt;&lt;del&gt;SERVER-30731&lt;/del&gt;&lt;/a&gt; Add expr support in MatchExpression outside of aggregation&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/7896809e621b7b50db9a83d6ad90f9dd6919778b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/7896809e621b7b50db9a83d6ad90f9dd6919778b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1685119" author="tess.avitabile" created="Fri, 29 Sep 2017 13:39:37 +0000"  >&lt;p&gt;Moving this ticket back to the In Progress state to work on the second part: enable &lt;tt&gt;$expr&lt;/tt&gt; outside of aggregation.&lt;/p&gt;</comment>
                            <comment id="1685117" author="xgen-internal-githook" created="Fri, 29 Sep 2017 13:38:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;tess.avitabile@mongodb.com&apos;, &apos;name&apos;: &apos;Tess Avitabile&apos;, &apos;username&apos;: &apos;tessavitabile&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30731&quot; title=&quot;Add $expr support in MatchExpression outside of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30731&quot;&gt;&lt;del&gt;SERVER-30731&lt;/del&gt;&lt;/a&gt; MatchExpressionParser::parse() should require an ExpressionContext&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/c0c692488ee1308f7f83cc2eba872f03ea0cbbb0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/c0c692488ee1308f7f83cc2eba872f03ea0cbbb0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1685116" author="xgen-internal-githook" created="Fri, 29 Sep 2017 13:38:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;tess.avitabile@mongodb.com&apos;, &apos;name&apos;: &apos;Tess Avitabile&apos;, &apos;username&apos;: &apos;tessavitabile&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30731&quot; title=&quot;Add $expr support in MatchExpression outside of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30731&quot;&gt;&lt;del&gt;SERVER-30731&lt;/del&gt;&lt;/a&gt; MatchExpressionParser::parse() should require an ExpressionContext&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1667473" author="tess.avitabile" created="Thu, 7 Sep 2017 20:58:03 +0000"  >&lt;p&gt;Re (1): Sounds good.&lt;/p&gt;

&lt;p&gt;Re (2): Ah, I see, &lt;tt&gt;ExprMatchExpression&lt;/tt&gt; wants a &lt;tt&gt;const boost::intrusive_ptr&amp;lt;ExpressionContext&amp;gt;&amp;amp;&lt;/tt&gt;, so &lt;tt&gt;MatchExpressionParser::parse()&lt;/tt&gt; should continue to take a &lt;tt&gt;const boost::intrusive_ptr&amp;lt;ExpressionContext&amp;gt;&amp;amp;&lt;/tt&gt;. However, it will require it to be non-null.&lt;/p&gt;

&lt;p&gt;Re (3): No. For &lt;tt&gt;MatchExpressions&lt;/tt&gt; that require a collator, the &lt;tt&gt;MatchExpressionParser&lt;/tt&gt; will continue to pass them a &lt;tt&gt;CollatorInterface*&lt;/tt&gt;, which it will get from its passed in &lt;tt&gt;expCtx&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="1667423" author="james.wahlin@10gen.com" created="Thu, 7 Sep 2017 20:23:29 +0000"  >&lt;p&gt;Overall this sounds good. I have a few thoughts / questions:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The new ExpressionContext  class should also contain a &apos;VariablesParseState&apos; member.&lt;/li&gt;
	&lt;li&gt;The ExpressionContext&apos;s Variables instance may be modified by ExprMatchExpression while evaluating ExpressionLet (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/c58c5814e6734bfaeb73b8099345336c095b3180/src/mongo/db/pipeline/expression.cpp#L2153-L2154&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;see here&lt;/a&gt;) so we shouldn&apos;t pass as const reference, unless we plan to make a copy.&lt;/li&gt;
	&lt;li&gt;Will this change the mechanism used to change a MatchExpression&apos;s collator?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="1667405" author="tess.avitabile" created="Thu, 7 Sep 2017 20:00:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.wahlin&quot; class=&quot;user-hover&quot; rel=&quot;james.wahlin&quot;&gt;james.wahlin&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt;, my plan is to do this in two commits.&lt;/p&gt;

&lt;p&gt;First commit:&lt;br/&gt;
Rename &lt;tt&gt;ExpressionContext&lt;/tt&gt; to &lt;tt&gt;AggregationContext&lt;/tt&gt;. Create an &lt;tt&gt;ExpressionContext&lt;/tt&gt; class that contains only a &lt;tt&gt;CollatorInterface*&lt;/tt&gt; and a &lt;tt&gt;Variables&lt;/tt&gt;. &lt;tt&gt;AggregationContext&lt;/tt&gt; will have a protected &lt;tt&gt;ExpressionContext&lt;/tt&gt; and &lt;tt&gt;std::unique_ptr&amp;lt;CollatorInterface&amp;gt;&lt;/tt&gt;, where it owns its collator. It will still expose &lt;tt&gt;getCollator()&lt;/tt&gt;, and it will also expose &lt;tt&gt;getExpressionContext()&lt;/tt&gt; instead of &lt;tt&gt;variables&lt;/tt&gt;. &lt;tt&gt;MatchExpressionParser::parse()&lt;/tt&gt; will take a single &lt;tt&gt;const ExpressionContext&amp;amp;&lt;/tt&gt; instead of a &lt;tt&gt;const CollatorInterface*&lt;/tt&gt; and a &lt;tt&gt;const boost::intrusive_ptr&amp;lt;ExpressionContext&amp;gt;&amp;amp;&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Second commit:&lt;br/&gt;
&lt;tt&gt;MatchExpressionParser::parse()&lt;/tt&gt; allows &lt;tt&gt;$expr&lt;/tt&gt; by default. Ban &lt;tt&gt;$expr&lt;/tt&gt; in &lt;tt&gt;partialFilterExpression&lt;/tt&gt;, upserts, and the &lt;tt&gt;group&lt;/tt&gt; command. Add tests for places &lt;tt&gt;$expr&lt;/tt&gt; is allowed and disallowed.&lt;/p&gt;

&lt;p&gt;How does this sound?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="427402">DOCS-10787</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="442750">DOCS-10880</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="439376">SERVER-31365</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="55986">SERVER-7623</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15034">SERVER-2702</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="430457">SERVER-31201</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="72067">SERVER-9366</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="55986">SERVER-7623</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</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, 7 Sep 2017 20:00:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 18 weeks, 6 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_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 25 Sep 2017 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-738</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 18 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>james.wahlin@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htd8mn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hra0xr:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1896">Query 2017-10-02</customfieldvalue>
    <customfieldvalue id="1924">Query 2017-10-23</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Aug 2017 00:00:00 +0000</customfieldvalue>

                        </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|htcupj:</customfieldvalue>

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