MCPcopy
hub / github.com/grafana/tempo / Float

Method Float

pkg/traceql/ast.go:975–986  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

973}
974
975func (s Static) Float() float64 {
976 switch s.Type {
977 case TypeFloat:
978 return math.Float64frombits(s.valScalar)
979 case TypeInt:
980 return float64(int(s.valScalar))
981 case TypeDuration:
982 return float64(int64(s.valScalar))
983 default:
984 return math.NaN()
985 }
986}
987
988func (s Static) Bool() (bool, bool) {
989 return s.valScalar != 0, s.Type == TypeBoolean

Callers 15

AsAnyValueMethod · 0.95
EqualsMethod · 0.95
compareMethod · 0.95
appendMethod · 0.95
CombineMethod · 0.95
EncodeToStringMethod · 0.95
createFloatPredicateFunction · 0.80
createFloatPredicateFunction · 0.80
createFloatPredicateFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestStatic_FloatFunction · 0.64