deniskuzZ commented on code in PR #5911:
URL: https://github.com/apache/hive/pull/5911#discussion_r2179750066


##########
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;
+    ScheduledQuery schq = fillScheduledQuery(type, parsedSchq, !dropIfExists);
+    if (schq == null) {

Review Comment:
   ````
   if (schq == null) {
     if (throwException) {
       throw new 
SemanticException(ErrorMsg.INVALID_SCHEDULED_QUERY.getMsg(functionName));
     } else {
       return; // Fail silently
     }
   ````



-- 
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

Reply via email to