foxtail463 opened a new pull request, #64032: URL: https://github.com/apache/doris/pull/64032
Problem Summary: Scan partition pruning state was not consistently represented across OLAP and external file scans. As a result, CBO row-count estimation needed scattered special handling and could not reliably use the selected partitions produced by pruning. In addition, partition predicates that had already been applied during partition pruning could still be applied again by filter estimation, causing duplicated selectivity estimation. HMS selected-partition row-count estimation also had unclear handling for valid zero-row results versus unknown row count. Solution: Introduce a unified partition selection state carried by scan plans, including selected partitions, prune status, manual partition constraints, and partition conjuncts already applied to row-count estimation. Use selected partitions to estimate scan row count for both OLAP and external file scans. Preserve applied partition conjuncts in Statistics so FilterEstimation can skip predicates that have already affected row count. Also clarify HMS selected-partition row-count handling so zero-row results are treated as valid instead of unknown. -- 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]
