Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](statistics)Fix show auto analyze missing jobs bug. #27761

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ protected SimpleQueue<AnalysisInfo> createSimpleQueue(Collection<AnalysisInfo> c
a -> {
// DO NOTHING
return null;
}, null);
}, collection);
}

// Remove col stats status from TableStats if failed load some col stats after analyze corresponding column so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.doris.statistics.AnalysisInfo.AnalysisType;
import org.apache.doris.statistics.AnalysisInfo.JobType;
import org.apache.doris.statistics.AnalysisInfo.ScheduleType;
import org.apache.doris.statistics.util.SimpleQueue;
import org.apache.doris.statistics.util.StatisticsUtil;

import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -445,4 +446,16 @@ public void testRecordLimit3() {
Assertions.assertEquals(2, analysisManager.autoJobs.size());
}

@Test
public void testCreateSimpleQueue() {
AnalysisManager analysisManager = new AnalysisManager();
ArrayList<AnalysisInfo> jobs = Lists.newArrayList();
jobs.add(new AnalysisInfoBuilder().setJobId(1).build());
jobs.add(new AnalysisInfoBuilder().setJobId(2).build());
SimpleQueue<AnalysisInfo> simpleQueue = analysisManager.createSimpleQueue(jobs, analysisManager);
Assertions.assertEquals(2, simpleQueue.size());
simpleQueue = analysisManager.createSimpleQueue(null, analysisManager);
Assertions.assertEquals(0, simpleQueue.size());
}

}