Describe the bug
#21081 capped the NDV at the row count in statistics computation for several operations, including filters. In the filter case, there's some additional work to ensure column stats are consistent after applying a filter:
- Null count should also be capped at the row count
byte_size should be scaled down by the filter selectivity
Furthermore, we can detect when a predicate is NULL-rejecting; for null-rejecting predicates like a = 10, we can set the null_count to 0.
To Reproduce
No response
Expected behavior
No response
Additional context
No response
Describe the bug
#21081 capped the NDV at the row count in statistics computation for several operations, including filters. In the filter case, there's some additional work to ensure column stats are consistent after applying a filter:
byte_sizeshould be scaled down by the filter selectivityFurthermore, we can detect when a predicate is NULL-rejecting; for null-rejecting predicates like
a = 10, we can set thenull_countto 0.To Reproduce
No response
Expected behavior
No response
Additional context
No response