mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-07 14:47:11 +02:00
parent
dfdd2cb5f4
commit
a53d4ed197
@ -1151,7 +1151,7 @@ func (ev *evaluator) VectorscalarBinop(op itemType, lhs Vector, rhs Scalar, swap
|
|||||||
}
|
}
|
||||||
if keep {
|
if keep {
|
||||||
lhsSample.V = value
|
lhsSample.V = value
|
||||||
if shouldDropMetricName(op) {
|
if shouldDropMetricName(op) || returnBool {
|
||||||
lhsSample.Metric = dropMetricName(lhsSample.Metric)
|
lhsSample.Metric = dropMetricName(lhsSample.Metric)
|
||||||
}
|
}
|
||||||
vec = append(vec, lhsSample)
|
vec = append(vec, lhsSample)
|
||||||
|
3
promql/testdata/operators.test
vendored
3
promql/testdata/operators.test
vendored
@ -236,6 +236,9 @@ eval instant at 50m 0 == bool 1
|
|||||||
eval instant at 50m 1 == bool 1
|
eval instant at 50m 1 == bool 1
|
||||||
1
|
1
|
||||||
|
|
||||||
|
eval instant at 50m http_requests{job="api-server", instance="0", group="production"} == bool 100
|
||||||
|
{job="api-server", instance="0", group="production"} 1
|
||||||
|
|
||||||
# group_left/group_right.
|
# group_left/group_right.
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
Loading…
Reference in New Issue
Block a user