Support automatically enable the consecutive cache of HashMap for HashAgg
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Enhancement
Consecutive cache of HashMap: check code: https://github.com/pingcap/tiflash/blob/93d739565b3ed14767e069c7a5453e283d239854/dbms/src/Common/ColumnsHashingImpl.h#L212
It's useful when consecutive same key inserting into HashMap, because the cache avoid search HashMap.
But if NDV is big(a.k.a. all keys are different), the consecutive cache is useless and there will be extra copy of key.
So we should detect the NDV automatically and decide whether to use consecutive cache by the workload.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with dbms/src/Common/ColumnsHashingImpl.h around line 212 and trace how HashAgg uses the consecutive HashMap cache. Compare workloads with repeated keys and high NDV, then define and validate automatic selection so caching helps repeated keys without unnecessary key copies when keys are mostly distinct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100