presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/PrincipalPrivileges.java/PrincipalPrivileges/fromHivePrivilegeInfos
class PrincipalPrivileges:    public static PrincipalPrivileges fromHivePrivilegeInfos(Set<HivePrivilegeInfo> hivePrivileges)
    {
        Multimap<String, HivePrivilegeInfo> userPrivileges = hivePrivileges
                .stream()
                .filter(privilege -> privilege.getGrantee().getType() == USER)
                .collect(toImmutableListMultimap(privilege -> privilege.getGrantee().getName(), identity()));

        Multimap<String, HivePrivilegeInfo> rolePrivileges = hivePrivileges
                .stream()
                .filter(privilege -> privilege.getGrantee().getType() == ROLE)
                .collect(toImmutableListMultimap(privilege -> privilege.getGrantee().getName(), identity()));
        return new PrincipalPrivileges(userPrivileges, rolePrivileges);
    }