Kikyou1997 commented on code in PR #13883: URL: https://github.com/apache/doris/pull/13883#discussion_r1012794906
########## fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java: ########## @@ -5069,4 +5088,53 @@ public int getFollowerCount() { } return count; } + + public AnalysisJobScheduler getAnalysisJobScheduler() { + return analysisJobScheduler; + } + + // TODO: + // 1. handle partition level analysis statement properly + // 2. support sample job + // 3. support period job + public void createAnalysisJob(AnalyzeStmt analyzeStmt) { + String catalogName = analyzeStmt.getCatalogName(); + String db = analyzeStmt.getDBName(); + String tbl = analyzeStmt.getTblName(); + List<String> colNames = analyzeStmt.getOptColumnNames(); + String persistAnalysisJobSQLTemplate = "INSERT INTO " + StatisticConstants.STATISTIC_DB_NAME + "." + + StatisticConstants.ANALYSIS_JOB_TABLE + " VALUES(${jobId}, '${catalogName}', '${dbName}'," + + "'${tblName}','${colName}', '${jobType}', '${analysisType}', '${message}', '${lastExecTimeInMs}'," + + "'${state}', '${scheduleType}')"; + if (colNames != null) { Review Comment: If user didn't specify which columns to be analyzed, `optColumnNames` would be set to all columns of the table in the analysis phase of the stmt -- 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