<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:52:15 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-83456] Skip Filter-&gt;Sargable rewrite for collscan plans</title>
                <link>https://jira.mongodb.org/browse/SERVER-83456</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;A primary goal of a Sargable node is to provide a facility for solving an access path selection problem in Bonsai. In the absense of indexes in a collection there is no need to perform this conversation as we won&apos;t be doing any access path selection work, and eventually we will get from Filter to Sargable and back to Filter node. However, a Sargable node presently participates in other optimizations, such as predicate reoredeing based on selectivity or top-level fields pushdown. If these optimizations could be &quot;extracted&quot; from the Sargable node and implemented as stand-alone rewrites, we could skip this rewrite when we know that we&apos;re about to generate a collection scan plan. Another interesting optimization done by the Sargable node is interval simplification (e.g., a &amp;gt; x &amp;amp;&amp;amp; a &amp;gt; y becomes a &amp;gt; max(x, y)). However, this simplification can only be done if we know that a given path is non-multikey, and without indexes this information is not available, meaning we cannot simplify such intervlas. The only case when we can do that is a predicate within $elemMatch. We will support this case when we extend the boolean simplifier to support interval simplification so that we can perform this optimization much earlier and w/o the need to create a Sargable node.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2505431">SERVER-83456</key>
            <summary>Skip Filter-&gt;Sargable rewrite for collscan plans</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="timour.katchaounov@mongodb.com">Timour Katchaounov</assignee>
                                    <reporter username="anton.korshunov@mongodb.com">Anton Korshunov</reporter>
                        <labels>
                            <label>M7</label>
                    </labels>
                <created>Mon, 20 Nov 2023 16:37:11 +0000</created>
                <updated>Mon, 8 Jan 2024 10:41:16 +0000</updated>
                            <resolved>Mon, 8 Jan 2024 10:41:16 +0000</resolved>
                                                    <fixVersion>7.3.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="5966263" author="xgen-internal-githook" created="Thu, 21 Dec 2023 17:15:48 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Timour Katchaounov&apos;, &apos;email&apos;: &apos;34627040+timourk@users.noreply.github.com&apos;, &apos;username&apos;: &apos;timourk&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83456&quot; title=&quot;Skip Filter-&amp;gt;Sargable rewrite for collscan plans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83456&quot;&gt;&lt;del&gt;SERVER-83456&lt;/del&gt;&lt;/a&gt; Default skip Filter-&amp;gt;Sargable rewrite for collscan plans (#17726)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 43ffca2fd4c059f235a9495dc9c18b6abd278802&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/83730c7d2dd3a503ad102e4ba74a18649b5e9b40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/83730c7d2dd3a503ad102e4ba74a18649b5e9b40&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5894724" author="anton.korshunov" created="Tue, 21 Nov 2023 09:22:11 +0000"  >&lt;p&gt;&amp;gt; There is a narrow case where these kinds of simplifications can happen in M2, which is when an M2-eligible query against a collection with indexes has a $natural hint. In this case, we will allow the query to use Bonsai, and we will use the multikeyness information from the indexes to remove Traverses. This is another time when we could do interval simplification within Bonsai, though it might not be very common&lt;/p&gt;

&lt;p&gt;Good point. I guess for natural hints we can still use the rewrite. We&apos;re going to make OptPhase manager configurable so that we can specify which phases/rewrites to run based on the query shape and metadata.&lt;/p&gt;</comment>
                            <comment id="5894723" author="anton.korshunov" created="Tue, 21 Nov 2023 09:20:25 +0000"  >&lt;p&gt;&amp;gt; This is not necessarily the case. A type-bracketed comparison in find is implicitly an $elemMatch (get an element which is both greater than 5 and less than empty string), which is why we end up performing interval simplifications even with M2 queries with no indexes.&lt;/p&gt;

&lt;p&gt;This simplification makes sense when we push an interval into index bounds. For a simple filter I guess it&apos;s better to keep the type bracketing interval intact so that in ABT lowering we can detect this pattern and use SBE primitives which already support type bracketing. This is to your question which you raised at the huddle just recently.&#160;&lt;/p&gt;</comment>
                            <comment id="5893163" author="JIRAUSER1269946" created="Mon, 20 Nov 2023 18:40:52 +0000"  >&lt;p&gt;&amp;gt; The only case when we can do that is a predicate within $elemMatch.&lt;/p&gt;

&lt;p&gt;This is not necessarily the case. A type-bracketed comparison in find is implicitly an $elemMatch (get an element which is both greater than 5 and less than empty string), which is why we end up performing interval simplifications even with M2 queries with no indexes.&lt;/p&gt;</comment>
                            <comment id="5893142" author="hana.pearlman" created="Mon, 20 Nov 2023 18:33:29 +0000"  >&lt;p&gt;&amp;gt; However, this simplification can only be done if we know that a given path is non-multikey, and without indexes this information is not available, meaning we cannot simplify such intervals.&lt;/p&gt;

&lt;p&gt;There is a narrow case where these kinds of simplifications can happen in M2, which is when an M2-eligible query against a collection with indexes has a $natural hint. In this case, we will allow the query to use Bonsai, and we will use the multikeyness information from the indexes to remove Traverses. This is another time when we could do interval simplification within Bonsai, though it might not be very common&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2505138">SERVER-83442</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2518235">SERVER-83937</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2469406">SERVER-81973</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2505137">SERVER-83441</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2509190">SERVER-83574</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2515342">SERVER-83839</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2530651">SERVER-84378</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2530439">SERVER-84366</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2404421">SERVER-79488</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>5.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>Mon, 20 Nov 2023 18:33:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/SERVER-83442'>SERVER-83442</a>, <s><a href='https://jira.mongodb.org/browse/SERVER-83441'>SERVER-83441</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-81973'>SERVER-81973</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-83574'>SERVER-83574</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-83839'>SERVER-83839</a></s>, <a href='https://jira.mongodb.org/browse/SERVER-83937'>SERVER-83937</a>, <s><a href='https://jira.mongodb.org/browse/SERVER-84378'>SERVER-84378</a></s>]]></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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anton.korshunov@mongodb.com</customfieldvalue>
            <customfieldvalue>ben.shteinfeld@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>hana.pearlman@mongodb.com</customfieldvalue>
            <customfieldvalue>timour.katchaounov@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i31c2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2j5cc:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7263">QO 2023-12-25</customfieldvalue>
    <customfieldvalue id="8044">QO 2024-01-08</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|i30y87:</customfieldvalue>

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