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

feat: implement stdvar_over_time function #1291

Merged
merged 4 commits into from
Apr 3, 2023
Merged

feat: implement stdvar_over_time function #1291

merged 4 commits into from
Apr 3, 2023

Conversation

haohuaijin
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

I implement the stdvar_over_time function in PromQL and add necessary unit test.

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 (optional)

#1229

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #1291 (3dee37b) into develop (6a05f61) will decrease coverage by 0.40%.
The diff coverage is 87.64%.

@@             Coverage Diff             @@
##           develop    #1291      +/-   ##
===========================================
- Coverage    85.88%   85.49%   -0.40%     
===========================================
  Files          500      501       +1     
  Lines        75756    75907     +151     
===========================================
- Hits         65066    64895     -171     
- Misses       10690    11012     +322     

@waynexia
Copy link
Member

Sorry for the late reply. It looks very neat!

The same as #1289 (comment):

As stddev is relatively more complicated than other aggr_over_time fns, we need to add more test cases. Actually I found two cases from prometheus

Do you mind adding these two cases to your test as well? And you may also need the this function, let's wait a while before #1289 merged!

@haohuaijin
Copy link
Contributor Author

@waynexia Thank for your reply.
I have added those two tests. And my implement based on Datafusion implement, it seems that I don't need this function.

@haohuaijin
Copy link
Contributor Author

Hi, @waynexia
I already resolved the conflict and add stdvar_over_time to functions.rs.

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.

Great work, thanks for this!

@waynexia waynexia requested a review from killme2008 April 2, 2023 14:03
@MichaelScofield MichaelScofield merged commit a82f1f5 into GreptimeTeam:develop Apr 3, 2023
@haohuaijin haohuaijin deleted the stdvar_over_time branch April 3, 2023 03:09
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: implement stdvar_over_time function

* feat: add more test for stdvar_over_time

* feat: add stdvar_over_time to functions.rs
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