Commit f1e5a13
committed
[SPARK-46393][SQL] Classify exceptions in the JDBC table catalog
### What changes were proposed in this pull request?
In the PR, I propose to handle exceptions from JDBC drivers in the JDBC table catalog, classify them and converted to appropriate Spark exception w/ an error class. This PR covers the following functions where such errors haven't been classified yet:
- list tables
- namespace exists
- list namespaces
### Why are the changes needed?
To unify Spark exceptions, and migrate onto new error framework.
### Does this PR introduce _any_ user-facing change?
Yes, if user code expects that Spark SQL bypass Java exceptions from JDBC drivers.
### How was this patch tested?
By existing test suites:
```
$ build/sbt "test:testOnly *JDBCV2Suite"
$ build/sbt "test:testOnly *JDBCTableCatalogSuite"
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #44335 from MaxGekk/classifyException-JDBCTableCatalog.
Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>1 parent b8c49a1 commit f1e5a13
1 file changed
Lines changed: 10 additions & 4 deletions
File tree
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
182 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
189 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
0 commit comments