<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:08 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>[CSHARP-540] Support Bitwise Operators in LINQ (and possibly Query)</title>
                <link>https://jira.mongodb.org/browse/CSHARP-540</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;It&apos;s a very common use case in SQL databases to want to perform bitwise operations during queries.  While there the server doesn&apos;t offer these yet (there are open pull requests to add it), it would be useful if such logic could be implemented in the driver.  &lt;/p&gt;

&lt;p&gt;Couple ways of doing this off the top of my head:&lt;br/&gt;
1. Augment the query with MapReduce; many trivial statements like (x &amp;amp; 2) == 2 or (x &amp;amp; 2) != 0 can be emitted pretty easily, same goes for parameter values that get serialized.&lt;br/&gt;
2. Could also special case scenarios where the operation is x &amp;amp; &amp;lt;power of 2 - 1&amp;gt;, since that is equivalent to a $mod; i.e. (x &amp;amp; 3) == 3 would be { x : &lt;/p&gt;
{ $mod : [4, 3] }
&lt;p&gt; } and (x &amp;amp; 3) != 0 would be { x : { $not: &lt;/p&gt;
{ $mod : [4, 0] }
&lt;p&gt; } }&lt;br/&gt;
2a. Of particular interest to this optimization is (x &amp;amp; 1) =&amp;gt; (x % 2) which is a relative frequent case.&lt;/p&gt;

&lt;p&gt;If one really wanted to exceed expectations, translating any sort of simple arithmetic computation to a JavaScript function would be fantastic and provide lasting value (type safe complex data analysis scenarios for one).&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="45663">CSHARP-540</key>
            <summary>Support Bitwise Operators in LINQ (and possibly Query)</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="optimiz3">Alexander Nagy</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Fri, 27 Jul 2012 20:53:37 +0000</created>
                <updated>Thu, 20 Mar 2014 14:34:57 +0000</updated>
                            <resolved>Mon, 30 Jul 2012 14:27:06 +0000</resolved>
                                    <version>1.5</version>
                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="148664" author="craiggwilson" created="Mon, 30 Jul 2012 14:27:06 +0000"  >&lt;p&gt;Since we can&apos;t support all the operations all the time, I think it would be confusing and frustrating for users if we only implemented the &quot;convertible&quot; operations.  For instance, take the user who passes the right-side value from user input:   (x &amp;amp; 2) == &lt;/p&gt;
{user supplied value}
&lt;p&gt;.  It works for some values the user supplies and throws on others.&lt;/p&gt;

&lt;p&gt;While emitting javascript is also possible, map/reduce is slow and not recommended for using in real-time queries.  There is potential in the new aggregation framework but it doesn&apos;t support bitwise operations either.&lt;/p&gt;

&lt;p&gt;Finally, many of these operations can be rewritten in a way that is support by mongodb. So there is a workaround.&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this issue for the above reasons as not going to implement.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh78n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13972</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>