morrySnow commented on code in PR #44755:
URL: https://github.com/apache/doris/pull/44755#discussion_r1879462882
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -772,39 +772,25 @@ public LogicalPlan
visitCreateScheduledJob(DorisParser.CreateScheduledJobContext
@Override
public LogicalPlan visitPauseJob(DorisParser.PauseJobContext ctx) {
- Expression wildWhere = null;
- if (ctx.wildWhere() != null) {
- wildWhere = getWildWhere(ctx.wildWhere());
- }
- return new PauseJobCommand(wildWhere);
+ return new PauseJobCommand(stripQuotes(ctx.jobNameValue.getText()));
Review Comment:
so we do not check jobNameKey?
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -772,39 +772,25 @@ public LogicalPlan
visitCreateScheduledJob(DorisParser.CreateScheduledJobContext
@Override
public LogicalPlan visitPauseJob(DorisParser.PauseJobContext ctx) {
- Expression wildWhere = null;
- if (ctx.wildWhere() != null) {
- wildWhere = getWildWhere(ctx.wildWhere());
- }
- return new PauseJobCommand(wildWhere);
+ return new PauseJobCommand(stripQuotes(ctx.jobNameValue.getText()));
}
@Override
public LogicalPlan visitDropJob(DorisParser.DropJobContext ctx) {
- Expression wildWhere = null;
- if (ctx.wildWhere() != null) {
- wildWhere = getWildWhere(ctx.wildWhere());
- }
boolean ifExists = ctx.EXISTS() != null;
- return new DropJobCommand(wildWhere, ifExists);
+ return new DropJobCommand(stripQuotes(ctx.jobNameValue.getText()),
ifExists);
}
@Override
public LogicalPlan visitResumeJob(DorisParser.ResumeJobContext ctx) {
- Expression wildWhere = null;
- if (ctx.wildWhere() != null) {
- wildWhere = getWildWhere(ctx.wildWhere());
- }
- return new ResumeJobCommand(wildWhere);
+ return new ResumeJobCommand(stripQuotes(ctx.jobNameValue.getText()));
}
@Override
public LogicalPlan visitCancelJobTask(DorisParser.CancelJobTaskContext
ctx) {
- Expression wildWhere = null;
- if (ctx.wildWhere() != null) {
- wildWhere = getWildWhere(ctx.wildWhere());
- }
- return new CancelJobTaskCommand(wildWhere);
+ String jobName = stripQuotes(ctx.jobNameValue.getText());
+ Long taskId = Long.valueOf(ctx.taskIdValue.getText());
Review Comment:
what will happen if sql like `cancel task where task_id = '123' and job_name
= 123`?
--
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]