-
Notifications
You must be signed in to change notification settings - Fork 634
MQE: Refactor functions over instant vectors to support scalar args and add clamp function #9639
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
MQE: Refactor functions over instant vectors to support scalar args and add clamp function #9639
Conversation
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.
Overall LGTM.
I'd like to see a test for the case where the scalar values are different at different time steps, and tests for the case where the min parameter is greater than the max parameter for all steps and just some steps.
I'd also be interested to see some benchmarks: both a comparison of clamp
in MQE and Prometheus' engine, and the impact of these changes on already supported functions.
pkg/streamingpromql/operators/function_over_instant_vector_test.go
Outdated
Show resolved
Hide resolved
Benchmarks Clamp on this branch:
TL;DR: This branch vs main:
TL;DR: Refactor has no noticeable impact to |
What this PR does
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.