public TSStatus dropCQ(DropCQPlan plan) {
    TSStatus res = new TSStatus();
    String cqId = plan.getCqId();
    Optional<String> md5 = plan.getMd5();
    lock.writeLock().lock();
    try {
      CQEntry cqEntry = cqMap.get(cqId);
      if (cqEntry == null) {
        res.code = TSStatusCode.NO_SUCH_CQ.getStatusCode();
        res.message = String.format(CQ_NOT_EXIST_FORMAT, cqId);
        LOGGER.warn("Drop CQ {} failed, because it doesn't exist.", cqId);
      } else if ((md5.isPresent() && !md5.get().equals(cqEntry.md5))) {
        res.code = TSStatusCode.NO_SUCH_CQ.getStatusCode();
        res.message = String.format(MD5_NOT_MATCH_FORMAT, cqId);
        LOGGER.warn("Drop CQ {} failed, because its MD5 doesn't match.", cqId);
      } else {
        cqMap.remove(cqId);
        res.code = TSStatusCode.SUCCESS_STATUS.getStatusCode();
        LOGGER.info("Drop CQ {} successfully.", cqId);
      }
      return res;
    } finally {
      lock.writeLock().unlock();
    }
  }
Drop the CQ whose ID is same as <tt>cqId</tt> in plan.

@return SUCCESS_STATUS if there is CQ whose ID and md5 is same as <tt>cqId</tt> in plan,
    otherwise NO_SUCH_CQ.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/cq/CQInfo.java