mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
app/vmselect/promql: rename removeNaNs() to more clear removeEmptySeries()
This commit is contained in:
parent
1e0517b9cd
commit
0ef7a05fc0
@ -619,7 +619,7 @@ func newAggrFuncTopK(isReverse bool) aggrFunc {
|
||||
})
|
||||
fillNaNsAtIdx(n, ks[n], tss)
|
||||
}
|
||||
tss = removeNaNs(tss)
|
||||
tss = removeEmptySeries(tss)
|
||||
reverseSeries(tss)
|
||||
return tss
|
||||
}
|
||||
@ -686,7 +686,7 @@ func getRangeTopKTimeseries(tss []*timeseries, modifier *metricsql.ModifierExpr,
|
||||
if remainingSumTS != nil {
|
||||
tss = append(tss, remainingSumTS)
|
||||
}
|
||||
tss = removeNaNs(tss)
|
||||
tss = removeEmptySeries(tss)
|
||||
reverseSeries(tss)
|
||||
return tss
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ func binaryOpAnd(bfa *binaryOpFuncArg) ([]*timeseries, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
tssLeft = removeNaNs(tssLeft)
|
||||
tssLeft = removeEmptySeries(tssLeft)
|
||||
rvs = append(rvs, tssLeft...)
|
||||
}
|
||||
return rvs, nil
|
||||
@ -382,7 +382,7 @@ func binaryOpUnless(bfa *binaryOpFuncArg) ([]*timeseries, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
tssLeft = removeNaNs(tssLeft)
|
||||
tssLeft = removeEmptySeries(tssLeft)
|
||||
rvs = append(rvs, tssLeft...)
|
||||
}
|
||||
return rvs, nil
|
||||
|
@ -91,7 +91,7 @@ func maySortResults(e metricsql.Expr, tss []*timeseries) bool {
|
||||
}
|
||||
|
||||
func timeseriesToResult(tss []*timeseries, maySort bool) ([]netstorage.Result, error) {
|
||||
tss = removeNaNs(tss)
|
||||
tss = removeEmptySeries(tss)
|
||||
result := make([]netstorage.Result, len(tss))
|
||||
m := make(map[string]struct{}, len(tss))
|
||||
bb := bbPool.Get()
|
||||
@ -144,7 +144,7 @@ func metricNameLess(a, b *storage.MetricName) bool {
|
||||
return len(ats) < len(bts)
|
||||
}
|
||||
|
||||
func removeNaNs(tss []*timeseries) []*timeseries {
|
||||
func removeEmptySeries(tss []*timeseries) []*timeseries {
|
||||
rvs := tss[:0]
|
||||
for _, ts := range tss {
|
||||
allNans := true
|
||||
|
Loading…
Reference in New Issue
Block a user