{"record":{"id":"92ac3ccf9394d01c","repo":"prestodb/presto","slug":"already-exists-92ac3c","errorCode":"ALREADY_EXISTS","errorMessage":"Role name cannot be one of the reserved roles: ","messagePattern":"Role name cannot be one of the reserved roles: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java","lineNumber":3374,"sourceCode":"\n    private List<ColumnStatisticMetadata> getColumnStatisticMetadataForTemporaryTable(ColumnMetadata columnMetadata)\n    {\n        return getColumnStatisticMetadata(columnMetadata.getName(), getSupportedColumnStatisticsForTemporaryTable(columnMetadata.getType()));\n    }\n\n    private List<ColumnStatisticMetadata> getColumnStatisticMetadata(String columnName, Set<ColumnStatisticType> statisticTypes)\n    {\n        return statisticTypes.stream()\n                .map(type -> type.getColumnStatisticMetadata(columnName))\n                .collect(toImmutableList());\n    }\n\n    @Override\n    public void createRole(ConnectorSession session, String role, Optional<PrestoPrincipal> grantor)\n    {\n        // roles are case insensitive in Hive\n        if (RESERVED_ROLES.contains(role)) {\n            throw new PrestoException(ALREADY_EXISTS, \"Role name cannot be one of the reserved roles: \" + RESERVED_ROLES);\n        }\n        metastore.createRole(getMetastoreContext(session), role, null);\n    }\n\n    @Override\n    public void dropRole(ConnectorSession session, String role)\n    {\n        // roles are case insensitive in Hive\n        metastore.dropRole(getMetastoreContext(session), role);\n    }\n\n    @Override\n    public Set<String> listRoles(ConnectorSession session)\n    {\n        return ImmutableSet.copyOf(metastore.listRoles(getMetastoreContext(session)));\n    }\n\n    @Override","sourceCodeStart":3356,"sourceCodeEnd":3392,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java#L3356-L3392","documentation":"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.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:3374 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a non-reserved role name","Review the reserved-role list in the connector docs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}