-
Notifications
You must be signed in to change notification settings - Fork 415
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
fix: Correct the percentile values passed to the percentile function in DescriptiveStats for the index describe command #4136
fix: Correct the percentile values passed to the percentile function in DescriptiveStats for the index describe command #4136
Conversation
Would you mind improving the |
@guilload am still figuring my way around the codebase, could you help point me in the right direction, I am assuming you mean add assertions that should catch similar errors in the future? |
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.
You got it right! Remove the unnecessary line and we should be good.
You can run You can run cargo test --manifest-path quickwit/Cargo.toml -p quickwit-common to test a single crate. |
@guilload Should be good now. |
Thanks @unpervertedkid ! |
Description
This PR corrects the percentile values passed to the percentile function in the DescriptiveStats struct. Previously, the percentiles were incorrectly set as 1, 50, 50, 75, and 75. This PR changes these values to correctly represent the 1st, 25th, 50th, 75th, and 99th percentiles.
How was this PR tested?
This PR was tested by running the existing unit tests for the DescriptiveStats struct. Additionally, manual testing was performed by generating statistics for a sample dataset and verifying that the outputted percentiles were correct.
More assertions were added to prevent the same issue from recurring in the future.