prestodb/presto · error
JDBC_ERROR
JDBC_ERROR
Error message
Failed to find remote schema name: ${e.message} What it means
toRemoteSchemaName() translates a Presto schema name to the remote database's stored identifier, optionally consulting a name-mapping file. Any RuntimeException raised while resolving that mapping is wrapped as PrestoException(JDBC_ERROR, "Failed to find remote schema name: ...").
Source
Thrown at presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/BaseJdbcClient.java:684
"'case-insensitive-name-matching' is deprecated. Use of this configuration value may lead to query failures. " +
"Please switch to using 'case-sensitive-name-matching' for proper case sensitivity behavior."));
try {
Map<String, String> mapping = remoteSchemaNames.getIfPresent(identity);
if (mapping != null && !mapping.containsKey(schemaName)) {
// This might be a schema that has just been created. Force reload.
mapping = null;
}
if (mapping == null) {
mapping = listSchemasByLowerCase(connection);
remoteSchemaNames.put(identity, mapping);
}
String remoteSchema = mapping.get(schemaName);
if (remoteSchema != null) {
return remoteSchema;
}
}
catch (RuntimeException e) {
throw new PrestoException(JDBC_ERROR, "Failed to find remote schema name: " + firstNonNull(e.getMessage(), e), e);
}
}
try {
DatabaseMetaData metadata = connection.getMetaData();
if (metadata.storesUpperCaseIdentifiers() && !caseSensitiveNameMatchingEnabled) {
return schemaName.toUpperCase(ENGLISH);
}
return schemaName;
}
catch (SQLException e) {
throw new PrestoException(JDBC_ERROR, e);
}
}
protected Map<String, String> listSchemasByLowerCase(Connection connection)
{
return listSchemas(connection).stream()View on GitHub (pinned to 55bb57d202)
Solutions
- Fix the underlying cause shown in the wrapped e.message (e.g. invalid regex, unreadable mapping)
- Validate the case-sensitive name mapping configuration/file syntax before restarting Presto
- Ensure the mapping file is readable by the Presto process on all nodes
- Temporarily set case-sensitive-name-matching=false if mapping is not needed
Example fix
// before (mapping pattern invalid) case-sensitive-name-matching=true // after: correct the mapping entry so resolution does not throw // mapping file entry: ^MySchema$ -> MYSCHEMA (valid regex, readable file)
Defensive patterns
Strategy: try-catch
Try / catch
try {
SchemaTableName remote = resolveRemoteSchema(schemaName);
} catch (PrestoException e) {
if ("Failed to find remote schema name".contains(e.getMessage().split(":")[0])) {
// inspect the wrapped cause; fix the mapping config
log.error("Name mapping failure: {}", e.getCause(), e);
} else throw e;
} Prevention
- Test regex patterns in the case-sensitive name mapping against real schema names before deploying
- Keep mapping files readable and identical on every Presto node
- Validate mapping config at deploy time with a dry-run resolution script
When it happens
Trigger: Case-sensitive name matching is enabled and loading/parsing the configured mapping (name-matching patterns or mapping file) throws while resolving the schema; e.g. malformed regex in a mapping rule or unreadable mapping source.
Common situations: Typo or invalid regex in the mapping file configured for case-sensitive-name-matching; file permissions preventing the coordinator/worker from reading the mapping; enabling case-sensitive-name-matching without provisioning the mapping correctly.
Related errors
- JDBC_ERROR
- NOT_FOUND
- Only one of 'case-insensitive-name-matching=true' or 'case-s
- connection-url is required but was not provided
- PERMISSION_DENIED
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/991d15674cf68f23.
Report an issue: GitHub.