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 support for all functions #138

Open
46 of 47 tasks
fpetkovski opened this issue Dec 14, 2022 · 9 comments
Open
46 of 47 tasks

Add support for all functions #138

fpetkovski opened this issue Dec 14, 2022 · 9 comments
Labels
good first issue Good for newcomers

Comments

@fpetkovski
Copy link
Collaborator

fpetkovski commented Dec 14, 2022

This issue tracks which functions are left to be implemented before we have complete support for all PromQL functions.
The list of available functions in PromQL is here: https://prometheus.io/docs/prometheus/latest/querying/functions/

  • abs()
  • absent()
  • absent_over_time()
  • ceil()
  • changes()
  • clamp()
  • clamp_max()
  • clamp_min()
  • day_of_month()
  • day_of_week()
  • day_of_year()
  • days_in_month()
  • delta()
  • deriv()
  • exp()
  • floor()
  • histogram_count() and histogram_sum()
  • histogram_fraction()
  • histogram_quantile()
  • holt_winters()
  • hour()
  • idelta()
  • increase()
  • irate()
  • label_join()
  • label_replace()
  • ln()
  • log2()
  • log10()
  • minute()
  • month()
  • predict_linear()
  • pi()
  • rate()
  • resets()
  • round()
  • scalar()
  • sgn()
  • sort()
  • sort_desc()
  • sqrt()
  • time()
  • timestamp()
  • vector()
  • year()
  • _over_time()
  • Trigonometric Functions
@GiedriusS
Copy link
Member

Why did you mark the function "rate()" as unfinished? 🤔

@fpetkovski
Copy link
Collaborator Author

Ah sorry, missed that. Marked as done now ✅

@zeus2611
Copy link

hey, i would like to start contributing to this as well. Can you guide me how i can get started.

@fpetkovski
Copy link
Collaborator Author

@zeus2611 maybe you can look into adding support for the absent function? Start by adding a test case, and work your way to making the test case pass.

@yeya24
Copy link
Contributor

yeya24 commented Jan 24, 2023

To support more functions, we probably need to refactor the function part a little bit. Now Variadic is not supported and I can see for functions like predict_linear and holt_winters, since the first parameter is a range vector, we don't pass the scalar parameters when executing the function.

@fpetkovski
Copy link
Collaborator Author

fpetkovski commented Jan 25, 2023

Since the function operator takes a slice of operands, do we need anything special for variadic functions?

For the second point, I agree that we need a better way to handle matrix selectors outside of rate et al.

@Althaf66
Copy link

Althaf66 commented Feb 7, 2023

I like to contribute this project. I am just newbie to this technology, so what all tools and techstack I need to learn to complete this project.

@MichaHoffmann
Copy link
Contributor

Only holt-winters remaining ~ given that it is disappearing from prometheus; shall we close the issue?

@fpetkovski
Copy link
Collaborator Author

I think we still need to add support outside of subqueries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants