lance-format / lance-format/lance
Don't use dictionary encoding if _true_ cardinality ends up being too high
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
We use hyper log log to decide if we should attempt dictionary encoding or not. However, HLL is just an estimate. In some cases it might be wildly incorrect.
In these cases, as we perform the dictionary encoding, we will discover the true cardinality. Currently, we just proceed with dictionary encoding even if the true cardinality is high. We should instead abandon the dictionary (discard it as wasted effort) and go back to regular encoding.
This can be specific to 2.1+.
Contributor guide
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
No file or test is named. Start by locating the HyperLogLog cardinality check and dictionary-encoding path, then trace where true cardinality becomes available during encoding. Done means a high true cardinality discards the dictionary and falls back to regular encoding for version 2.1+.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100