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

Function makeNilIterFunc

tempodb/encoding/vparquet3/block_search.go:371–392  ·  view source on GitHub ↗
(ctx context.Context, rgs []parquet.RowGroup, pf *parquet.File)

Source from the content-addressed store, hash-verified

369}
370
371func makeNilIterFunc(ctx context.Context, rgs []parquet.RowGroup, pf *parquet.File) makeIterFn {
372 return func(name string, predicate pq.Predicate, selectAs string) pq.Iterator {
373 index, _, maxDef := pq.GetColumnIndexByPath(pf, name)
374 if index == -1 {
375 // TODO - don't panic, error instead
376 panic("column not found in parquet file:" + name)
377 }
378
379 opts := []pq.SyncIteratorOpt{
380 pq.SyncIteratorOptColumnName(name),
381 pq.SyncIteratorOptPredicate(predicate),
382 pq.SyncIteratorOptSelectAs(selectAs),
383 pq.SyncIteratorOptMaxDefinitionLevel(maxDef),
384 }
385
386 if name != columnPathSpanID && name != columnPathTraceID {
387 opts = append(opts, pq.SyncIteratorOptIntern())
388 }
389
390 return pq.NewNilSyncIterator(ctx, rgs, index, opts...)
391 }
392}
393
394type rowNumberIterator struct {
395 rowNumbers []pq.RowNumber

Callers 2

autocompleteIterFunction · 0.70
createAllIteratorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected