fallintoplace opened a new pull request, #1217: URL: https://github.com/apache/arrow-go/pull/1217
## Summary - **Skip metadata construction in `Encode`** for primitive values. - Keep `Of` unchanged for callers that need a complete `Value`. - Add byte-for-byte parity coverage for primitive types, boundaries, and options. - Add benchmarks for the encoded and metadata-building paths. ## Benchmark Apple M1 Pro, darwin/arm64. Times are rounded medians from 5 runs. `Of` is the previous metadata-building path. | Input | `Encode` | `Of` | | --- | ---: | ---: | | bool | 84 ns, 176 B, 3 allocs | 103 ns, 179 B, 4 allocs | | int64 max | 101 ns, 192 B, 5 allocs | 126 ns, 200 B, 6 allocs | | short string | 96 ns, 192 B, 4 allocs | 121 ns, 195 B, 5 allocs | | long string | 154 ns, 276 B, 6 allocs | 182 ns, 280 B, 7 allocs | | decimal128 | 148 ns, 216 B, 6 allocs | 167 ns, 224 B, 7 allocs | ## Tests - `go test ./parquet/variant -count=1` - `go test -race ./parquet/variant -run '^TestEncodeMatchesOf$' -count=1` - `go vet ./parquet/variant` - `PARQUET_TEST_DATA="$PWD/parquet-testing/data" go test -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]
