apache / apache/datafusion

Allow users to define the cardinality threshold for dictionary reads

Open
#24,113 2 comments 0 reactions 1 assignee Claimed by @Rich-T-kid View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

_No response_

### Describe the solution you'd like

Add a config option to set a cardinality threshold, so columns above it are read as regular strings instead of dictionaries.

for example
```
SET datafusion.parquet.dict_threshold = 0.2 # dataset must have less than 20% unqiue values
```
or
```
SET datafusion.parquet.dict_threshold = 200 # 200 unique values max
```

we can support both but im leaning towards supporting a percentage threshold.

### Describe alternatives you've considered

_No response_

### Additional context

#24111

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.