Skip to content
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 @@ -65,7 +65,7 @@ public OlapAnalysisTask(AnalysisInfo info) {

public void doExecute() throws Exception {
// For empty table, write empty result directly, no need to run SQL to collect stats.
if (info.rowCount == 0) {
if (info.rowCount == 0 && tableSample != null) {
StatsId statsId = new StatsId(concatColumnStatsId(), info.catalogId, info.dbId,
info.tblId, info.indexId, info.colName, null);
job.appendBuf(this, Collections.singletonList(new ColStatsData(statsId)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ protected void runQuery(String sql) {}
.setAnalysisType(AnalysisType.FUNDAMENTALS)
.setJobColumns(colList)
.setState(AnalysisState.RUNNING)
.setRowCount(10)
.build();
new OlapAnalysisTask(analysisJobInfo).doExecute();
new Expectations() {
Expand Down