mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
app/vmselect/promql: fix q default b
where b
may have empty time series
This commit is contained in:
parent
25b841c6ed
commit
7ca08945fd
@ -90,12 +90,12 @@ func newBinaryOpFunc(bf func(left, right float64, isBool bool) float64) binaryOp
|
||||
// Do not remove empty series on the right side,
|
||||
// so the left-side series could be matched against them.
|
||||
case "default":
|
||||
// Do not remove empty series on the left side,
|
||||
// so they could be replaced with the corresponding series on the right side.
|
||||
right = removeEmptySeries(right)
|
||||
if len(right) == 0 {
|
||||
return left, nil
|
||||
}
|
||||
// Do not remove empty series on the left and the right side,
|
||||
// since this may result in missing result:
|
||||
// - if empty time series are removed on the left side,
|
||||
// then they won't be substituted by time series from the right side.
|
||||
// - if empty time series are removed on the right side,
|
||||
// then this may result in missing time series from the left side.
|
||||
default:
|
||||
left = removeEmptySeries(left)
|
||||
right = removeEmptySeries(right)
|
||||
|
Loading…
Reference in New Issue
Block a user