File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
common/utils/src/main/resources/error
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 12551255 " List namespaces."
12561256 ]
12571257 },
1258- "LOAD_TABLE" : {
1259- "message" : [
1260- " Load the table <tableName>."
1261- ]
1262- },
12631258 "NAMESPACE_EXISTS" : {
12641259 "message" : [
12651260 " Check that the namespace <namespace> exists."
Original file line number Diff line number Diff line change @@ -131,16 +131,13 @@ class JDBCTableCatalog extends TableCatalog
131131 checkNamespace(ident.namespace())
132132 val optionsWithTableName = new JDBCOptions (
133133 options.parameters + (JDBCOptions .JDBC_TABLE_NAME -> getTableName(ident)))
134- JdbcUtils .classifyException(
135- errorClass = " FAILED_JDBC.LOAD_TABLE" ,
136- messageParameters = Map (
137- " url" -> options.getRedactUrl(),
138- " tableName" -> toSQLId(ident)),
139- dialect,
140- description = s " Failed to load table: $ident"
141- ) {
134+ try {
142135 val schema = JDBCRDD .resolveTable(optionsWithTableName)
143136 JDBCTable (ident, schema, optionsWithTableName)
137+ } catch {
138+ case e : SQLException =>
139+ logWarning(" Failed to load table" , e)
140+ throw QueryCompilationErrors .noSuchTableError(ident)
144141 }
145142 }
146143
You can’t perform that action at this time.
0 commit comments