panbingkun commented on code in PR #46912:
URL: https://github.com/apache/spark/pull/46912#discussion_r1630859747
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala:
##########
@@ -131,13 +131,16 @@ class JDBCTableCatalog extends TableCatalog
checkNamespace(ident.namespace())
val optionsWithTableName = new JDBCOptions(
options.parameters + (JDBCOptions.JDBC_TABLE_NAME ->
getTableName(ident)))
- try {
+ JdbcUtils.classifyException(
+ errorClass = "FAILED_JDBC.LOAD_TABLE",
+ messageParameters = Map(
+ "url" -> options.getRedactUrl(),
+ "tableName" -> toSQLId(ident)),
+ dialect,
+ description = s"Failed to load table: $ident"
Review Comment:
@cloud-fan @yaooqinn
Also, do we need `catalogname` as the `prefix` for the table here?
Although I found this class
`[JDBCTableCatalog.scala](https://github.com/apache/spark/pull/46912/files#diff-0418efe237f1e1563f6ff316515e5c564e1919e28d2f4069dd1c40d35691228a)`,
similar ones do not have `this prefix` attached.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]