Repository navigation
bench: cover dictionary hash cache workloads - #27246
Closed
Rich-T-kid wants to merge 1 commit into
Closed
Rich-T-kid wants to merge 1 commit into
Rich-T-kid wants to merge 1 commit into
Conversation
Rich-T-kid
force-pushed
the
rich-T-kid/dictionary-group-values-cache-benchmarks
branch
from
November 8, 2026 18:30
289a4b0 to
4c510c0
Compare
Rich-T-kid
marked this pull request as ready for review
November 8, 2026 19:19
Contributor
Author
|
cc @jayzhan211 🙇 |
|
Benchmark for this request failed before finishing (Kubernetes reason: Benchmarks requested: Runner log (last 40 lines)Kubernetes messageFile an issue against this benchmark runner |
|
Benchmark for this request failed before finishing (Kubernetes reason: Benchmarks requested: Runner log (last 40 lines)Kubernetes messageFile an issue against this benchmark runner |
|
Benchmark for this request failed before finishing (Kubernetes reason: Benchmarks requested: Runner log (last 40 lines)Kubernetes messageFile an issue against this benchmark runner |
Rich-T-kid
marked this pull request as draft
November 12, 2026 15:54
Surajsuthar
pushed a commit
to Surajsuthar/datafusion
that referenced
this pull request
Nov 14, 2026
…6826) ## Which issue does this PR close? Closes apache#26812. ## Rationale for this change Dictionary batches often share one values array while only their keys change. Partial aggregation was rehashing the same dictionary values for every batch. ## What changes are included in this PR? The non-streaming group table now caches dictionary value hashes while the values `Arc` is unchanged. A single dictionary group key can also map known keys directly to group indices. ```text Dictionary batch | v single dictionary column + complete cached mapping? | yes | no v v keys -> cached group IDs per-column hashing | | eligible dictionary fallback | | cached value hashes hash column | | scatter through keys -----+ | v hash/equality group lookup ``` New keys, changed or oversized dictionaries, and partial emission use the normal fallback. Multi-column hashing keeps the same semantics as `create_hashes`. The benchmark fixtures are split into apache#27246. ## What is the testing strategy for this PR? Unit tests cover cached and uncached hash consistency, unseen keys, changed dictionaries, null groups, partial emission, and forced collisions. Hosted cases from apache#27246 show [alternating dictionary-only](apache#26826 (comment)) 1.30× faster; [alternating dictionary + Int32](apache#26826 (comment)) and [fresh dictionaries](apache#26826 (comment)) flat; and [shared dictionary + Int32](apache#26826 (comment)) 1.14× faster at 32K values and 1.28× at 100K. Exact-head hosted suites with RLE dictionary reads enabled on both sides: - [TPC-H](apache#27249 (comment)): 796.01 → 799.79 ms (0.5% higher). - [TPC-DS](apache#27249 (comment)): 9.02 → 8.88 s (1.6% lower). - [ClickBench](apache#27249 (comment)): 38.26 → 38.16 s (0.3% lower). ## Are there any user-facing changes? No. --------- Co-authored-by: Jay Zhan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Follow-up to #26826.
Rationale for this change
Adds the benchmark cases requested in this review thread. They are kept separate so the runtime change in #26826 stays focused.
What changes are included in this PR?
Extends
dictionary_group_valueswith cases that cover:Int32group keyThe existing cases are unchanged. There are no runtime code changes.
What is the testing strategy for this PR?
Each new benchmark runs in Criterion test mode.
Are there any user-facing changes?
No.