-
Notifications
You must be signed in to change notification settings - Fork 63
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
[fix] fixes APPLY / SORTBY / GROUPBY / REDUCE order on FT.AGGREGATE s… #41
Conversation
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.
Looks good, small comments.
In addition I did not see the FILTER implementation, did I missed it?
Last I know it is also currently missing but reducers can also have alias, maybe its a good chance to add it? not a must though, its you chose ...
FILTER was not in-place on redisearch-py. Will add it as well. |
… more examples on test_builder.py
@MeirShpilraien the latest commit:
|
Thanks for the quick fix. I think the fix looks good as well. However, another comment on the
Disregard efficiency, I think the But otherwise, the fix looks solid. Thanks again. |
hi there @stryt2 , with regards to the "multiple filters being added at different stages of the aggregation pipeline", you're right. I was enforcing them to be after all other clauses due to my interpretation of The FILTER expressions are evaluated post-query and relate to the current state of the pipeline.. |
@filipecosta90 did you fix the multiple filters comment? Also a rebase is required. |
will do it today @MeirShpilraien 👍 |
@MeirShpilraien @stryt2 the latest commit should address the FILTER clause issue. |
This is a draft PR open for discussion, fixing AggregateRequest incorrect order of clauses.
Fixes #40
Overall changes:
testbuilder.py
Single field, single reducer
,Multiple fields, single reducer
, andMultiple fields, multiple reducers
testcases ontestbuilder.py
self._groups = []
,self._projections = []
andself._sortby = []
in exchange ofself._aggregateplan = []
which enforces the order of the clauses to be the order of the method calls.@stryt2, would appreciate your comments regarding the changes.