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

Method FloatArray

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

Source from the content-addressed store, hash-verified

1041}
1042
1043func (s Static) FloatArray() ([]float64, bool) {
1044 if s.Type != TypeFloatArray {
1045 return nil, false
1046 }
1047
1048 if s.valBytes == nil {
1049 return nil, true
1050 }
1051 if len(s.valBytes) == 0 {
1052 return []float64{}, true
1053 }
1054 numFloats := uintptr(len(s.valBytes)) / unsafe.Sizeof(float64(0))
1055 return unsafe.Slice((*float64)(unsafe.Pointer(&s.valBytes[0])), numFloats), true
1056}
1057
1058func (s Static) StringArray() ([]string, bool) {
1059 if s.Type != TypeStringArray {

Callers 12

AsAnyValueMethod · 0.95
compareMethod · 0.95
ElementsMethod · 0.95
appendMethod · 0.95
EncodeToStringMethod · 0.95
createFloatPredicateFunction · 0.80
createFloatPredicateFunction · 0.80
createFloatPredicateFunction · 0.80
TestStatic_FloatArrayFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestStatic_FloatArrayFunction · 0.64