prestodb/presto · error · PrestoException
ALREADY_EXISTS
ALREADY_EXISTS
Error message
Role name cannot be one of the reserved roles:
What it means
Fired during role DDL in the Hive connector when the role name supplied in CREATE ROLE (or analogous statement) collides with a reserved role name. The connector enforces this before forwarding the operation to the metastore, appending the offending name to the message.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:3374
private List<ColumnStatisticMetadata> getColumnStatisticMetadataForTemporaryTable(ColumnMetadata columnMetadata)
{
return getColumnStatisticMetadata(columnMetadata.getName(), getSupportedColumnStatisticsForTemporaryTable(columnMetadata.getType()));
}
private List<ColumnStatisticMetadata> getColumnStatisticMetadata(String columnName, Set<ColumnStatisticType> statisticTypes)
{
return statisticTypes.stream()
.map(type -> type.getColumnStatisticMetadata(columnName))
.collect(toImmutableList());
}
@Override
public void createRole(ConnectorSession session, String role, Optional<PrestoPrincipal> grantor)
{
// roles are case insensitive in Hive
if (RESERVED_ROLES.contains(role)) {
throw new PrestoException(ALREADY_EXISTS, "Role name cannot be one of the reserved roles: " + RESERVED_ROLES);
}
metastore.createRole(getMetastoreContext(session), role, null);
}
@Override
public void dropRole(ConnectorSession session, String role)
{
// roles are case insensitive in Hive
metastore.dropRole(getMetastoreContext(session), role);
}
@Override
public Set<String> listRoles(ConnectorSession session)
{
return ImmutableSet.copyOf(metastore.listRoles(getMetastoreContext(session)));
}
@OverrideView on GitHub (pinned to 55bb57d202)
Solutions
- Choose a non-reserved role name
- Review the reserved-role list in the connector docs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:3374 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/92ac3ccf9394d01c.
Report an issue: GitHub.