prestodb/presto · error · IllegalStateException
Table %s cannot be gone because tables are statically define
Error message
Table %s cannot be gone because tables are statically defined
What it means
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.
Source
Thrown at presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java:192
requireNonNull(prefix, "prefix is null");
ImmutableMap.Builder<SchemaTableName, List<ColumnMetadata>> columns = ImmutableMap.builder();
List<SchemaTableName> tableNames;
if (prefix.getTableName() == null) {
tableNames = listTables(session, prefix.getSchemaName());
}
else {
tableNames = ImmutableList.of(new SchemaTableName(prefix.getSchemaName(), prefix.getTableName()));
}
for (SchemaTableName tableName : tableNames) {
try {
columns.put(tableName, getTableMetadata(session, tableName).getColumns());
}
catch (TableNotFoundException e) {
// Normally it would mean the table disappeared during listing operation
throw new IllegalStateException(format("Table %s cannot be gone because tables are statically defined", tableName), e);
}
}
return columns.build();
}
@Override
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
{
convertTableHandle(tableHandle);
return convertColumnHandle(columnHandle).getColumnMetadata();
}
@Override
public ConnectorTableLayoutResult getTableLayoutForConstraint(
ConnectorSession session,
ConnectorTableHandle table,
Constraint<ColumnHandle> constraint,
Optional<Set<ColumnHandle>> desiredColumns)View on GitHub (pinned to 55bb57d202)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java:192 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/f376d26350ddf1b0.
Report an issue: GitHub.