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: clamp function #3465

Merged
merged 6 commits into from
Mar 11, 2024
Merged

feat: clamp function #3465

merged 6 commits into from
Mar 11, 2024

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Mar 8, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Implement the CLAMP(val, min, max) that can clamp the given value into the range [min, max].

Similar function in other systems:

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 85.62874% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 85.06%. Comparing base (3f3ef2e) to head (8fa3529).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3465      +/-   ##
==========================================
- Coverage   85.41%   85.06%   -0.35%     
==========================================
  Files         896      897       +1     
  Lines      147185   147851     +666     
==========================================
+ Hits       125711   125776      +65     
- Misses      21474    22075     +601     

Copy link
Collaborator

@etolbakov etolbakov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Taylor-lagrange Taylor-lagrange left a comment

Choose a reason for hiding this comment

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

LGMT

@waynexia waynexia enabled auto-merge March 11, 2024 03:25
@waynexia waynexia added this pull request to the merge queue Mar 11, 2024
Merged via the queue into GreptimeTeam:main with commit d8939eb Mar 11, 2024
18 checks passed
@waynexia waynexia deleted the clamp-fn branch March 11, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants