<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:45 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>[JAVA-640] Signature change for aggregate helper method</title>
                <link>https://jira.mongodb.org/browse/JAVA-640</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Any chance you could consider changing the signature of the aggregate&lt;br/&gt;
helper method to a single vararg argument, or adding an overloaded&lt;br/&gt;
signature that takes List&amp;lt;DBObject&amp;gt;?  I assume the reason that the&lt;br/&gt;
first op was modelled as a separate argument was to make it clear to&lt;br/&gt;
users that at least one operation was required.  I actually think&lt;br/&gt;
that&apos;s adequately clear as just a vararg argument, and having the&lt;br/&gt;
first argument separate makes it more complex when you already have&lt;br/&gt;
the pipeline as a list or array.&lt;/p&gt;

&lt;p&gt;That is, from:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public AggregationOutput aggregate( DBObject firstOp, DBObject ... additionalOps)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public AggregationOutput aggregate( DBObject ... ops)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;or add:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public AggregationOutput aggregate( List&amp;lt;DBObject&amp;gt; ops)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The particular case I&apos;m looking at is the run method in the class&lt;br/&gt;
below.  I&apos;m currently using a workaround that splits the first op and&lt;br/&gt;
the remainder before passing them to the helper method.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bitbucket.org/davidmc24/mongo-java-aggregate/src/6e0e93bfe2a4/src/main/java/org/bitbucket/davidm24/mongodb/aggregate/AggregateBuilder.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bitbucket.org/davidmc24/mongo-java-aggregate/src/6e0e93bfe2a4/src/main/java/org/bitbucket/davidm24/mongodb/aggregate/AggregateBuilder.java&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="50061">JAVA-640</key>
            <summary>Signature change for aggregate helper method</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="davidmc24">David M. Carr</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Sep 2012 14:08:53 +0000</created>
                <updated>Fri, 14 Feb 2014 14:53:53 +0000</updated>
                            <resolved>Thu, 3 Oct 2013 20:56:16 +0000</resolved>
                                    <version>2.9.0</version>
                    <version>2.9.1</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="435453" author="justin.lee@10gen.com" created="Thu, 3 Oct 2013 20:56:16 +0000"  >&lt;p&gt;duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-860&quot; title=&quot;Allow pipeline arguments to the aggregation framework to be specified in a List&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-860&quot;&gt;&lt;del&gt;JAVA-860&lt;/del&gt;&lt;/a&gt; which resolves this issue&lt;/p&gt;</comment>
                            <comment id="373047" author="jeff.yemin" created="Wed, 3 Jul 2013 00:34:12 +0000"  >&lt;p&gt;Especially as it turns out to be perfectly legal to have an empty pipeline, but yes, it&apos;s binary-incompatible.  We should consider this for 3.0.&lt;/p&gt;</comment>
                            <comment id="372992" author="davidmc24" created="Tue, 2 Jul 2013 23:01:18 +0000"  >&lt;p&gt;I think that the signature that Trisha proposed would be the ideal.  Unfortunately, I don&apos;t think it&apos;s compatible with retaining the existing signature, as it would result in a compile-time &quot;reference to aggregate is ambiguous&quot; error, and I suspect that removing the old signature would be binary incompatible, as Jeff mentioned.&lt;/p&gt;</comment>
                            <comment id="372541" author="trisha.gee@10gen.com" created="Tue, 2 Jul 2013 15:17:35 +0000"  >&lt;p&gt;I see what the issue is.  I&apos;m not totally sold on having two different ways of passing an ordered set of operations in (i.e. varargs and a List) when they&apos;re more or less the same thing, but I see the issue you&apos;re having.&lt;/p&gt;

&lt;p&gt;I think having an additional varargs method:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public AggregationOutput aggregate(DBObject ... ops)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;is more consistent. It would have to check that the size is at least 1, but that doesn&apos;t seem too terrible.&lt;/p&gt;</comment>
                            <comment id="315311" author="green-coder" created="Wed, 17 Apr 2013 11:14:29 +0000"  >&lt;p&gt;Me too I wish to change the signature, it makes it more convenient when you build the pipeline dynamically.&lt;br/&gt;
I added the function which takes a List as a parameter: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/110&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/110&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="163703" author="davidmc24" created="Wed, 12 Sep 2012 22:43:57 +0000"  >&lt;p&gt;Sounds reasonable.  As I said, I have a workaround, so this isn&apos;t particularly urgent.&lt;/p&gt;</comment>
                            <comment id="163691" author="jeff.yemin" created="Wed, 12 Sep 2012 21:57:00 +0000"  >&lt;p&gt;The signature change would not be binary compatible, so that&apos;s out.  The overloaded method with List is a possibility, but I want to see if other users are also unhappy.  Your situation is a bit different since you&apos;re building a framework.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="80026">JAVA-860</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hrhipr:</customfieldvalue>

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