public static String buildTriggerActionExpression(ASTNode node) throws SemanticException {
    switch (node.getType()) {
    case HiveParser.KW_KILL:
      return "KILL";
    case HiveParser.KW_MOVE:
      if (node.getChildCount() != 1) {
        throw new SemanticException("Invalid move to clause in trigger action.");
      }
      String poolPath = WMUtils.poolPath(node.getChild(0));
      return "MOVE TO " + poolPath;
    default:
      throw new SemanticException("Unknown token in action clause: " + node.getType());
    }
  }
Common utilities for Trigger related ddl operations.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/trigger/TriggerUtils.java