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

Function NewStaticIntArray

pkg/traceql/ast.go:726–739  ·  view source on GitHub ↗
(i []int)

Source from the content-addressed store, hash-verified

724}
725
726func NewStaticIntArray(i []int) Static {
727 if i == nil {
728 return Static{Type: TypeIntArray}
729 }
730 if len(i) == 0 {
731 return Static{Type: TypeIntArray, valBytes: []byte{}}
732 }
733
734 numBytes := uintptr(len(i)) * unsafe.Sizeof(i[0])
735 return Static{
736 Type: TypeIntArray,
737 valBytes: unsafe.Slice((*byte)(unsafe.Pointer(&i[0])), numBytes),
738 }
739}
740
741func NewStaticFloatArray(f []float64) Static {
742 if f == 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
TestStatic_compareFunction · 0.85

Calls

no outgoing calls

Tested by 11

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