@Override
  public void analyzeInternal(ASTNode root) throws SemanticException {
    if (root.getChildCount() == 0) {
      throw new SemanticException("Expected name in DROP RESOURCE PLAN statement");
    }

    String resourcePlanName = unescapeIdentifier(root.getChild(0).getText());
    boolean ifExists = false;

    for (int i = 1; i < root.getChildCount(); ++i) {
      Tree child = root.getChild(i);
      switch (child.getType()) {
      case HiveParser.TOK_IFEXISTS:
        ifExists = true;
        break;
      default:
        throw new SemanticException("Invalid create arguments " + root.toStringTree());
      }
    }

    DropResourcePlanDesc desc = new DropResourcePlanDesc(resourcePlanName, ifExists);
    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc)));

    DDLUtils.addServiceOutput(conf, getOutputs());
  }
Analyzer for drop resource plan commands.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/resourceplan/drop/DropResourcePlanAnalyzer.java