Repository navigation
perf(arrow): fuse Boolean filter copying - #11918
Rich-T-kid wants to merge 2 commits into
Conversation
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (2637e5b) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (2637e5b) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-2bx3iakq-2158138a-9hhg 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 |
154cace to
56c6e8c
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (967d3d0) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (967d3d0) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1tw271hz-870aa374-gtwm 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 |
967d3d0 to
f66a20c
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (f66a20c) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
e9faa76 to
0efb530
Compare
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing rich-T-kid/coalescer-boolean-filter-words (f66a20c) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1ken38iy-4504e04d-ct9z 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 |
0efb530 to
2502bea
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (2502bea) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (2502bea) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1exwvsr2-39029fda-8h8s 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 |
2502bea to
a88e90c
Compare
created #11921 for this |
a88e90c to
05de52d
Compare
Pack selected Boolean values and validity bits directly into the in-progress builders, avoiding temporary filtered arrays. Check filter masks before reading source words so sparse inputs skip empty chunks. Use separate loops for sources with and without actual nulls, and carry compressed fragments across chunk boundaries while preserving lazy validity allocation.
05de52d to
16e65c3
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (16e65c3) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
@mbutrovich if your interested this is ready for review. Should be the final PR related to booleans in the coalescer kernel & it implements the ideas you mentioned here #11732 (comment) 🚀 |
mbutrovich
left a comment
There was a problem hiding this comment.
Thanks @Rich-T-kid, this is the order we talked about in #11732, and the sparse-filter numbers from the bot look good. Filing #11921 for the dense cases is the right call.
|
🤖 Benchmark completed (GKE) | trigger Target: coalesce_kernels Comparing rich-T-kid/coalescer-boolean-filter-words (16e65c3) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-s8dlj0s2-749b0757-kqjj 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 |
|
run benchmark coalesce_kernels |
1 similar comment
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (176af76) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (176af76) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (176af76) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-s8dlj0s2-9d742a00-t68b 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 rich-T-kid/coalescer-boolean-filter-words (176af76) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-zknmidoc-9e5bd0bb-8jts 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 |
176af76 to
9b48802
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (9b48802) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
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 rich-T-kid/coalescer-boolean-filter-words (9b48802) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1bd6zsy7-b5970f85-bs68 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 |
9b48802 to
e22fa80
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (e22fa80) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
Let the Boolean coalescer append words produced by the existing compression kernel instead of maintaining a second copy of its packing loop. Support values and validity in one mask traversal, and cover shorter filters and exact word boundaries.
e22fa80 to
4d091cd
Compare
|
run benchmark coalesce_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: coalesce_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (4d091cd) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
run benchmark filter_kernels |
|
🤖 Benchmark starting (GKE) | trigger Target: filter_kernels Sharding factor: 1 (1 workers). Comparing rich-T-kid/coalescer-boolean-filter-words (4d091cd) to 69be95c (merge-base) diff Run configurationrun benchmark filter_kernels
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 rich-T-kid/coalescer-boolean-filter-words (e22fa80) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-a7pbla7y-9f7e0324-m8jd 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 rich-T-kid/coalescer-boolean-filter-words (4d091cd) to 69be95c (merge-base) diff Run configurationrun benchmark coalesce_kernels
env:
BENCH_FILTER: single_boolean
shards: 1
DetailsPer-runner informationcoalesce_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1rom390t-571e000f-ggq5 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: filter_kernels Comparing rich-T-kid/coalescer-boolean-filter-words (4d091cd) to 69be95c (merge-base) diff Run configurationrun benchmark filter_kernels
shards: 1
DetailsPer-runner informationfilter_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-1rom390t-571e000f-jrjb Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench filter_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
Closes
Why
Follow-up to #11732 and #11867.
copy_rows_by_filter_frompreviously ran the Boolean filter kernel, producing temporary value and validity buffers. The coalescer immediately copied those buffers into its builders and discarded them. Now that the builders can append packed words, the filter kernel can write straight into the coalescer output.What changed
The Boolean coalescer now uses the existing word-at-a-time compression kernel. Non-null and all-valid sources append values and advance validity lazily. Nullable sources compress values and validity together in one pass over the filter mask.
Empty filter words are skipped before reading the corresponding source words, which avoids touching most of the source for sparse filters. Sliced bitmaps, a filter shorter than the source, and an empty remainder are handled by the same chunked path.
Note on
filter.rsfilter_bits_compressnow emits packed words through a callback instead of owning its output buffer. The regular Boolean filter still collects those words into aBufferthroughcollect_filter_bits_compress, so its strategy selection and result are unchanged. The paired form lets the coalescer compress values and validity with one mask traversal. These helpers remain crate-private.Example
Take this eight-row input:
The null predicate at row 3 is normalized to
false, so rows 1, 2, 4, and 6 are selected. With row 0 in the least-significant bit:The compression kernel produces:
Those four bits are appended directly to the output builders. The result is:
Larger inputs use the same operation on each 64-row chunk, carrying partial words between chunks.
Results
Test coverage
The tests compare the coalescer output with the Boolean filter kernel for nullable, non-null, and all-valid sources. They cover sliced inputs, null predicate entries, word boundaries, carry between words, a filter shorter than the source, an exact multiple of 64, and optimized and unoptimized predicates. A filter longer than the source is checked separately.