deniskuzZ commented on code in PR #5911: URL: https://github.com/apache/hive/pull/5911#discussion_r2179725017
########## ql/src/java/org/apache/hadoop/hive/ql/parse/ScheduledQueryAnalyzer.java: ########## @@ -74,7 +74,11 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { ScheduledQueryMaintenanceWork work; ScheduledQueryMaintenanceRequestType type = translateAstType(ast.getToken().getType()); ScheduledQuery parsedSchq = interpretAstNode(ast); - ScheduledQuery schq = fillScheduledQuery(type, parsedSchq); + boolean dropIfExists = ast.getToken().getType() == HiveParser.TOK_DROP_SCHEDULED_QUERY && ast.getChildCount() > 1 && ast.getChild(1).getType() == HiveParser.TOK_IFEXISTS; Review Comment: I think, we should create a separate analyzer here, similar to `DropFunctionAnalyzer` ```` @DDLType(types = HiveParser.TOK_DROP_SCHEDULED_QUERY) public class DropScheduledQueryAnalyzer extends AbstractFunctionAnalyzer { ... public void analyzeInternal(ASTNode root) throws SemanticException { .... boolean ifExists = (ast.getFirstChildWithType(HiveParser.TOK_IFEXISTS) != null); boolean throwException = !ifExists && !HiveConf.getBoolVar(conf, ConfVars.DROP_IGNORES_NON_EXISTENT); ... } ```` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org