Skip to content

EPIC: Making use of NDVs (number of distinct values) in DataFusion #20766

@jonathanc-n

Description

@jonathanc-n

Is your feature request related to a problem or challenge?

In #15265 brings up that we do not really use NDVs or distinct_count anywhere in the code. However, it will become more practical after #19957 is merged.

An optimization that uses distinct_count can be shown here: #20731

Where NDV is currently used:

  • estimate_inner_join_cardinality uses the same approach as spark's catalyst optimizer (code)

Describe the solution you'd like

I looked into Trino/Spark and added a list of optimizations that can be made with this statistic:

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions