fallintoplace opened a new pull request, #1945:
URL: https://github.com/apache/iceberg-go/pull/1945

   ## Summary
   
   - Resolve each partition source field once during `DataFile` finalization.
   - Use the borrowed source field type for partition bound conversion and 
transform result typing.
   - Avoid defensive field clones in the normal `ToDataFile` path.
   - Keep the existing behavior for missing statistics and invalid schemas.
   - Add a focused finalization benchmark.
   
   ## Benchmark
   
   Median of 5 runs on an Apple M1 Pro with `GOMAXPROCS=1`.
   
   The fixture uses binary source fields with mutable defaults so the defensive 
field copies are visible in the allocation numbers.
   
   Command:
   
   ```text
   GOMAXPROCS=1 go test -run '^$' -bench 
'^BenchmarkDataFileStatisticsToDataFile$' -benchmem -benchtime=500ms -count=5 
./table/internal
   ```
   
   | Partition fields | Before | After | Speedup |
   | --- | ---: | ---: | ---: |
   | 1 | 1.80 us/op | 1.51 us/op | 1.19x |
   | 8 | 8.33 us/op | 3.98 us/op | 2.09x |
   | 32 | 39.6 us/op | 22.5 us/op | 1.76x |
   
   For 32 partition fields:
   
   - 29,088 B/op -> 18,336 B/op
   - 676 allocs/op -> 292 allocs/op
   
   ## Checks
   
   - `go test . -count=1`
   - `go test ./table/... -count=1`
   - All non-cloud packages pass
   - `go vet ./...`
   


-- 
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]

Reply via email to