-
Notifications
You must be signed in to change notification settings - Fork 340
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
add support for max, min, last, first operators in aggregation #258
add support for max, min, last, first operators in aggregation #258
Conversation
add last and first aggregation operators support, use six constant
Could you pls resolve conflicts ? |
f8a091e
to
730506a
Compare
I have to mention that test_aggregate10 from the recent commit, outputs: |
Hi, This commit comes from a PR I issued. But I don't have that error when I run tests (test_aggregate10 passes). Let me know if I can help. |
I get this error in python3. |
Ok, indeed, thanks ! |
from_field = key.replace('$', '') | ||
if func == "$sum": | ||
current_val = doc_dict.get(field, 0) | ||
for doc in group_list: |
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.
doc_dict[field] = doc_dict.get(from_field,0) + sum([doc.get(from_field,0) for doc in group_list])
?
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.
Could you please try for the all functions? does it work? I just did not test it here
Thanks |
* release/3.6.0: Bump version to 3.6.0. add support for max, min, last, first operators in aggregation (#258) add support for $group on embedded dictionaries add filter to distinct fix flask8 add id None argument to aggregation framework support fix running tests on python3 Update Missing_Features.rst add missing feature - operator add missing features Update travis repo name fixes incorrect aggregate function - issue#242 collection: use python3 division to have an accurate average
add support for max, min, last, first operators in aggregation