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

Function NewStaticFloatArray

pkg/traceql/ast.go:741–754  ·  view source on GitHub ↗
(f []float64)

Source from the content-addressed store, hash-verified

739}
740
741func NewStaticFloatArray(f []float64) Static {
742 if f == nil {
743 return Static{Type: TypeFloatArray}
744 }
745 if len(f) == 0 {
746 return Static{Type: TypeFloatArray, valBytes: []byte{}}
747 }
748
749 numBytes := uintptr(len(f)) * unsafe.Sizeof(f[0])
750 return Static{
751 Type: TypeFloatArray,
752 valBytes: unsafe.Slice((*byte)(unsafe.Pointer(&f[0])), numBytes),
753 }
754}
755
756func NewStaticStringArray(s []string) Static {
757 if s == nil {

Callers 15

KeepGroupMethod · 0.92
KeepGroupMethod · 0.92
ResultMethod · 0.92
appendMethod · 0.85
TestBinOpFunction · 0.85
TestStatic_MapKeyFunction · 0.85
TestStatic_EqualsFunction · 0.85

Calls

no outgoing calls

Tested by 12

TestBinOpFunction · 0.68
TestStatic_MapKeyFunction · 0.68
TestStatic_EqualsFunction · 0.68
TestStatic_compareFunction · 0.68
TestStatic_appendFunction · 0.68
newStaticFunction · 0.68
TestStatic_AsAnyValueFunction · 0.68