Skip to content

feat: extend single ndv optimization to non-numeric types for equality predicates #21473

Open
buraksenn wants to merge 4 commits intoapache:mainfrom
buraksenn:extend-single-ndv-optimization
Open

feat: extend single ndv optimization to non-numeric types for equality predicates #21473
buraksenn wants to merge 4 commits intoapache:mainfrom
buraksenn:extend-single-ndv-optimization

Conversation

@buraksenn
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

In the case of equality we can say ndv is 1 for non-numeric types as well. Please check issues for detailed explanations

What changes are included in this PR?

Adding a type-agnostic pattern-matching layer that inspects the predicate tree for col = literal shapes and sets NDV=Exact(1) regardless of column type

Are these changes tested?

Yes existing and additional unit tests.

Are there any user-facing changes?

No

@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Extend single-value NDV optimization to string types

1 participant