fetchSpans is the core logic for span-only fetch, like fetch is for Fetch. Callers open the parquet file and pass row groups.
(ctx context.Context, req traceql.FetchSpansRequest, pf *parquet.File, rowGroups []parquet.RowGroup, dc backend.DedicatedColumns)
| 31 | |
| 32 | // fetchSpans is the core logic for span-only fetch, like fetch is for Fetch. Callers open the parquet file and pass row groups. |
| 33 | func fetchSpans(ctx context.Context, req traceql.FetchSpansRequest, pf *parquet.File, rowGroups []parquet.RowGroup, dc backend.DedicatedColumns) (*spanOnlyIterator, error) { |
| 34 | makeIter := makeIterFunc(ctx, rowGroups, pf) |
| 35 | makeNilIter := makeNilIterFunc(ctx, rowGroups, pf) |
| 36 | iter, span, err := create(makeIter, makeNilIter, nil, req.Conditions, req.SecondPass, req.StartTimeUnixNanos, req.EndTimeUnixNanos, req.AllConditions, false, dc, req.SpanSampler) |
| 37 | if err != nil { |
| 38 | return nil, err |
| 39 | } |
| 40 | if len(req.SecondPassConditions) > 0 || req.SecondPassSelectAll { |
| 41 | iter, span, err = create(makeIter, makeNilIter, iter, req.SecondPassConditions, nil, 0, 0, false, req.SecondPassSelectAll, dc, nil) |
| 42 | if err != nil { |
| 43 | return nil, err |
| 44 | } |
| 45 | } |
| 46 | return &spanOnlyIterator{iter: iter, span: span}, nil |
| 47 | } |
| 48 | |
| 49 | type spanOnlyIterator struct { |
| 50 | iter parquetquery.Iterator |
no test coverage detected