fallintoplace opened a new pull request, #1899: URL: https://github.com/apache/iceberg-go/pull/1899
## Summary - Reuse the row-group metric maps between `TestRowGroup` calls. - Pre-size `valueCounts` from the requested column count. - Create null and bound maps only when the row group has those metrics. - Clear reused maps before each row group so old metrics cannot leak. ## Performance **Benchmark:** `BenchmarkParquetRowGroupMetricsMaps` Apple M1 Pro, Go 1.26.3, 100 ms per case. | Case | Before | After | | --- | ---: | ---: | | 128 row groups, 8 columns, no stats | 184889 ns/op, 385033 B/op, 3712 allocs/op | 152865 ns/op, 360448 B/op, 3200 allocs/op | | 128 row groups, 8 columns, all stats | 916939 ns/op, 3305896 B/op, 18560 allocs/op | 886321 ns/op, 3170730 B/op, 17536 allocs/op | | 1024 row groups, 32 columns, no stats | 4778387 ns/op, 11534344 B/op, 103424 allocs/op | 4672652 ns/op, 11337776 B/op, 99328 allocs/op | | 1024 row groups, 32 columns, all stats | 31211177 ns/op, 115150928 B/op, 594951 allocs/op | 23795442 ns/op, 101258094 B/op, 558089 allocs/op | Numbers are local reference points and will vary by machine. ## Tests - `go test ./table/... -count=1` - `go test -race ./table -count=1` - `go vet ./table` - `go test ./table -run '^$' -bench '^BenchmarkParquetRowGroupMetricsMaps$' -benchmem -benchtime=100ms -count=1` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
