You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/08/26 21:57:56 UTC
[PR] perf(arrow/array): batch union null and empty appends [arrow-go]
fallintoplace opened a new pull request, #1216:
URL: https://github.com/apache/arrow-go/pull/1216
## Summary
- **Batch sparse union appends** through the child bulk APIs.
- **Write repeated type IDs and dense offsets** directly into their buffers.
- **Keep dense unions compact** by sharing one physical null or empty child value.
- **Treat non-positive counts as no-ops** for both union modes.
- Add parity, edge-case, and benchmark coverage.
## Benchmarks
Apple M1 Pro, darwin/arm64, 65,536 rows. Times are rounded medians from 3 runs.
| Mode | Operation | Before | After | Before allocs | After allocs |
| --- | --- | ---: | ---: | ---: | ---: |
| Sparse | nulls | ~1.83 ms | ~0.35 ms | 44 | 34 |
| Sparse | empty | ~1.83 ms | ~0.33 ms | 44 | 34 |
| Dense | nulls | ~0.55 ms | ~0.14 ms | 51 | 29 |
| Dense | empty | ~0.39 ms | ~0.14 ms | ~51 | 29 |
The benchmark uses the same builder setup before and after. Small row counts stay close to benchmark noise.
## Tests
- `go test ./arrow/array -count=1`
- `go test -race ./arrow/array -run 'Test(UnionBuilderBulkAppendNullsAndEmptyValues|UnionBuilderZeroBulkAppendDoesNotMutateChildren|UnionBuilderBulkAppendMatchesScalar)$' -count=1`
- `go vet ./arrow/array`
- `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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(arrow/array): batch union null and empty appends [arrow-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #1216:
URL: https://github.com/apache/arrow-go/pull/1216
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org