public String getEscapedNotEmptyDbTable() {
    return
        db == null || db.trim().isEmpty() ?
            "`" + table + "`" : "`" + db + "`" + DatabaseName.CAT_DB_TABLE_SEPARATOR + "`" + table + "`";
  }
Get the name in `db`.`table` escaped format, if db is not empty, otherwise pass only the table name.
storage-api/src/java/org/apache/hadoop/hive/common/TableName.java