(ctx context.Context, rgs []parquet.RowGroup, pf *parquet.File)
| 390 | } |
| 391 | |
| 392 | func makeNilIterFunc(ctx context.Context, rgs []parquet.RowGroup, pf *parquet.File) makeIterFn { |
| 393 | return func(name string, predicate pq.Predicate, selectAs string) pq.Iterator { |
| 394 | index, _, maxDef := pq.GetColumnIndexByPath(pf, name) |
| 395 | if index == -1 { |
| 396 | // TODO - don't panic, error instead |
| 397 | panic("column not found in parquet file:" + name) |
| 398 | } |
| 399 | |
| 400 | opts := []pq.SyncIteratorOpt{ |
| 401 | pq.SyncIteratorOptColumnName(name), |
| 402 | pq.SyncIteratorOptPredicate(predicate), |
| 403 | pq.SyncIteratorOptSelectAs(selectAs), |
| 404 | pq.SyncIteratorOptMaxDefinitionLevel(maxDef), |
| 405 | } |
| 406 | |
| 407 | if name != columnPathSpanID && name != columnPathTraceID { |
| 408 | opts = append(opts, pq.SyncIteratorOptIntern()) |
| 409 | } |
| 410 | |
| 411 | return pq.NewNilSyncIterator(ctx, rgs, index, opts...) |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | // reportValuesPredicate is a "fake" predicate that uses existing iterator logic to find all values in a given column |
| 416 | type reportValuesPredicate struct { |
no outgoing calls
no test coverage detected