{"record":{"id":"4f3d40d8366ec9bd","repo":"prestodb/presto","slug":"s-is-not-lowercase-s","errorCode":null,"errorMessage":"%s is not lowercase: %s","messagePattern":"(.+?) is not lowercase: (.+?)","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-common/src/main/java/com/facebook/presto/common/QualifiedObjectName.java","lineNumber":132,"sourceCode":"\n    @Override\n    public int hashCode()\n    {\n        return Objects.hash(catalogName, schemaName, objectName);\n    }\n\n    @JsonValue\n    @Override\n    public String toString()\n    {\n        return catalogName + '.' + schemaName + '.' + objectName;\n    }\n\n    private static void checkLowerCase(String value, String name)\n    {\n        requireNonNull(value, format(\"%s is null\", name));\n        if (!value.equals(value.toLowerCase(ENGLISH))) {\n            throw new IllegalArgumentException(format(\"%s is not lowercase: %s\", name, value));\n        }\n    }\n}\n","sourceCodeStart":114,"sourceCodeEnd":136,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-common/src/main/java/com/facebook/presto/common/QualifiedObjectName.java#L114-L136","documentation":"QualifiedObjectName requires its catalog, schema, and object name parts to be lowercase. checkLowerCase throws this IllegalArgumentException when any component contains uppercase (or any character that changes under toLowerCase(ENGLISH)), enforcing Presto's lowercase identifier convention for qualified object names.","triggerScenarios":"Constructing a QualifiedObjectName (via constructor or valueOf) with a part like \"Hive\", \"DEFAULT\", or \"MyTable\" that is not entirely lowercase.","commonSituations":"Names read from OS paths, config files, or case-sensitive external systems (e.g. S3 bucket keys, Hive metastore with case-preserving catalogs); older configs written before a lowercase-enforcement change; users typing CamelCase table names.","solutions":["Lowercase the components before constructing: name.toLowerCase(Locale.ENGLISH) on catalog, schema, and object.","Check the source of the name (config, metastore, user input) and normalize it at ingestion time.","If the case is meaningful, do not use QualifiedObjectName — use a case-preserving type, since Presto identifiers here must be lowercase.","Update stored configuration to already-lowercase values rather than lowercasing at every use site."],"exampleFix":"// before\nQualifiedObjectName name = new QualifiedObjectName(\"Hive\", \"default\", \"MyTable\"); // throws\n// after\nQualifiedObjectName name = new QualifiedObjectName(\n    catalog.toLowerCase(Locale.ENGLISH),\n    schema.toLowerCase(Locale.ENGLISH),\n    table.toLowerCase(Locale.ENGLISH));","handlingStrategy":"validation","validationCode":"String catalog = \"Hive\".toLowerCase(Locale.ENGLISH);\nString schema = \"Default\".toLowerCase(Locale.ENGLISH);\nString table = \"MyTable\".toLowerCase(Locale.ENGLISH);\nQualifiedObjectName name = new QualifiedObjectName(catalog, schema, table);","typeGuard":"boolean isLowerCase(String s) {\n    return s != null && s.equals(s.toLowerCase(Locale.ENGLISH));\n}","tryCatchPattern":"try {\n    QualifiedObjectName name = QualifiedObjectName.valueOf(raw);\n} catch (IllegalArgumentException e) {\n    // normalize case and retry once\n    QualifiedObjectName name = QualifiedObjectName.valueOf(raw.toLowerCase(Locale.ENGLISH));\n}","preventionTips":["Normalize all identifier components with toLowerCase(Locale.ENGLISH) at system boundaries.","Store config values already lowercased.","Remember toLowerCase() can change length for some locales — always use Locale.ENGLISH.","Add unit tests covering CamelCase inputs."],"tags":["presto","naming","case-sensitivity","illegal-argument"],"backgroundTag":"identifier-not-lowercase","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"}