{"record":{"id":"f752a0ac12c3a0c4","repo":"prestodb/presto","slug":"pinot-unclassified-error-f752a0","errorCode":"PINOT_UNCLASSIFIED_ERROR","errorMessage":"Unable to find the presto table %s in %s","messagePattern":"Unable to find the presto table (.+?) in (.+?)","errorType":"error_code","errorClass":"PinotException","httpStatus":null,"severity":"error","filePath":"presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotMetadata.java","lineNumber":80,"sourceCode":"    }\n\n    @Override\n    public List<String> listSchemaNames(ConnectorSession session)\n    {\n        return ImmutableList.of(SCHEMA_NAME);\n    }\n\n    private String getPinotTableNameFromPrestoTableName(ConnectorSession session, String prestoTableName)\n    {\n        List<String> allTables = pinotPrestoConnection.getTableNames();\n        String normalizedPrestoTableName = normalizeIdentifier(session, prestoTableName);\n        for (String pinotTableName : allTables) {\n            String normalizedPinotTableName = normalizeIdentifier(session, pinotTableName);\n            if (normalizedPrestoTableName.equals(normalizedPinotTableName)) {\n                return pinotTableName;\n            }\n        }\n        throw new PinotException(PINOT_UNCLASSIFIED_ERROR, Optional.empty(), \"Unable to find the presto table \" + prestoTableName + \" in \" + allTables);\n    }\n\n    @Override\n    public PinotTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)\n    {\n        if (!SCHEMA_NAME.equals(normalizeIdentifier(session, tableName.getSchemaName()))) {\n            throw new PrestoException(NOT_FOUND, format(\"Schema %s does not exist\", tableName.getSchemaName()));\n        }\n        String pinotTableName = getPinotTableNameFromPrestoTableName(session, tableName.getTableName());\n        return new PinotTableHandle(connectorId, tableName.getSchemaName(), pinotTableName);\n    }\n\n    @Override\n    public ConnectorTableLayoutResult getTableLayoutForConstraint(\n            ConnectorSession session,\n            ConnectorTableHandle table,\n            Constraint<ColumnHandle> constraint,\n            Optional<Set<ColumnHandle>> desiredColumns)","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotMetadata.java#L62-L98","documentation":"getPinotTableNameFromPrestoTableName normalizes the Presto table name and scans all known Pinot table names for a case-normalized match; if none matches, it throws PINOT_UNCLASSIFIED_ERROR listing the requested name and the available tables.","triggerScenarios":"A query references a table whose normalized name does not equal any entry in the controller's list of tables (allTables), e.g. SELECT from a table that doesn't exist or has different casing/REALTIME/OFFLINE suffixing.","commonSituations":"Typo in table name; querying a table that exists only as an OFFLINE table under a name variant; case sensitivity mismatch when Pinot returns names like SalesEvent_OFFLINE but the query used salesevent; table dropped between listing and query.","solutions":["Compare the table list printed in the error message and correct the table name in the query","Check the exact table name in Pinot (curl /v2/tables) including _REALTIME/_OFFLINE suffixes","Confirm the table still exists — it may have been dropped after catalog listing","Configure pinot.table-names or normalize identifiers consistently if case handling is the issue"],"exampleFix":"// before\nSELECT * FROM pinot.default.saleseventt\n// after\nSELECT * FROM pinot.default.salesevent -- matches actual Pinot table name","handlingStrategy":"validation","validationCode":"// Check the exact table name registered in Pinot before querying\ncurl -s http://<controller>:9000/v2/tables | jq '.tables[].name'","typeGuard":null,"tryCatchPattern":"try {\n    connector.getTableHandle(session, schemaTableName);\n} catch (PrestoException | PinotException e) {\n    if (e.getMessage().startsWith(\"Unable to find the presto table\")) {\n        // surface the valid table list from the message to the user\n    }\n    throw e;\n}","preventionTips":["Copy table names from Pinot's table list API, not from memory","Be aware of REALTIME/OFFLINE name suffixes when both exist","Watch for dropped tables referenced by stale dashboards or saved queries","Use consistent identifier casing between clients and Pinot"],"tags":["pinot","table-not-found","metadata"],"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"}