public static String poolPath(Tree root) {
    StringBuilder builder = new StringBuilder();
    builder.append(BaseSemanticAnalyzer.unescapeIdentifier(root.getText()));
    for (int i = 0; i < root.getChildCount(); ++i) {
      // DOT is not affected
      builder.append(BaseSemanticAnalyzer.unescapeIdentifier(root.getChild(i).getText()));
    }
    return builder.toString();
  }
Common utilities for Workload Management related ddl operations.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/WMUtils.java