-
Notifications
You must be signed in to change notification settings - Fork 348
Implemented '$concatArrays' aggregation pipeline operator #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #672 +/- ##
===========================================
+ Coverage 95.43% 95.44% +0.01%
===========================================
Files 19 19
Lines 3550 3558 +8
===========================================
+ Hits 3388 3396 +8
Misses 162 162
Continue to review full report at Codecov.
|
Hi @pcorpet, However I think this is caused by the fact that, having now implemented mongomock/mongomock/aggregate.py Lines 611 to 614 in 706992a
Do you think I should change something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. yes please make sure to switch the testing code to still cover the NotImplemented branch (with another array operator).
Also I have few other test cases that I'd like you to add.
Hi @pcorpet, I applied the requested changes ;) |
tests/test__mongomock.py
Outdated
} | ||
} | ||
] | ||
with self.assertRaises(OperationFailure): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the self.cmp.compare_exceptions.aggregate(pipeline_parameter_not_array)
function, same below. This ensures we use the same type of error in Pymongo and in mongomock without the need of the extra code.
Thanks a lot for the feature, I'm merging. |
Great, thank you for merging this and for the great work you are doing with this project. In the next few days i plan to also implement |
I do prefer two separate ones please.
Le jeu. 15 oct. 2020 à 08:34, Luca Moretto <notifications@github.com> a
écrit :
… Great, thank you for merging this and for the great work you are doing
with this project.
In the next few days i plan to also implement $map and $reduce
aggregation operators.
Will a single PR for both operators be ok, or do you prefer two separate
oneS?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4R6OEMEYU5B2RS2IXGKADSK2JXDANCNFSM4SNJ5MYA>
.
--
<https://www.bayesimpact.org/>
Pascal Corpet
Cofounder & CTO
+33 7 82 63 32 32
bayesimpact.org <https://www.bayesimpact.org/en/>
|
This PR implements the
$concatArrays
aggregation pipeline operator.