[Chore](docs)Fix job error docs (#28127)

This commit is contained in:
Calvin Kirs
2023-12-08 10:24:21 +08:00
committed by GitHub
parent 0947bf4e97
commit cd108688c1
7 changed files with 41 additions and 31 deletions

View File

@ -201,9 +201,13 @@ public class CreateJobStmt extends DdlStmt {
doStmt.analyze(analyzer);
}
/**
* parse execute sql from create job stmt
* Some stmt not implement toSql method,so we need to parse sql from originStmt
*/
private String parseExecuteSql(String sql) throws AnalysisException {
sql = sql.toLowerCase();
int executeSqlIndex = sql.indexOf(" do ");
String lowerCaseSql = sql.toLowerCase();
int executeSqlIndex = lowerCaseSql.indexOf(" do ");
String executeSql = sql.substring(executeSqlIndex + 4).trim();
if (StringUtils.isBlank(executeSql)) {
throw new AnalysisException("execute sql has invalid format");