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

Function makeNilIterFunc

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

Source from the content-addressed store, hash-verified

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

Callers 2

autocompleteIterFunction · 0.70
createAllIteratorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected