(ctx context.Context, req *tempopb.SearchRequest, opts common.SearchOptions)
| 87 | } |
| 88 | |
| 89 | func (b *backendBlock) Search(ctx context.Context, req *tempopb.SearchRequest, opts common.SearchOptions) (_ *tempopb.SearchResponse, err error) { |
| 90 | derivedCtx, span := tracer.Start(ctx, "parquet.backendBlock.Search", |
| 91 | trace.WithAttributes( |
| 92 | attribute.String("blockID", b.meta.BlockID.String()), |
| 93 | attribute.String("tenantID", b.meta.TenantID), |
| 94 | attribute.Int64("blockSize", int64(b.meta.Size_)), |
| 95 | )) |
| 96 | defer span.End() |
| 97 | |
| 98 | pf, rr, err := b.openForSearch(derivedCtx, opts) |
| 99 | if err != nil { |
| 100 | return nil, fmt.Errorf("unexpected error opening parquet file: %w", err) |
| 101 | } |
| 102 | defer func() { span.SetAttributes(attribute.Int64("inspectedBytes", int64(rr.BytesRead()))) }() |
| 103 | |
| 104 | // Get list of row groups to inspect. Ideally we use predicate pushdown |
| 105 | // here to keep only row groups that can potentially satisfy the request |
| 106 | // conditions, but don't have it figured out yet. |
| 107 | rgs := rowGroupsFromFile(pf, opts) |
| 108 | results, err := searchParquetFile(derivedCtx, pf, req, rgs, b.meta.DedicatedColumns) |
| 109 | if err != nil { |
| 110 | return nil, err |
| 111 | } |
| 112 | results.Metrics.InspectedBytes += rr.BytesRead() |
| 113 | results.Metrics.InspectedTraces += uint32(b.meta.TotalObjects) |
| 114 | |
| 115 | return results, nil |
| 116 | } |
| 117 | |
| 118 | func makePipelineWithRowGroups(ctx context.Context, req *tempopb.SearchRequest, pf *parquet.File, rgs []parquet.RowGroup, dc backend.DedicatedColumns) pq.Iterator { |
| 119 | makeIter := makeIterFunc(ctx, rgs, pf) |
nothing calls this directly
no test coverage detected