-
Notifications
You must be signed in to change notification settings - Fork 229
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(histogram): add meaningful exception when histograms add buckets with different sizes #1880
Conversation
Please follow the guidelines for PR descriptions ( look at the previous closed PRs for reference as well) |
Thanks for the reminder. It's updated. |
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
…cala Co-authored-by: yu-shipit <[email protected]>
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.
lgtm
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
assert(other.buckets == buckets) | ||
if (other.buckets != buckets) { | ||
throw new IllegalArgumentException( | ||
"Mismatch in bucket sizes. Cannot add histograms with different bucket configurations." |
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.
nitpick: buckets size could also be same, but the bucket configurations might be different
Pull Request checklist
Current behavior : when histograms add buckets with different sizes, it returns a 5xx error
New behavior : it returns an IllegalArgumentException with a meaningful message