{"record":{"id":"3b80267194a120ac","repo":"prestodb/presto","slug":"not-found-3b8026","errorCode":"NOT_FOUND","errorMessage":"Schema ${schemaName} not found","messagePattern":"Schema (.+?) not found","errorType":"error_code","errorClass":"SchemaNotFoundException","httpStatus":null,"severity":"error","filePath":"presto-kudu/src/main/java/com/facebook/presto/kudu/schema/SchemaEmulationByTableNameConvention.java","lineNumber":218,"sourceCode":"    public String toRawName(SchemaTableName schemaTableName)\n    {\n        if (DEFAULT_SCHEMA.equals(schemaTableName.getSchemaName())) {\n            if (commonPrefix.isEmpty()) {\n                if (schemaTableName.getTableName().indexOf('.') != -1) {\n                    // in default schema table name must not contain dots if common prefix is empty\n                    throw new PrestoException(GENERIC_USER_ERROR, \"Table name conflicts with schema emulation settings. No '.' allowed for tables in schema 'default'.\");\n                }\n            }\n            else {\n                if (schemaTableName.getTableName().startsWith(commonPrefix)) {\n                    // in default schema table name must not start with common prefix\n                    throw new PrestoException(GENERIC_USER_ERROR, \"Table name conflicts with schema emulation settings. Table name must not start with '\" + commonPrefix + \"'.\");\n                }\n            }\n        }\n        else if (schemaTableName.getSchemaName().indexOf('.') != -1) {\n            // schema names with dots are not possible\n            throw new SchemaNotFoundException(schemaTableName.getSchemaName());\n        }\n\n        if (DEFAULT_SCHEMA.equals(schemaTableName.getSchemaName())) {\n            return schemaTableName.getTableName();\n        }\n        else {\n            return commonPrefix + schemaTableName.getSchemaName() + \".\" + schemaTableName.getTableName();\n        }\n    }\n\n    @Override\n    public SchemaTableName fromRawName(String rawName)\n    {\n        if (commonPrefix.isEmpty()) {\n            int dotIndex = rawName.indexOf('.');\n            if (dotIndex == -1) {\n                return new SchemaTableName(DEFAULT_SCHEMA, rawName);\n            }","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-kudu/src/main/java/com/facebook/presto/kudu/schema/SchemaEmulationByTableNameConvention.java#L200-L236","documentation":"Thrown by SchemaEmulationByTableNameConvention.toRawName when the schema name contains a dot or is otherwise not resolvable under table-name-convention emulation. Dotted schema names cannot be encoded into raw table names, so the schema is reported as not found (NOT_FOUND).","triggerScenarios":"Referencing a schema whose name contains '.' (e.g. a.b.my_table) on a Kudu catalog using table-name-convention emulation; also any non-default schema name that fails resolution.","commonSituations":"Queries ported from Hive-style catalogs with nested namespaces; tools splitting qualified names on dots; typos producing schema names containing dots.","solutions":["Use a dot-free schema name (CREATE SCHEMA a_b instead of a.b)","Reference tables only in the 'default' schema or valid emulated schemas","Enable a different schema emulation mode / connector with nested namespace support if dotted names are required"],"exampleFix":"// before\nSELECT * FROM kudu.analytics.web.events;\n// after\nSELECT * FROM kudu.analytics_web.events;","handlingStrategy":"validation","validationCode":"if (schemaName.indexOf('.') != -1) {\n    throw new IllegalArgumentException(\"Schema names must not contain '.'\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    table = metadata.getTableHandle(session, schemaTableName);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_FOUND.getCode()) {\n        // surface friendly 'schema not supported' message\n    }\n}","preventionTips":["Use single-level, dot-free schema names","Sanitize namespaces coming from external tools before mapping them to Kudu schemas","Test queries ported from nested-namespace catalogs for qualified-name compatibility"],"tags":["presto","kudu","schema","not-found"],"backgroundTag":"schema-not-found","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}