@Override
  public void analyzeInternal(ASTNode root) throws SemanticException {
    String resourcePlanName = unescapeIdentifier(root.getChild(0).getText());

    boolean unsetQueryParallelism = false;
    boolean unsetDefaultPool = false;
    for (int i = 1; i < root.getChildCount(); ++i) {
      Tree child = root.getChild(i);
      switch (child.getType()) {
      case HiveParser.TOK_QUERY_PARALLELISM:
        if (child.getChildCount() != 0) {
          throw new SemanticException("Expected zero argument");
        }

        unsetQueryParallelism = true;
        break;
      case HiveParser.TOK_DEFAULT_POOL:
        if (child.getChildCount() != 0) {
          throw new SemanticException("Expected zero argument");
        }

        unsetDefaultPool = true;
        break;
      default:
        throw new SemanticException(
          "Unexpected token in alter resource plan statement: " + child.getType());
      }
    }

    AlterResourcePlanUnsetDesc desc = new AlterResourcePlanUnsetDesc(resourcePlanName, unsetQueryParallelism,
        unsetDefaultPool);
    Task<DDLWork> task = TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc));
    rootTasks.add(task);

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