Skip to content
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

Grammar: add distinct filter support #26

Merged
merged 3 commits into from
May 22, 2023
Merged

Grammar: add distinct filter support #26

merged 3 commits into from
May 22, 2023

Conversation

matyax
Copy link
Contributor

@matyax matyax commented May 18, 2023

This PR adds support to the DISTINCT filter expression added in grafana/loki#8662

Examples:

{app="order"} | json | distinct id
{app="order"} | json | distinct id, time

Generated tree:

imagen

Part of grafana/grafana#68170

Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the naming of nodes the same between both grammars - yacc logql grammar and our lezer logql grammar.

Also, you need to update version in package.json and run yarn install so it gets released.

@matyax
Copy link
Contributor Author

matyax commented May 22, 2023

Oh I see. I will update this accordingly.

@matyax
Copy link
Contributor Author

matyax commented May 22, 2023

If I understood correctly, now both grammars should match. Also bumped the version.

@matyax matyax requested a review from ivanahuckova May 22, 2023 09:30
Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@matyax matyax merged commit 1bc5cea into main May 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants