public static String buildTriggerExpression(ASTNode node) throws SemanticException {
    if (node.getType() != HiveParser.TOK_TRIGGER_EXPRESSION || node.getChildCount() == 0) {
      throw new SemanticException("Invalid trigger expression.");
    }

    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < node.getChildCount(); ++i) {
      builder.append(node.getChild(i).getText()); // Don't strip quotes.
      builder.append(' ');
    }
    builder.deleteCharAt(builder.length() - 1);
    return builder.toString();
  }
Common utilities for Trigger related ddl operations.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/trigger/TriggerUtils.java