foxtail463 opened a new pull request, #63764:
URL: https://github.com/apache/doris/pull/63764

   Problem Summary:
   
   For OLAP scans, partition pruning can already reduce the scan row count to 
the selected partitions. However, the original partition predicate is 
intentionally kept in the filter until post-processing so MV rewrite can still 
match the original query predicate.
   
   During CBO stats calculation, this means the filter estimator may apply the 
same partition predicate again on top of the already-pruned scan row count, 
causing row count underestimation. For example, after pruning to one partition, 
`id = 1` may already be reflected in the scan cardinality, but `computeFilter` 
still estimates selectivity for `id = 1`.
   
   This change reuses the recorded `PartitionPrunablePredicate` on OLAP scans 
and skips those already-pruned conjuncts during filter statistics estimation, 
while preserving the existing plan shape and post-processing behavior.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to