VGalaxies commented on code in PR #14386:
URL: https://github.com/apache/iotdb/pull/14386#discussion_r1903761523
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/task/PipeTaskCoordinator.java:
##########
@@ -130,6 +132,17 @@ public TSStatus createPipe(TCreatePipeReq req) {
/** Caller should ensure that the method is called in the lock {@link
#lock()}. */
public TSStatus alterPipe(TAlterPipeReq req) {
+ final String pipeName = req.getPipeName();
+ final boolean isSetIfExistsCondition =
+ req.isSetIfExistsCondition() && req.isIfExistsCondition();
+ if (!pipeTaskInfo.isPipeExisted(pipeName, req.isTableModel)) {
+ return isSetIfExistsCondition
+ ? RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)
+ : RpcUtils.getStatus(
+ TSStatusCode.PIPE_NOT_EXIST_ERROR,
+ String.format(
+ "Failed to alter pipe %s. Failures: %s does not exist.",
pipeName, pipeName));
Review Comment:
Here are some design considerations: the procedure does not consider
checking the SQL dialect internally; the actual check occurs before submitting
the procedure.
--
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]