{"record":{"id":"1647429ed756d185","repo":"prestodb/presto","slug":"not-found-164742","errorCode":"NOT_FOUND","errorMessage":"Table '%s' not found","messagePattern":"Table '(.+?)' not found","errorType":"exception","errorClass":"TableNotFoundException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloMetadata.java","lineNumber":287,"sourceCode":"        ConnectorTableLayout layout = new ConnectorTableLayout(new AccumuloTableLayoutHandle(tableHandle, constraint.getSummary()));\n        return new ConnectorTableLayoutResult(layout, constraint.getSummary());\n    }\n\n    @Override\n    public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)\n    {\n        return new ConnectorTableLayout(handle);\n    }\n\n    @Override\n    public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)\n    {\n        AccumuloTableHandle handle = (AccumuloTableHandle) table;\n        checkArgument(handle.getConnectorId().equals(connectorId), \"table is not for this connector\");\n        SchemaTableName tableName = new SchemaTableName(handle.getSchema(), handle.getTable());\n        ConnectorTableMetadata metadata = getTableMetadata(session, tableName);\n        if (metadata == null) {\n            throw new TableNotFoundException(tableName);\n        }\n        return metadata;\n    }\n\n    @Override\n    public Map<String, ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)\n    {\n        AccumuloTableHandle handle = (AccumuloTableHandle) tableHandle;\n        checkArgument(handle.getConnectorId().equals(connectorId), \"tableHandle is not for this connector\");\n\n        AccumuloTable table = client.getTable(handle.toSchemaTableName());\n        if (table == null) {\n            throw new TableNotFoundException(handle.toSchemaTableName());\n        }\n\n        ImmutableMap.Builder<String, ColumnHandle> columnHandles = ImmutableMap.builder();\n        for (AccumuloColumnHandle column : table.getColumns()) {\n            columnHandles.put(column.getName(), column);","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloMetadata.java#L269-L305","documentation":"Thrown by AccumuloMetadata.getTableMetadata when a ConnectorTableHandle resolves to a table that does not exist in the Accumulo metadata client. Presto's connector SPI requires NOT_FOUND errors to be signaled via TableNotFoundException so the engine surfaces 'Table not found' to the query planner.","triggerScenarios":"Calling getTableMetadata (via metadata/tableMetadata SPI paths) with an AccumuloTableHandle whose schema/table no longer exists in Accumulo, or was never created by this connector.","commonSituations":"Table dropped externally in Accumulo while Presto cached or planned against it; typo in schema/table name; connector id mismatch after catalog reconfiguration; stale metadata after manual Accumulo shell drops.","solutions":["Verify the table exists in Accumulo (or via SHOW TABLES in the Presto catalog) using the exact schema and table name from the handle","Re-create the table with CREATE TABLE if it was dropped, or re-run CREATE EXTERNAL TABLE if it was an external Accumulo table","Refresh Presto metadata/state (restart or clear cached handles) if the table was recently renamed or dropped out-of-band","Confirm the connectorId in the handle matches the current catalog configuration"],"exampleFix":"// before\nConnectorTableMetadata metadata = getTableMetadata(session, tableName);\nif (metadata == null) {\n    throw new TableNotFoundException(tableName);\n}\n// after (caller-side guard)\nif (!tableExists(session, tableName)) {\n    throw new TableNotFoundException(tableName);\n}\nreturn getTableMetadata(session, tableName);","handlingStrategy":"validation","validationCode":"SchemaTableName t = handle.toSchemaTableName();\nif (client.getTable(t) == null) throw new TableNotFoundException(t);","typeGuard":null,"tryCatchPattern":"catch (TableNotFoundException e) { /* refresh metadata or fail query */ }","preventionTips":["Check SHOW TABLES first","Avoid out-of-band Accumulo drops"],"tags":["accumulo","table-not-found","metadata","not-found"],"backgroundTag":"table-not-found","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"}