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


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ScheduledQueryAnalyzer.java:
##########
@@ -74,7 +76,16 @@ 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 throwException = true;
+    if (type == ScheduledQueryMaintenanceRequestType.DROP) {
+      boolean ifExists = ast.getFirstChildWithType(HiveParser.TOK_IFEXISTS) != 
null;
+      throwException = !ifExists && !HiveConf.getBoolVar(conf, 
ConfVars.DROP_IGNORES_NON_EXISTENT);
+    }
+    ScheduledQuery schq = fillScheduledQuery(type, parsedSchq, throwException);
+    if (schq == null) {
+      LOG.error("Unable to find Scheduled query " + 
parsedSchq.getScheduleKey().getScheduleName());

Review Comment:
   LOG.warn



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to