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

Function extractToSecondPass

pkg/traceql/ast.go:217–232  ·  view source on GitHub ↗
(req *FetchSpansRequest, element PipelineElement)

Source from the content-addressed store, hash-verified

215}
216
217func extractToSecondPass(req *FetchSpansRequest, element PipelineElement) {
218 req2 := &FetchSpansRequest{}
219 element.extractConditions(req2)
220
221 // Copy all to second pass, except if there is already an OpNone then it suffices for all cases.
222 for _, c := range req2.Conditions {
223 if !req.HasAttributeWithOp(c.Attribute, OpNone) {
224 req.SecondPassConditions = append(req.SecondPassConditions, c)
225 }
226 }
227 for _, c := range req2.SecondPassConditions {
228 if !req.HasAttributeWithOp(c.Attribute, OpNone) {
229 req.SecondPassConditions = append(req.SecondPassConditions, c)
230 }
231 }
232}
233
234func (p Pipeline) evaluate(input []*Spanset) (result []*Spanset, err error) {
235 result = input

Callers 1

extractConditionsMethod · 0.85

Calls 2

HasAttributeWithOpMethod · 0.80
extractConditionsMethod · 0.65

Tested by

no test coverage detected