prestodb/presto · error · PrestoException

PERMISSION_DENIED

PERMISSION_DENIED

Error message

DROP TABLE is disabled in this Cassandra catalog

What it means

Raised by dropTable in the Cassandra connector when the connector-level allowDropTable safety flag is false. It is a deliberate permission guard, not a data problem: the catalog was configured to forbid destructive DDL, so any DROP TABLE against it is rejected with PERMISSION_DENIED.

Source

Thrown at presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java:261

    {
        return toStringHelper(this)
                .add("connectorId", connectorId)
                .toString();
    }

    @Override
    public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
    {
        createTable(session, tableMetadata);
    }

    @Override
    public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
    {
        checkArgument(tableHandle instanceof CassandraTableHandle, "tableHandle is not an instance of CassandraTableHandle");

        if (!allowDropTable) {
            throw new PrestoException(PERMISSION_DENIED, "DROP TABLE is disabled in this Cassandra catalog");
        }

        CassandraTableHandle cassandraTableHandle = (CassandraTableHandle) tableHandle;
        if (cassandraSession.isMaterializedView(cassandraTableHandle.getSchemaTableName())) {
            throw new PrestoException(NOT_SUPPORTED, "Dropping materialized views not yet supported");
        }

        cassandraSession.execute(String.format("DROP TABLE \"%s\".\"%s\"", cassandraTableHandle.getSchemaName(), cassandraTableHandle.getTableName()));

        // Refresh metadata after DROP to ensure schema cache is updated in Driver 4.x
        cassandraSession.refreshSchema();
    }

    @Override
    public void renameTable(ConnectorSession session, ConnectorTableHandle tableHandle, SchemaTableName newTableName)
    {
        throw new PrestoException(NOT_SUPPORTED, "Renaming tables not yet supported for Cassandra");
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Enable allow-drop-table in the catalog configuration if drops are intended
  2. Drop the table directly in Cassandra with CQL
  3. Use a catalog configured for DDL if multiple catalogs exist
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java:261 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/b62ac421c8cb1122. Report an issue: GitHub.