{"record":{"id":"f376d26350ddf1b0","repo":"prestodb/presto","slug":"table-s-cannot-be-gone-because-tables-are-statica","errorCode":null,"errorMessage":"Table %s cannot be gone because tables are statically defined","messagePattern":"Table (.+?) cannot be gone because tables are statically defined","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java","lineNumber":192,"sourceCode":"        requireNonNull(prefix, \"prefix is null\");\n\n        ImmutableMap.Builder<SchemaTableName, List<ColumnMetadata>> columns = ImmutableMap.builder();\n\n        List<SchemaTableName> tableNames;\n        if (prefix.getTableName() == null) {\n            tableNames = listTables(session, prefix.getSchemaName());\n        }\n        else {\n            tableNames = ImmutableList.of(new SchemaTableName(prefix.getSchemaName(), prefix.getTableName()));\n        }\n\n        for (SchemaTableName tableName : tableNames) {\n            try {\n                columns.put(tableName, getTableMetadata(session, tableName).getColumns());\n            }\n            catch (TableNotFoundException e) {\n                // Normally it would mean the table disappeared during listing operation\n                throw new IllegalStateException(format(\"Table %s cannot be gone because tables are statically defined\", tableName), e);\n            }\n        }\n        return columns.build();\n    }\n\n    @Override\n    public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)\n    {\n        convertTableHandle(tableHandle);\n        return convertColumnHandle(columnHandle).getColumnMetadata();\n    }\n\n    @Override\n    public ConnectorTableLayoutResult getTableLayoutForConstraint(\n            ConnectorSession session,\n            ConnectorTableHandle table,\n            Constraint<ColumnHandle> constraint,\n            Optional<Set<ColumnHandle>> desiredColumns)","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java#L174-L210","documentation":"listTableColumns in KafkaMetadata iterates table names obtained from listTables and calls getTableMetadata for each; the Kafka connector defines its tables statically via configuration, so a listed table can never disappear between listing and metadata lookup. This IllegalStateException is a defensive assertion guarding an internally inconsistent state rather than a user-triggerable condition.","triggerScenarios":"Thrown at presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java:192 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat occurrence as an internal bug: verify the Kafka table description configuration is loaded consistently","Check that the table_properties configuration source did not change concurrently","Report the inconsistency if it appears; it should be impossible with static table definitions"],"exampleFix":null,"handlingStrategy":"try-catch","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"}