<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:13:55 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>[DOCS-15806] [SERVER] Fix $round and $trunc docs to avoid stating that floating point input types are converted to integer output types</title>
                <link>https://jira.mongodb.org/browse/DOCS-15806</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;According to the document (): If rounding to a whole integer value,&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/round/#mongodb-expression-exp.-round&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$round&lt;/tt&gt;&lt;/a&gt; returns the value as an integer. But it actually always return double&#160;&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/422204/422204_image-2022-12-15-08-33-34-729.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2212151">DOCS-15806</key>
            <summary>[SERVER] Fix $round and $trunc docs to avoid stating that floating point input types are converted to integer output types</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="xiaochen.wu@mongodb.com">Xiaochen Wu</reporter>
                        <labels>
                            <label>backlog</label>
                            <label>feature</label>
                            <label>typo</label>
                    </labels>
                <created>Thu, 15 Dec 2022 16:33:56 +0000</created>
                <updated>Mon, 22 Jan 2024 16:21:18 +0000</updated>
                                                                            <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5096897" author="david.storch" created="Fri, 6 Jan 2023 21:15:14 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=xiaochen.wu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;xiaochen.wu@mongodb.com&quot;&gt;xiaochen.wu@mongodb.com&lt;/a&gt;! &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=brenda.rodriguez%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;brenda.rodriguez@mongodb.com&quot;&gt;brenda.rodriguez@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ashley.brown%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;ashley.brown@mongodb.com&quot;&gt;ashley.brown@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sarah.olson%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;sarah.olson@mongodb.com&quot;&gt;sarah.olson@mongodb.com&lt;/a&gt; as discussed above, I&apos;ve converted this from a SERVER ticket to a DOCS ticket. Hopefully this ticket is in the correct state to be picked up on the docs team&apos;s triage queue. The fix should be pretty straightforward. Instead of making it sound like &lt;tt&gt;$round&lt;/tt&gt; and &lt;tt&gt;$trunc&lt;/tt&gt; coerce floating point numbers to integers, we can just clarify that the output type for these expressions is always same as the input type (assuming that the input is a numeric type).&lt;/p&gt;</comment>
                            <comment id="5073445" author="JIRAUSER1265607" created="Thu, 22 Dec 2022 18:09:55 +0000"  >&lt;p&gt;Sounds good to me, as long as we document the behavior correctly. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=brenda.rodriguez%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;brenda.rodriguez@mongodb.com&quot;&gt;brenda.rodriguez@mongodb.com&lt;/a&gt;, could you please help to convert the ticket type and track it? Thank you!&lt;/p&gt;</comment>
                            <comment id="5072725" author="david.storch" created="Thu, 22 Dec 2022 14:31:45 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=xiaochen.wu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;xiaochen.wu@mongodb.com&quot;&gt;xiaochen.wu@mongodb.com&lt;/a&gt;, to clarify, are you referring to the following statement on the &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/round/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;docs page for &lt;tt&gt;$round&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If rounding to a whole integer value, $round returns the value as an integer.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;There is a similar note on the &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/trunc/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;docs page for &lt;tt&gt;$trunc&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If truncating to a whole integer value, $trunc returns an integer.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I would argue that this is simply a mistake in the documentation. My expectation would be that both &lt;tt&gt;$round&lt;/tt&gt; and &lt;tt&gt;$trunc&lt;/tt&gt; always preserve the type of the input &amp;#8211; neither operation would ever require increased precision, so the mathematical result can always be represented faithfully using the same type as the input value. I would argue that it would be surprising for &lt;tt&gt;$round&lt;/tt&gt; or &lt;tt&gt;$trunc&lt;/tt&gt; to also do an implicit type conversion.&lt;/p&gt;

&lt;p&gt;Therefore, I propose that we convert this ticket to a DOCS ticket in order to fix the documentation to align with the implemented behavior in the server. Does that sound good to you &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=xiaochen.wu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;xiaochen.wu@mongodb.com&quot;&gt;xiaochen.wu@mongodb.com&lt;/a&gt;? I am going to move this ticket into &quot;waiting for user input&quot; state pending your thoughts on this.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2192511">SERVER-71557</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="422204" name="image-2022-12-15-08-33-34-729.png" size="36448" author="xiaochen.wu@mongodb.com" created="Thu, 15 Dec 2022 16:33:35 +0000"/>
                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 22 Dec 2022 14:31:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 4 weeks, 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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 4 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xiaochen.wu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1n0hz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16262" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Products</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16059"><![CDATA[Server]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i15kow:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5926">QE 2023-01-09</customfieldvalue>

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

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