mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
Merge pull request #12595 from prometheus/atan2-drop-metric-name
Drop metric name for "atan2" binary operator
This commit is contained in:
commit
657da2eb98
|
@ -2874,7 +2874,7 @@ func btos(b bool) float64 {
|
|||
// result of the op operation.
|
||||
func shouldDropMetricName(op parser.ItemType) bool {
|
||||
switch op {
|
||||
case parser.ADD, parser.SUB, parser.DIV, parser.MUL, parser.POW, parser.MOD:
|
||||
case parser.ADD, parser.SUB, parser.DIV, parser.MUL, parser.POW, parser.MOD, parser.ATAN2:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
|
4
promql/testdata/operators.test
vendored
4
promql/testdata/operators.test
vendored
|
@ -477,10 +477,10 @@ load 5m
|
|||
trigNaN{} NaN
|
||||
|
||||
eval instant at 5m trigy atan2 trigx
|
||||
trigy{} 0.4636476090008061
|
||||
{} 0.4636476090008061
|
||||
|
||||
eval instant at 5m trigy atan2 trigNaN
|
||||
trigy{} NaN
|
||||
{} NaN
|
||||
|
||||
eval instant at 5m 10 atan2 20
|
||||
0.4636476090008061
|
||||
|
|
Loading…
Reference in a new issue