public static String getUnescapedName(ASTNode tableOrColumnNode, String currentDatabase) throws SemanticException {
    int tokenType = tableOrColumnNode.getToken().getType();
    if (tokenType == HiveParser.TOK_TABNAME) {
      // table node
      Map.Entry<String,String> dbTablePair = getDbTableNamePair(tableOrColumnNode);
      String tableName = dbTablePair.getValue();
      String tableMetaRef = null;
      if (tableName.contains(".")) {
        String[] tmpNames = tableName.split("\\.");
        tableName = tmpNames[0];
        tableMetaRef = tmpNames[1];
      }
      return TableName.fromString(tableName,
          null,
          dbTablePair.getKey() == null ? currentDatabase : dbTablePair.getKey(),
          tableMetaRef)
          .getNotEmptyDbTable();
    } else if (tokenType == HiveParser.StringLiteral) {
      return unescapeSQLString(tableOrColumnNode.getText());
    }
    // column node
    return unescapeIdentifier(tableOrColumnNode.getText());
  }
Get dequoted name from a table/column node.
@param tableOrColumnNode the table or column node
@return for table node, db.tab or tab. for column node column.
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java