-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: support dynamic filters in custom_query #5427
Conversation
Pull Request Test Coverage Report for Build 5795432105
💛 - Coveralls |
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.
@tstadel can you please add some non-happy path tests? For example, why not test an empty filter list, a mix of years and random strings, all the years plus some more in your filter query test? Also, what happens if we don't use the right meta key, e.g "month"? I am playing devil's advocate here :-)
Adding a test for empty filters makes sense as it's specific for the custom query how we handle those cases. |
Just saw that we already have a test for empty filters. I will refactor them using |
@tstadel rebase to main, and these Coveralls failures will go away |
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 the updates @tstadel , LGTM 🚀
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.
Commited my changes here directly
* support filters in custom_query * better tests * Update docstrings --------- Co-authored-by: agnieszka-m <[email protected]>
Related Issues
custom_query
(elasticsearch, OpenSearch) #5364Proposed Changes:
${filters}
placeholder analogous to${query}
test_custom_query
was not running at allcustom_query
paramHow did you test it?
Notes for the reviewer
breaking change
as we won't support the old filter expressions incustom_query
anymore. As those old expressions didn't allow for dynamic filtering at query time and thus their value was limited it's best to get rid of them here. Any old filter expression can be replaced by the new filter style.custom_query
(i.e.str
). We can add support fordict
in another PR to facilitate setting custom queries.Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.