mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
wip
This commit is contained in:
parent
bdf1983bdc
commit
3558b751ad
1 changed files with 22 additions and 0 deletions
|
@ -1599,6 +1599,17 @@ func (c *blockResultColumn) getMaxValue(br *blockResult) float64 {
|
|||
}
|
||||
}
|
||||
return max
|
||||
case valueTypeFloat64:
|
||||
max := nan
|
||||
for _, v := range c.encodedValues {
|
||||
b := bytesutil.ToUnsafeBytes(v)
|
||||
n := encoding.UnmarshalUint64(b)
|
||||
f := math.Float64frombits(n)
|
||||
if math.IsNaN(max) || f > max {
|
||||
max = f
|
||||
}
|
||||
}
|
||||
return max
|
||||
case valueTypeIPv4:
|
||||
return nan
|
||||
case valueTypeTimestampISO8601:
|
||||
|
@ -1696,6 +1707,17 @@ func (c *blockResultColumn) getMinValue(br *blockResult) float64 {
|
|||
}
|
||||
}
|
||||
return min
|
||||
case valueTypeFloat64:
|
||||
min := nan
|
||||
for _, v := range c.encodedValues {
|
||||
b := bytesutil.ToUnsafeBytes(v)
|
||||
n := encoding.UnmarshalUint64(b)
|
||||
f := math.Float64frombits(n)
|
||||
if math.IsNaN(min) || f < min {
|
||||
min = f
|
||||
}
|
||||
}
|
||||
return min
|
||||
case valueTypeIPv4:
|
||||
return nan
|
||||
case valueTypeTimestampISO8601:
|
||||
|
|
Loading…
Reference in a new issue