-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat: implement predict_linear function in promql #1362
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1362 +/- ##
===========================================
- Coverage 86.04% 85.68% -0.36%
===========================================
Files 523 531 +8
Lines 78396 79235 +839
===========================================
+ Hits 67454 67895 +441
- Misses 10942 11340 +398 |
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.
Thanks for this. And sorry that I forget to mention, except for implementing the PredictLinear
struct, you also need to initialize it in the planner. This part in holt_winters
can be a good reference
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 pretty, thanks 🚀
Thanks @haohuaijin, and @sunng87 for reviewing |
* feat: implement predict_linear function in promql * feat: initialize predict_linear's planner * fix(bug): fix a bug in linear regression and add some unit test for linear regression * chore: format code * feat: deal with NULL value in linear_regression * feat: add test for all value is None
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Implement
predict_linear
function in promql and add some unit test. Extractlinear_regression
fromderiv.rs
tofunctions.rs
for reuse it in predict_linear.Checklist
Refer to a related PR or issue link (optional)
#1349