Skip to content

Add RowCount stat to zone maps for more precise pruning #7187

@xiaoxuandev

Description

@xiaoxuandev

Zone maps currently lack a RowCount stat. This limits certain pruning strategies
that need to compare a count against the total number of rows in a zone.

For example, to falsify is_not_null(x) the ideal condition is:

null_count == row_count => is_not_null is all false

Without RowCount, we have to fall back to is_constant && null_count > 0, which
only catches the subset of cases where the zone is constant.

Adding RowCount would enable more precise pruning for is_not_null and potentially
other expressions that need to reason about total row counts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions