apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.84k stars 3.12k forks source link

[fix](nereids) derive column stats for 'expr and A is not null' #37235

Closed englefly closed 1 day ago

englefly commented 2 days ago

Proposed changes

the algorithm for computing stats for "expr1 and expr2" predicate is as following:

  1. compute output stats of expr1 based on input stats. the result stats is denoted by leftStats
  2. compute stats of expr2 based on leftStats after step1, leftStats should be normalized to avoid abnormal cases, such as ndv > rowCount or numNulls > rowCount

Issue Number: close #xxx

englefly commented 2 days ago

run buildall

englefly commented 2 days ago

run buildall

github-actions[bot] commented 1 day ago

PR approved by at least one committer and no changes requested.

github-actions[bot] commented 1 day ago

PR approved by anyone and no changes requested.