Skip to content

feat(promql): add holt_winters initial implementation #1342

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

Merged
merged 6 commits into from
Apr 11, 2023
Merged

feat(promql): add holt_winters initial implementation #1342

merged 6 commits into from
Apr 11, 2023

Conversation

etolbakov
Copy link
Collaborator

@etolbakov etolbakov commented Apr 6, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Implement the holt_winters function (strictly speaking, it is a holt/ Double exponential smoothing since it doesn't use the seasonality parameter. In order to achieve parity with PromQL we have to follow this naming/implementation).
I used this website for implementation validation.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link

#1307
prometheus/prometheus#2458

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Hi, sorry for the delay! In case you need, here is the document about RangeVector

p.s.: this image is wrong, it should be "offset = 0, length = 4"
image

@etolbakov etolbakov marked this pull request as ready for review April 10, 2023 21:44
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #1342 (158f81b) into develop (f8b6a6b) will decrease coverage by 0.73%.
The diff coverage is 94.38%.

@@             Coverage Diff             @@
##           develop    #1342      +/-   ##
===========================================
- Coverage    85.96%   85.24%   -0.73%     
===========================================
  Files          506      515       +9     
  Lines        76892    77825     +933     
===========================================
+ Hits         66103    66340     +237     
- Misses       10789    11485     +696     

Copy link
Member

@waynexia waynexia 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 this @etolbakov. Your implementation is very clean and the tests are concrete 🚀

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia merged commit e021da2 into GreptimeTeam:develop Apr 11, 2023
@etolbakov etolbakov deleted the feat/holt-winters-promql branch April 11, 2023 09:54
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
)

* feat(promql): add holt_winters initial implementation

* feat(promql): improve docs for holt_winters

* feat(promql): adjust holt_winters implementation according to code review

* feat(promql): add holt_winters test from prometheus promql function test suite

* feat(promql): add holt_winters more tests from prometheus promql function test suite

* feat(promql): fix styling issue

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>

---------

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
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.

3 participants