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

refactor: avoid unnecessary alloc by using unwrap_or_else #3742

Merged

Conversation

etolbakov
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3453
#3630

What's changed and what's your intention?

improve the implementation by avoid an allocation if the lookback value is provided.

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.

@etolbakov etolbakov requested a review from a team as a code owner April 18, 2024 20:09
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 18, 2024
@etolbakov
Copy link
Collaborator Author

@killme2008 @waynexia @tisonkun
Could you please take a look when you have time?

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

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

Project coverage is 85.13%. Comparing base (314f270) to head (8eebd91).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3742      +/-   ##
==========================================
- Coverage   85.46%   85.13%   -0.33%     
==========================================
  Files         966      966              
  Lines      162498   162506       +8     
==========================================
- Hits       138871   138348     -523     
- Misses      23627    24158     +531     

@tisonkun tisonkun changed the title feat(promql): address post-merge CR refactor: avoid unnecessary alloc by using unwrap_or_else Apr 18, 2024
@tisonkun tisonkun requested review from killme2008 and waynexia April 18, 2024 23:27
@tisonkun
Copy link
Collaborator

Thank you!

@tisonkun
Copy link
Collaborator

I update the PR title. We're now generating release notes from PR title, so keeping it clear and expressive is important :D

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Apr 19, 2024
Merged via the queue into GreptimeTeam:main with commit 2114b15 Apr 19, 2024
22 checks passed
@etolbakov etolbakov deleted the chore-promql-parameterize-lookback branch April 19, 2024 05:12
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.

3 participants