Skip to content

estimation is zero when there is no buckets #59563

@AilinKid

Description

@AilinKid

Enhancement

Image

from the code here, we can see that when there is no histogram, the estimation should go to branch1, while from the stat loading from below,
column.hist.NDV=31, the column.topN.num()=28, and there is no buckets at all. This is mainly because hist.NDV is calculated from all rows before sampling. The case exists when sampled rows are all in the topN, while the total NDV is greater than sampled rows.

Image

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig/plannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions