morrySnow commented on code in PR #44755:
URL: https://github.com/apache/doris/pull/44755#discussion_r1924760996


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -864,41 +864,38 @@ public LogicalPlan 
visitCreateScheduledJob(DorisParser.CreateScheduledJobContext
         return new CreateJobCommand(createJobInfo);
     }
 
+    private void checkJobNameKey(String key, String keyFormat, 
DorisParser.SupportedJobStatementContext parseContext) {
+        if (key.isEmpty() || !key.equalsIgnoreCase(keyFormat)) {
+            throw new ParseException(keyFormat + " should be: '" + keyFormat + 
"'", parseContext);
+        }
+    }
+
     @Override
     public LogicalPlan visitPauseJob(DorisParser.PauseJobContext ctx) {
-        Expression wildWhere = null;
-        if (ctx.wildWhere() != null) {
-            wildWhere = getWildWhere(ctx.wildWhere());
-        }
-        return new PauseJobCommand(wildWhere);
+        checkJobNameKey(stripQuotes(ctx.jobNameKey.getText()), "jobName", ctx);

Review Comment:
   not use magic word, let `"jobName"` be a static variable.
   ```suggestion
           private static String JOB_NAME = "jobName";
           ...
           checkJobNameKey(stripQuotes(ctx.jobNameKey.getText()), JOB_NAME, 
ctx);
   ```



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

Reply via email to