private static AlterTableExecuteDesc getFastForwardDesc(TableName tableName, Map<String, String> partitionSpec,
      ASTNode command) throws SemanticException {
    String branchName;
    String targetBranchName;
    ASTNode child1 = (ASTNode) command.getChild(1);
    if (command.getChildCount() == 2) {
      branchName = "main";
      targetBranchName = PlanUtils.stripQuotes(child1.getText());
    } else {
      ASTNode child2 = (ASTNode) command.getChild(2);
      branchName = PlanUtils.stripQuotes(child1.getText());
      targetBranchName = PlanUtils.stripQuotes(child2.getText());
    }

    AlterTableExecuteSpec spec =
        new AlterTableExecuteSpec(FAST_FORWARD, new FastForwardSpec(branchName, targetBranchName));
    return new AlterTableExecuteDesc(tableName, partitionSpec, spec);
  }
Analyzer for ALTER TABLE ... EXECUTE commands.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/execute/AlterTableExecuteAnalyzer.java