Skip to content

Commit

Permalink
branch-3.0: [fix](statistics)Fix skip analyze empty table case. #45441 (
Browse files Browse the repository at this point in the history
#45450)

Cherry-picked from #45441

Co-authored-by: James <[email protected]>
  • Loading branch information
github-actions[bot] and Jibing-Li authored Dec 16, 2024
1 parent 1ba9b85 commit ca212e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ protected void processOneJob(TableIf table, Set<Pair<String, String>> columns,
columns = columns.stream().filter(
c -> StatisticsUtil.needAnalyzeColumn(table, c) || StatisticsUtil.isLongTimeColumn(table, c))
.collect(Collectors.toSet());
if (columns.isEmpty()) {
return;
}
AnalysisInfo analyzeJob = createAnalyzeJobForTbl(table, columns, priority);
if (analyzeJob == null) {
return;
Expand Down
8 changes: 4 additions & 4 deletions regression-test/suites/statistics/test_analyze_mv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,11 @@ suite("test_analyze_mv") {
empty_test = sql """show column stats mvTestDup"""
for (int i = 0; i < 100; i++) {
empty_test = sql """show column stats mvTestDup"""
if (empty_test.size() != 0) {
logger.info("async delete is not finished yet.")
Thread.sleep(1000)
if (empty_test.size() == 0) {
break
}
break
logger.info("async delete stats is not finished yet.")
Thread.sleep(2000)
}
assertEquals(0, empty_test.size())
// ** End of embedded test
Expand Down

0 comments on commit ca212e9

Please sign in to comment.