-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[telemetryquerylanguage] add AND, OR, and parens to WHERE clauses #12213
Conversation
@kentquirk I am going to take an in-depth look at this today but based on my first pass I wanted to say great job. This is a complicated feature and you've modeled it in an understandable way |
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.
@kentquirk reviewed in depth. Mostly just nits.
/cc @anuraaga |
@TylerHelmuth I believe I've addressed all the issues. Thanks for the fantastic feedback. Also, I believe that I understand from slack that @anuraaga is unavailable right now. |
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.
One more small documentation nit, otherwise looks great.
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 👍🏻
I've fixed the nit that the linter was complaining about, and ran the global |
Or not. This time i tried running |
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
61d3bf6
to
a9e33b1
Compare
Rebased after go mod conflict resolution. |
Just want to say thanks for doing this! I badly need to use AND and OR in my queries and this will be a great help. |
@EddieEldridge as a heads up, this was added to the TQL package, which the transform processor doesn't depend on yet, but I have a PR open to change this. Hopefully the PR is merged before the next release. If it isn't, then it'll be another two weeks before the processor has this functionality. |
Implements more complex expressions for WHERE clauses in the grammar.
Description:
The transform processor currently accepts a WHERE clause with a single condition, but there are times where multiple conditions are needed in order to filter to the correct data.
This updates the grammar to allow AND and OR with proper precedence, as well as grouping with parentheses.
Note that during development, the parser was restructured to become a standalone component usable by multiple processors, so the code was ported from #11880 (where there were many individual commits).
Link to tracking Issue:
Fixes #10195.
Closes #11880 and supercedes it.
Testing:
Documentation: