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

add grammar support for @modifier. #1670

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Conversation

yu-shipit
Copy link
Contributor

@yu-shipit yu-shipit commented Sep 15, 2023

Pull Request checklist

  • The commit(s) message(s) follows the contribution guidelines ?
  • Tests for the changes have been added (for bug fixes / features) ?
  • Docs have been added / updated (for bug fixes / features) ?

Current behavior :
Filodb does not handle @modifier.

New behavior :
filodb will be able to parse @modifier.
will support query parsing like

foo @timestamp,  foo @start(),  foo @end()
foo[1m] @timestamp,  foo[1m] @start(),  foo[1m] @end() 
rate(foo[1m] @timestamp),  rate(foo[1m] @start()),  rate((foo[1m] @end())
foo @timestamp offset 1d, foo offset 1d @timestamp
foo[1m] @timestamp offset 1d, foo[1m] offset 1d @timestamp
rate(foo[1m] @timestamp offset 1d), rate(foo[1m] offset 1d @timestamp)

Note that the an at modifier can coexist with an offset modifier irrespective of order.

Breaking changes may include:

  • Changes to query parsing / PromQL parsing

Copy link
Contributor

@alextheimer alextheimer left a comment

Choose a reason for hiding this comment

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

LGTM, just one small update requested in the comments-- please feel free to dismiss this review after that's updated.

alextheimer
alextheimer previously approved these changes Sep 16, 2023
Copy link
Contributor

@alextheimer alextheimer left a comment

Choose a reason for hiding this comment

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

Approved for the sake of forward progress -- please feel free to merge after the other comments are addressed.

Copy link
Contributor

@alextheimer alextheimer left a comment

Choose a reason for hiding this comment

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

Thanks for the additional tests @yu-shipit 🙏

@yu-shipit yu-shipit merged commit b537be9 into filodb:develop Sep 29, 2023
1 check 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.

2 participants