-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
vmselect: raising any series to power of 0 in range queries returns non-existing data points #7359
Comments
Thanks for the bug report. I will raise a pull request for this. Please help verifying the result for query Also, you can try to update the MetricsQL package like this and build it from source:
|
Hi! According to the screenshot you provided, it looks like the issue has been fixed by your changes. 👍 Thank you! |
Thanks. It will be reviewed by maintainers. And also wanna to clarify the reason behind this.
Line 175 returns empty result. VictoriaMetrics/app/vmselect/promql/binary_op.go Lines 170 to 176 in 92de6ea
|
Thank you. That’s the behavior (after the fix) I would expect. I just hope no one is relying on the current behavior in their queries. 🤞 |
Describe the bug
Hi,
I've encountered an issue in VictoriaMetrics. When raising any series to the power of 0 in a range query, the result contains a data point for every step in the queried range - even if the series has only a single data point within that range.
The correct behavior should be similar to the output produced by the
group without ()
function. This means that if the series being raised has no data at a particular step of the range query, it should return no data point for that timestamp.This issue affects both the clustered and single-node versions of VictoriaMetrics.
Thank you.
To Reproduce
To reproduce the issue, run
(hour() == 12)^0
as a range query over a 24-hour time range.Version
victoria-metrics-20241021-132758-tags-v1.105.0-0-g05f6ea621d
Logs
No response
Screenshots
Result of
(hour() == 12)^0
Expected result
Used command-line flags
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: