yujun777 opened a new pull request, #62435: URL: https://github.com/apache/doris/pull/62435
### What problem does this PR solve? Issue Number: close #xxx Problem Summary: Previously, full statistics collection (`ANALYZE TABLE ... WITH SYNC`) hardcoded `null as hot_value` in `FULL_ANALYZE_TEMPLATE`, meaning hot values (frequent values) were only collected during sample-based analysis. This made full analysis produce less complete statistics than sample analysis. This change rewrites `FULL_ANALYZE_TEMPLATE` to use a CTE-based structure (matching `LINEAR_ANALYZE_TEMPLATE` and `DUJ1_ANALYZE_TEMPLATE` patterns) that computes hot values via GROUP BY + TOP-N aggregation. Both `OlapAnalysisTask` and `ExternalAnalysisTask` are updated to pass the required parameters (`hotValueCollectCount`, `subStringColName`, `rowCount2`) to the template. ### Release note Full statistics collection now also collects hot value (frequent value) information, matching the behavior of sample-based collection. ### Check List (For Author) - Test: Regression test (test_hot_value, test_full_analyze_hot_value) / Unit Test (OlapAnalysisTaskTest, HMSAnalysisTaskTest) - Behavior changed: Yes - full analyze now produces hot_value instead of null - Does this need documentation: No -- 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]
