(ctx context.Context, req traceql.FetchSpansRequest, opts common.SearchOptions)
| 15 | ) |
| 16 | |
| 17 | func (b *backendBlock) FetchSpans(ctx context.Context, req traceql.FetchSpansRequest, opts common.SearchOptions) (traceql.FetchSpansOnlyResponse, error) { |
| 18 | pf, rr, err := b.openForSearch(ctx, opts) |
| 19 | if err != nil { |
| 20 | return traceql.FetchSpansOnlyResponse{}, err |
| 21 | } |
| 22 | iter, err := fetchSpans(ctx, req, pf, rowGroupsFromFile(pf, opts), b.meta.DedicatedColumns) |
| 23 | if err != nil { |
| 24 | return traceql.FetchSpansOnlyResponse{}, err |
| 25 | } |
| 26 | return traceql.FetchSpansOnlyResponse{ |
| 27 | Results: iter, |
| 28 | Bytes: func() uint64 { return rr.BytesRead() }, |
| 29 | }, nil |
| 30 | } |
| 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) { |
nothing calls this directly
no test coverage detected