Summary
Catalog names containing hyphens (e.g., a-b-c-d) cause INVALID_IDENTIFIER errors because the driver doesn't quote them with backticks.
Versions
- Working: 2.7.5 (Simba)
- Broken: 3.0.3+ (OSS)
Error
[INVALID_IDENTIFIER] The unquoted identifier a-b-c-d is invalid and must be back quoted as: `a-b-c-d`.
Root Cause
In PR #953, CommandBuilder.java uses:
SHOW_SCHEMAS_IN_CATALOG_SQL = "SHOW SCHEMAS IN %s"
This should be:
SHOW_SCHEMAS_IN_CATALOG_SQL = "SHOW SCHEMAS IN `%s`"
Reproduction
- Create a catalog with a hyphen in the name
- Connect via JDBC driver 3.0.3+
- Browse schemas in a JDBC client (e.g., DBeaver)
Expected
Catalog names should be backtick-quoted per Databricks identifier rules:
https://docs.databricks.com/en/sql/language-manual/sql-ref-identifiers.html
Summary
Catalog names containing hyphens (e.g.,
a-b-c-d) cause INVALID_IDENTIFIER errors because the driver doesn't quote them with backticks.Versions
Error
[INVALID_IDENTIFIER] The unquoted identifier a-b-c-d is invalid and must be back quoted as: `a-b-c-d`.
Root Cause
In PR #953,
CommandBuilder.javauses:This should be:
Reproduction
Expected
Catalog names should be backtick-quoted per Databricks identifier rules:
https://docs.databricks.com/en/sql/language-manual/sql-ref-identifiers.html