Uh oh!
There was an error while loading. Please reload this page.
[SPARK-19952][SQL] Remove various analysis exceptions - #17716
Conversation
| case _: NoSuchTableException => | ||
| u.failAnalysis(s"Table or view not found: ${tableIdentWithDb.unquotedString}") | ||
| // If the database is defined and that database is not found, throw an AnalysisException. | ||
| if (!tableIdentWithDb.database.exists(catalog.databaseExists)) { |
There was a problem hiding this comment.
Perhaps we should move this into catalog.lookupRelation and attach the location here.
There was a problem hiding this comment.
how about
try {
catalog.lookupRelation(tableIdentWithDb)
} catch {
case a: AnalysisException => u.failAnalysis(a.message)
}
There was a problem hiding this comment.
Yeah, could work. This change is also causing the tests to fail, so I am revisiting it.
hvanhovell
commented
Apr 21, 2017
SparkQA
commented
Apr 21, 2017
Test build #76031 has finished for PR 17716 at commit
|
SparkQA
commented
Apr 21, 2017
Test build #76039 has finished for PR 17716 at commit
|
| private def assertNoSuchTable(query: String): Unit = { | ||
| intercept[NoSuchTableException] { | ||
| intercept[AnalysisException] { |
There was a problem hiding this comment.
AnalysisException is a pretty general Exception in Spark SQL. The future refactoring might introduce bugs without trigger any test case failure.
Could we check the error messages?
HyukjinKwon
commented
Jun 2, 2017
@hvanhovell, how is it going? |
jiangxb1987
commented
Jun 25, 2017
ping @hvanhovell Are you still working on this? |
## What changes were proposed in this pull request? This PR proposes to close stale PRs, mostly the same instances with apache#18017 I believe the author in apache#14807 removed his account. Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937 Added: Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359 Added: Closesapache#16450Closesapache#16525Closesapache#17738 Added: Closesapache#16458Closesapache#16508Closesapache#17714 Added: Closesapache#17830Closesapache#14742 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18417 from HyukjinKwon/close-stale-pr.
What changes were proposed in this pull request?
We currently have quite a few analysis exception subclasses, the problem with these is that they are not well supported throughout Spark (in pySpark for example) and that the added value is limited. This PR removes the
no such objectand thealready existsexceptions, and replaces them by a factory methods that create analysis exceptions with the required error messages.How was this patch tested?
Modified existing tests.