Skip to content

branch-4.2: [fix](statistics) full analyze not collect hot value by default #63625 - #68298

Merged
yiguolei merged 1 commit into
apache:branch-4.2from
yujun777:fix-statistics-full-analyze-hot-value-4.2
Sep 21, 2026
Merged

yiguolei merged 1 commit into
apache:branch-4.2from
yujun777:fix-statistics-full-analyze-hot-value-4.2

Conversation

@yujun777

Copy link
Copy Markdown
Contributor

cherry-pick: #63625

Conflicts are limited to FE test files, because branch-4.2 statistics tests still use JMockit while master has moved to Mockito, and TableNameInfo/PartitionNamesInfo live in org.apache.doris.info on branch-4.2. The test additions were re-expressed in the branch-4.2 idiom; main-source changes are identical to #63625.

testDoSampleAlwaysCollectsHotValue also stubs getSampleCollectInfo(..) with a SampleCollectInfo instead of useLinearAnalyzeTemplate(), since branch-4.2 doSample picks the template through the sample-algorithm decision, and AnalysisManagerTest now uses the 4-arg mockAnalyzeCommand(..) helper so the Paimon row-count case keeps a non-null AnalyzeProperties.

FE UT: AnalyzeTableCommandTest, OlapAnalysisTaskTest, AnalysisManagerTest, HMSAnalysisTaskTest, StatisticsUtilTest

…he#63625)

apache#62435 let full analyze always collect hot value, but excute may exceed
statistics sql memory limit (default 2GB) for big table.

Keep sample analyze hot value collection unchanged while making manual
full analyze require explicit WITH HOT VALUE. Auto full analyze
continues to skip hot values, and auto sample still collects them, no
change behaviour.

usage:

```sql
analyze table t with sync with hot value
```

Tests:
- FE UT: AnalyzeTableCommandTest, OlapAnalysisTaskTest,
AnalysisManagerTest
- Regression: test_hot_value, test_full_analyze_hot_value

Docs PR: apache/doris-website#3769
@yujun777
yujun777 requested a review from yiguolei as a code owner September 21, 2026 02:45
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@yujun777

Copy link
Copy Markdown
Contributor Author

run buildall

@yiguolei
yiguolei merged commit d8e8897 into apache:branch-4.2 Sep 21, 2026
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants