public static HivePrivilegeObjectType getPrivObjectType(PrivilegeObjectDesc privSubjectDesc) {
    if (privSubjectDesc.getObject() == null) {
      return null;
    }
    return privSubjectDesc.getTable() ? HivePrivilegeObjectType.TABLE_OR_VIEW :
        HivePrivilegeObjectType.DATABASE;
  }
Convert thrift object type to hive authorization plugin object type
@param type - thrift object type
@return
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java