Kikyou1997 commented on code in PR #18801: URL: https://github.com/apache/doris/pull/18801#discussion_r1171008579
########## fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java: ########## @@ -91,16 +91,52 @@ public StatisticsCache getStatisticsCache() { // Each analyze stmt corresponding to an analysis job. public void createAnalysisJob(AnalyzeStmt analyzeStmt) throws DdlException { + Map<Long, AnalysisTaskInfo> analysisTaskInfos = new HashMap<>(); + AnalysisTaskInfoBuilder taskInfoBuilder = new AnalysisTaskInfoBuilder(); + + long jobId = Env.getCurrentEnv().getNextId(); String catalogName = analyzeStmt.getCatalogName(); String db = analyzeStmt.getDBName(); + TableIf table = analyzeStmt.getTable(); TableName tbl = analyzeStmt.getTblName(); StatisticsUtil.convertTableNameToObjects(tbl); + String tblName = tbl.getTbl(); Set<String> colNames = analyzeStmt.getColumnNames(); - Map<Long, AnalysisTaskInfo> analysisTaskInfos = new HashMap<>(); - long jobId = Env.getCurrentEnv().getNextId(); - createTaskForEachColumns(analyzeStmt, catalogName, db, tbl, colNames, analysisTaskInfos, jobId); - createTaskForMVIdx(analyzeStmt, catalogName, db, tbl, analysisTaskInfos, jobId); - persistAnalysisJob(catalogName, db, tbl, jobId); + int samplePercent = analyzeStmt.getSamplePercent(); + int sampleRows = analyzeStmt.getSampleRows(); + AnalysisType analysisType = analyzeStmt.getAnalysisType(); + + // set common properties Review Comment: I think logic for init a base taskInfoBuilder could be extracted to a method to keep `createAnalysisJob` method clean -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org