{"record":{"id":"5238bea94a6efdd3","repo":"prestodb/presto","slug":"not-found-5238be","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/NoSchemaEmulation.java","lineNumber":48,"sourceCode":"    @Override\n    public void createSchema(KuduClient client, String schemaName)\n    {\n        if (DEFAULT_SCHEMA.equals(schemaName)) {\n            throw new SchemaAlreadyExistsException(schemaName);\n        }\n        else {\n            throw new PrestoException(GENERIC_USER_ERROR, \"Creating schema in Kudu connector not allowed if schema emulation is disabled.\");\n        }\n    }\n\n    @Override\n    public void dropSchema(KuduClient client, String schemaName)\n    {\n        if (DEFAULT_SCHEMA.equals(schemaName)) {\n            throw new PrestoException(GENERIC_USER_ERROR, \"Deleting default schema not allowed.\");\n        }\n        else {\n            throw new SchemaNotFoundException(schemaName);\n        }\n    }\n\n    @Override\n    public boolean existsSchema(KuduClient client, String schemaName)\n    {\n        return DEFAULT_SCHEMA.equals(schemaName);\n    }\n\n    @Override\n    public List<String> listSchemaNames(KuduClient client)\n    {\n        return ImmutableList.of(\"default\");\n    }\n\n    @Override\n    public String toRawName(SchemaTableName schemaTableName)\n    {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-kudu/src/main/java/com/facebook/presto/kudu/schema/NoSchemaEmulation.java#L30-L66","documentation":"Thrown by NoSchemaEmulation.dropSchema when asked to drop any schema other than 'default'. This connector runs with schema emulation disabled, so only the implicit 'default' schema exists and it cannot be dropped. The error is wrapped in SchemaNotFoundException and surfaced as NOT_FOUND.","triggerScenarios":"Calling the connector's dropSchema (e.g. DROP SCHEMA) with schemaName != 'default' on a Kudu connector configured with schema emulation disabled (kudu.schema-emulation.enabled=false).","commonSituations":"Running DROP SCHEMA my_schema against a Kudu catalog that was created without schema emulation enabled; scripts written for a schema-emulation-enabled catalog reused on a default-schema-only catalog; migrating table layouts between catalogs.","solutions":["Only reference the 'default' schema when schema emulation is disabled; drop tables instead of schemas","Enable schema emulation in the catalog properties (kudu.schema-emulation.enabled=true) if you need named schemas","Verify which catalog you are connected to; use a catalog that has schema emulation enabled for multi-schema workloads"],"exampleFix":"// before\nDROP SCHEMA analytics;\n// after\n-- with kudu.schema-emulation.enabled=false, drop the tables instead\nDROP TABLE analytics.events;\nDROP TABLE analytics.users;","handlingStrategy":"validation","validationCode":"if (\"default\".equals(schemaName)) {\n    throw new IllegalArgumentException(\"Cannot drop the default schema\");\n}\n// else proceed only if catalog has schema emulation enabled","typeGuard":null,"tryCatchPattern":"try {\n    metadata.dropSchema(...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_FOUND.getCode()) {\n        // schema does not exist under no-emulation mode\n    }\n}","preventionTips":["Verify kudu.schema-emulation.enabled before issuing schema DDL","Only perform schema operations on the 'default' schema in no-emulation catalogs","Skip 'default' in automated schema cleanup loops"],"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-11T21:17:09.523Z"}