fallintoplace opened a new pull request, #2254: URL: https://github.com/apache/iceberg-go/pull/2254
## What Use typed maps for common fanout partition keys. ## Why The grouping path looks up primitive keys in `map[any]any` for every row. ## Implementation - Use typed maps for `int32`, `int64`, and `string` keys. - Keep binary and generic fallbacks, including NaN and signed-zero handling. - Include typed child maps when collecting nested partitions. - Add a benchmark for the full Arrow-to-Iceberg grouping path. ## Benchmark Isolated grouping benchmark with 65,536 prebuilt keys per operation. Median of five runs on Linux/amd64, Go 1.23.2, AMD EPYC 9V74, with `GOMAXPROCS=1`. Primitive cases ran for 400 ms per sample; the Float64 fallback ran for 300 ms. This measures lookup, insertion, and partition collection, not end-to-end write throughput. | Case | ns/op before → typed | B/op before → typed | allocs/op before → typed | | --- | ---: | ---: | ---: | | Int64, 64 interleaved | 1,919,260 → 1,470,369 (1.31x) | 1,627,427 → 1,625,439 | 906 → 906 | | Int64, 16,384 interleaved | 9,547,111 → 7,372,840 (1.29x) | 4,508,955 → 3,906,557 | 82,413 → 82,475 | | Int32, 64 interleaved | 2,011,904 → 1,524,058 (1.32x) | 1,627,414 → 1,623,853 | 906 → 906 | | String, 1,024 interleaved | 3,574,335 → 2,978,382 (1.20x) | 1,272,808 → 1,272,672 | 9,249 → 9,249 | | Int64, 64 clustered | 2,017,611 → 1,618,883 (1.25x) | 1,627,431 → 1,625,439 | 906 → 906 | | Float64 fallback | 2,499,302 → 2,527,508 (0.99x) | 1,627,404 → 1,627,427 | 906 → 906 | The in-repository `BenchmarkFanoutTypedPartitionKeys` measures real Arrow extraction and grouping: ```sh go test ./table -run '^$' -bench '^BenchmarkFanoutTypedPartitionKeys$' -benchtime=400ms -count=5 -benchmem ``` -- 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]
