-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Add Databricks to sql-error-codes #34640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that we actually use So our default mapping file is effectively legacy. From that perspective, there is limited value in us extending that default Is there specific error detection that you would expect for Databricks that you do not get out of As far as I can tell, Databricks supports 23505 for duplicate-key scenarios which our |
Thanks for the quick explanation and detailed answer. I haven't had an SQL translator yet, but I discovered the file and wondered if I needed to handle it for Databricks. I saw also this here :).
I would use the default SQLErrorCodes for now and create a ticket if a special case occurs again. |
@jhoeller maybe i figured out the issue. Iam using jOOQ and this is directly using only the sql state error translator for Databricks, because the db name is Maybe this looks like an bug, because also when the db name is not provided it should be using the the default SQLErrorCodeSQLExceptionTranslator which has an fallback to SQLExceptionSubclassTranslator. And SQLExceptionSubclassTranslator has an fallback then to SQLStateSQLExceptionTranslator and then it could work with the complete fallback chain. Also the javadoc gives the hin So IMHO this line should changed to:
What do you think? and maybe the default contructor could provide a empty new SQLErrorCodes() if it is null, or this should also be handled in the auto config |
@MelleD I wasn't ware that there was such a special error translation setup for JOOQ. Indeed, that line in Spring Boot's auto-configured translator should change as follows, matching the core Spring fallback chain:
Without a database name given, FWIW we used to fall back to Please report the suggestion above to the Spring Boot project: https://github.com/spring-projects/spring-boot/issues |
I would like to use Databricks directly for the SQL error codes without creating a custom file:
https://github.com/spring-projects/spring-framework/blob/main/spring-jdbc/src/main/resources/org/springframework/jdbc/support/sql-error-codes.xml
The SQL code states are declared here:
https://docs.databricks.com/aws/en/error-messages/sqlstates
The text was updated successfully, but these errors were encountered: