fallintoplace opened a new pull request, #1907: URL: https://github.com/apache/iceberg-go/pull/1907
## What - Use the existing borrowed partition view while building the equality-delete index. - Use it again while matching data files against partitioned equality deletes. - Keep the public `DataFile.Partition()` defensive-copy behavior unchanged. - Add a focused benchmark using the built-in `DataFile` implementation. ## Why `DataFile.Partition()` creates a defensive copy. The equality-delete index only reads the partition while it immediately builds a lookup key, so the copy is unnecessary on this trusted internal path. The existing `dataFilePartition` helper already falls back to `Partition()` for external `DataFile` implementations. ## Benchmark Command: ```text go test ./table -run '^TestEqualityDeleteIndex' -bench '^BenchmarkEqualityDeleteIndexBuiltInPartition$' -benchmem -benchtime=200ms -count=5 ``` Median of 5 runs on an Apple M1 Pro with Go 1.26.3. Each value is `ns/op, B/op, allocs/op`. | Case | Before | After | | --- | --- | --- | | lookup, 1 field | 236.5, 256, 2 | 83.1, 0, 0 | | lookup, 8 fields | 675.2, 648, 9 | 486.0, 392, 7 | | lookup, 32 fields | 2542, 3472, 13 | 1788, 1592, 9 | | build, 1 field | 639.3, 1112, 8 | 527.0, 856, 6 | | build, 8 fields | 1086, 1512, 14 | 937.7, 1256, 12 | | build, 32 fields | 3095, 4352, 18 | 2182, 2472, 14 | ## Testing - `go test ./table -count=1 -timeout=5m` - `go test ./table -race -run '^TestEqualityDeleteIndex' -count=1 -timeout=5m` - `go test ./... -run '^$' -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]
