https://github.com/apache/spark
Revision 86e3514ceeac0b494ec58cbd413ae957f4d4bc8d authored by Prashant Singh on 23 June 2022, 05:25:08 UTC, committed by Wenchen Fan on 23 June 2022, 05:25:26 UTC
[SPARK-39547][SQL] V2SessionCatalog should not throw NoSuchDatabaseException in loadNamspaceMetadata
### What changes were proposed in this pull request? This change attempts to make V2SessionCatalog return NoSuchNameSpaceException rather than NoSuchDataseException ### Why are the changes needed? if a catalog doesn't overrides `namespaceExists` it by default uses `loadNamespaceMetadata` and in case a `db` not exists loadNamespaceMetadata throws a `NoSuchDatabaseException` which is not catched and we see failures even with `if exists` clause. One such use case we observed was in iceberg table a post test clean up was failing with `NoSuchDatabaseException` now. Also queries such as `DROP TABLE IF EXISTS {}` fails with no such db exception. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Modified the UT to match the proposed behviour Closes #36948 from singhpk234/fix/loadNamespaceMetadata. Authored-by: Prashant Singh <psinghvk@amazon.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 95133932a661742bf0dd1343bc7eda08f2cf752f) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent be9fae2
Tip revision: 86e3514ceeac0b494ec58cbd413ae957f4d4bc8d authored by Prashant Singh on 23 June 2022, 05:25:08 UTC
[SPARK-39547][SQL] V2SessionCatalog should not throw NoSuchDatabaseException in loadNamspaceMetadata
[SPARK-39547][SQL] V2SessionCatalog should not throw NoSuchDatabaseException in loadNamspaceMetadata
Tip revision: 86e3514
File | Mode | Size |
---|---|---|
.github | ||
.idea | ||
R | ||
assembly | ||
bin | ||
binder | ||
build | ||
common | ||
conf | ||
core | ||
data | ||
dev | ||
docs | ||
examples | ||
external | ||
graphx | ||
hadoop-cloud | ||
launcher | ||
licenses | ||
licenses-binary | ||
mllib | ||
mllib-local | ||
project | ||
python | ||
repl | ||
resource-managers | ||
sbin | ||
sql | ||
streaming | ||
tools | ||
.asf.yaml | -rw-r--r-- | 1.1 KB |
.gitattributes | -rw-r--r-- | 130 bytes |
.gitignore | -rw-r--r-- | 2.0 KB |
CONTRIBUTING.md | -rw-r--r-- | 997 bytes |
LICENSE | -rw-r--r-- | 13.1 KB |
LICENSE-binary | -rw-r--r-- | 22.4 KB |
NOTICE | -rw-r--r-- | 2.0 KB |
NOTICE-binary | -rw-r--r-- | 56.5 KB |
README.md | -rw-r--r-- | 4.4 KB |
appveyor.yml | -rw-r--r-- | 2.7 KB |
pom.xml | -rw-r--r-- | 137.4 KB |
scalastyle-config.xml | -rw-r--r-- | 22.0 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...