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