-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
SSE: Reduce to apply Mode to instant vector (mathexp.Number) #74859
Conversation
Text: fmt.Sprintf("Reduce operation is not needed. Input query or expression %s is already reduced data.", gr.VarToReduce), | ||
}) | ||
copyV.SetValue(value) | ||
if gr.seriesMapper == nil { |
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.
I think this is semantically correct because in this case reduce is not a noop anymore.
require.Equal(t, expectedValue, actualValue) | ||
} | ||
|
||
t.Run("should add warn notices to every frame", func(t *testing.T) { |
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.
We should see if works with only the first frame, and if it does only put it there. Else were could be repeating this string a lot if there are many items in the response.
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.
I can address it in a follow-up PR.
What is this feature?
Updates reduce command expression to apply modes
Drop
andReplace
to mathexp.Number.Also, it changes when the warning is returned. If mapping mode is not Strict, the warning will not be added.
Why do we need this feature?
Initially, the expression applied this mode to mathexp.Series (i.e. time-series). However, from user's perspective, the format of data may not be clear and the expression behavior looks different.
Who is this feature for?
Alerting users that query data sources that return vectors and want to drop\map non-numeric values.
Which issue(s) does this PR fix?:
Fixes #74645
Special notes for your reviewer:
Please check that: