Support for aggregation pipeline projection expressions#667
Closed
kothar wants to merge 3 commits intoMorphiaOrg:masterfrom
kothar:projection_expressions
Closed
Support for aggregation pipeline projection expressions#667kothar wants to merge 3 commits intoMorphiaOrg:masterfrom kothar:projection_expressions
kothar wants to merge 3 commits intoMorphiaOrg:masterfrom
kothar:projection_expressions
Conversation
added 3 commits
November 1, 2014 18:05
…list of arguments, such as $add, $subtract and $mod
evanchooly
pushed a commit
that referenced
this pull request
Dec 15, 2014
Squashed commit of the following:
commit 20f9533030a236ad77cf4eb8b58345cc667153a0
Author: Mike Houston <mike@stashmetrics.com>
Date: Wed Dec 3 17:35:34 2014 +0000
Added support for lists as arguments in Projection expressions
commit b09d6ddb4c8ef3a1840f213a148262ca3fc9dda1
Author: Mike Houston <mike@stashmetrics.com>
Date: Sat Nov 1 19:18:39 2014 +0000
Allow Projection objects with projectedField set to generate query expressions
commit 9dc51fd9d7bfab1017ceb0b853401ccbf2c91cfc
Author: Mike Houston <mike@stashmetrics.com>
Date: Sat Nov 1 16:58:45 2014 +0000
Support for aggregation pipeline projection expressions which take a list of arguments, such as $add, $subtract and $mod
Member
|
Thanks for the pull request. Merged in the hash below: merged f47cde5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a patch to the
Projectionsclass which provides the option to build projection expressions which take lists of arguments, such as$addand$multiply.I've tried to follow the style of the
Groupsupport for expressions, although I haven't implemented the analogue of theAccumulatorclass, as I wasn't sure how to approach nested projection expressions.The type of the arguments to the expressions are not defined: just an
Objectlist. This may need some improvement, but again, I'm not sure how to approach interchangeable field references, number literals and nested expressions.A new test is included, which verifies that the
$divideexpression works as expected. Other expressions follow the same structure, and should be equivalent.I've run
gradlew check, which passes the style checks and the new unit test - let me know if you need anything else, or more tests.Regards,
Mike.