private int compareNames(final T table, final String dbName, final String tableName) {
      int cmp = getDbName(table).compareTo(dbName);
      if (cmp == 0 && tableName != null) {
        cmp = getTableName(table).compareTo(tableName);
      }
      return cmp;
    }
Compares a table to names.
@param table the table
@param dbName the argument database name
@param dbName the argument table name
@return &lt; 0, 0, &gt; 0
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HivePrivilegeObjectUtils.java