Repository navigation
Optimize indexed copying for dictionary arrays - #12306
Conversation
|
run benchmark coalesce_kernels |
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing codex/issue-11940 (39dae89) to a6c6848 (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: 'filter: single_dict'
resources:
arch: arm64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing codex/issue-11940 (39dae89) to a6c6848 (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: 'filter: single_dict'
resources:
arch: amd64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing codex/issue-11940 (39dae89) to a6c6848 (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: 'filter: single_dict'
resources:
arch: arm64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1qxqoun0-a299a55e-w76w Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing codex/issue-11940 (39dae89) to a6c6848 (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: 'filter: single_dict'
resources:
arch: amd64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1bscwilp-afd69fe1-4lr8 Instance: c4-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark coalesce_kernels |
|
run benchmark coalesce_kernels |
|
Could not resolve immutable commits for sharding (#12306 (comment)): GitHub API GET error 422 Unprocessable Entity: {"message":"No commit found for SHA: cfd9dfae14c5143da3bd597ae3be0b637733f5a6","documentation_url":"https://docs.github.com/rest/commits/commits#get-a-commit","status":"422"} File an issue against this benchmark runner |
|
Could not resolve immutable commits for sharding (#12306 (comment)): GitHub API GET error 422 Unprocessable Entity: {"message":"No commit found for SHA: cfd9dfae14c5143da3bd597ae3be0b637733f5a6","documentation_url":"https://docs.github.com/rest/commits/commits#get-a-commit","status":"422"} File an issue against this benchmark runner |
|
run benchmark coalesce_kernels |
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing codex/issue-11940 (43186b4) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
env:
BENCH_FILTER: shared values
resources:
arch: amd64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing codex/issue-11940 (43186b4) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
env:
BENCH_FILTER: shared values
resources:
arch: arm64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing codex/issue-11940 (43186b4) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
env:
BENCH_FILTER: shared values
resources:
arch: amd64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1lxlxann-74a97450-rs7j Instance: c4-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing codex/issue-11940 (43186b4) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
env:
BENCH_FILTER: shared values
resources:
arch: arm64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1vtveftb-d03e7e67-jwgn Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
This reverts commit 62c563a.
|
run benchmark coalesce_kernels |
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing 15ce80f (15ce80f) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
changed:
ref: 15ce80f1d47531150269a42fe2a72994bc859aec
env:
BENCH_FILTER: 'take: single_dict'
resources:
arch: amd64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing 15ce80f (15ce80f) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
changed:
ref: 15ce80f1d47531150269a42fe2a72994bc859aec
env:
BENCH_FILTER: 'take: single_dict'
resources:
arch: arm64
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing 15ce80f (15ce80f) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
changed:
ref: 15ce80f1d47531150269a42fe2a72994bc859aec
env:
BENCH_FILTER: 'take: single_dict'
resources:
arch: arm64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-16rfuggx-41b2c3ef-dcwq Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing 15ce80f (15ce80f) to cfd9dfa diff Run configurationrun benchmark coalesce_kernels
baseline:
ref: cfd9dfae144b2cd96ac9d3b0dc91294c23e6c1cb
changed:
ref: 15ce80f1d47531150269a42fe2a72994bc859aec
env:
BENCH_FILTER: 'take: single_dict'
resources:
arch: amd64
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-11qqno8o-efc87962-n8lm Instance: c4-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench coalesce_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
| use std::mem::size_of; | ||
| use std::sync::Arc; | ||
|
|
||
| const INDEXED_COPY_MAX_SELECTIVITY_DENOMINATOR: usize = 16; |
There was a problem hiding this comment.
what is this value based on
There was a problem hiding this comment.
local benchmarks on a macbook m4. did a binary search until we reached the best results
|
thanks @Jefffrey |
Which issue does this PR close?
Rationale for this change
Sparse indexed copies of byte dictionaries currently materialize a new dictionary array before coalescing it. This adds avoidable work and prevents the coalescer from reusing the dictionary values array directly.
What changes are included in this PR?
Implement
copy_rows_by_indicesfor dictionaries withUtf8,LargeUtf8,Binary, andLargeBinaryvalues. Sparse selections gather keys directly and retain the source values arrays for remapping when the batch is finished; denser selections continue to use the existingtakefallback.Are these changes tested?
Yes. Unit tests cover sparse indexed copies with sliced and null keys, repeated and out-of-order indices, the dense fallback, values-array reuse, and remapping across multiple dictionaries with different value orderings.
The final implementation was benchmarked across shared and changing dictionary values, four selectivities, and nullable/non-null inputs:
Are there any significant user-facing changes?
No public API changes.