(ctx context.Context, pf *parquet.File)
| 648 | type makeIterFn func(columnName string, predicate parquetquery.Predicate, selectAs string) parquetquery.Iterator |
| 649 | |
| 650 | func makeIterFunc(ctx context.Context, pf *parquet.File) makeIterFn { |
| 651 | return func(name string, predicate parquetquery.Predicate, selectAs string) parquetquery.Iterator { |
| 652 | index, _, maxDef := parquetquery.GetColumnIndexByPath(pf, name) |
| 653 | if index == -1 { |
| 654 | panic("column not found in parquet file:" + name) |
| 655 | } |
| 656 | |
| 657 | opts := []parquetquery.SyncIteratorOpt{ |
| 658 | parquetquery.SyncIteratorOptColumnName(name), |
| 659 | parquetquery.SyncIteratorOptPredicate(predicate), |
| 660 | parquetquery.SyncIteratorOptSelectAs(selectAs), |
| 661 | parquetquery.SyncIteratorOptMaxDefinitionLevel(maxDef), |
| 662 | } |
| 663 | |
| 664 | return parquetquery.NewSyncIterator(ctx, pf.RowGroups(), index, opts...) |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | func aggregateGenericAttributes(pf *parquet.File, definitionLevel int, keyPath string, valuePath string, intPath string, isArrayPath string) (attributeSummary, error) { |
| 669 | makeIter := makeIterFunc(context.Background(), pf) |
no test coverage detected