Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20439] [SQL] Fix Catalog API listTables and getTable when failed to fetch table metadata - #17730
Closed
gatorsmile wants to merge 3 commits into
Closed
[SPARK-20439] [SQL] Fix Catalog API listTables and getTable when failed to fetch table metadata#17730gatorsmile wants to merge 3 commits into
gatorsmile wants to merge 3 commits into
Conversation
SparkQA
commented
Apr 23, 2017
Test build #76072 has finished for PR 17730 at commit
|
gatorsmile
commented
Apr 23, 2017
MemberAuthor
| if (tableExists(dbName, tableName)) { | ||
| makeTable(TableIdentifier(tableName, Option(dbName))) | ||
| } else { | ||
| throw new AnalysisException(s"Table or view '$tableName' not found in database '$dbName'") |
Contributor
There was a problem hiding this comment.
The doc says This throws an AnalysisException when no Table can be found., I think we should not change this behavior
MemberAuthor
There was a problem hiding this comment.
Yes. That is why an AnalysisException is issued here. makeTable eats the expected exception.
cloud-fan
commented
Apr 24, 2017
Contributor
LGTM, merging to master/2.2! |
asfgit pushed a commit
that referenced
this pull request
Apr 24, 2017
…d to fetch table metadata ### What changes were proposed in this pull request? `spark.catalog.listTables` and `spark.catalog.getTable` does not work if we are unable to retrieve table metadata due to any reason (e.g., table serde class is not accessible or the table type is not accepted by Spark SQL). After this PR, the APIs still return the corresponding Table without the description and tableType) ### How was this patch tested? Added a test case Author: Xiao Li <gatorsmile@gmail.com> Closes#17730 from gatorsmile/listTables. (cherry picked from commit 776a2c0) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
sameeragarwal
commented
Apr 24, 2017
Member
should we backport this to earlier releases too? |
gatorsmile
commented
Apr 24, 2017
MemberAuthor
Sure, will do it to 2.1 |
asfgit pushed a commit
that referenced
this pull request
Apr 26, 2017
…ble when failed to fetch table metadata ### What changes were proposed in this pull request? This PR is to backport #17730 to Spark 2.1 --- -- `spark.catalog.listTables` and `spark.catalog.getTable` does not work if we are unable to retrieve table metadata due to any reason (e.g., table serde class is not accessible or the table type is not accepted by Spark SQL). After this PR, the APIs still return the corresponding Table without the description and tableType) ### How was this patch tested? Added a test case Author: Xiao Li <gatorsmile@gmail.com> Closes#17760 from gatorsmile/backport-17730.
peter-toth pushed a commit
to peter-toth/spark
that referenced
this pull request
Oct 6, 2018
…d to fetch table metadata ### What changes were proposed in this pull request? `spark.catalog.listTables` and `spark.catalog.getTable` does not work if we are unable to retrieve table metadata due to any reason (e.g., table serde class is not accessible or the table type is not accepted by Spark SQL). After this PR, the APIs still return the corresponding Table without the description and tableType) ### How was this patch tested? Added a test case Author: Xiao Li <gatorsmile@gmail.com> Closesapache#17730 from gatorsmile/listTables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
spark.catalog.listTablesandspark.catalog.getTabledoes not work if we are unable to retrieve table metadata due to any reason (e.g., table serde class is not accessible or the table type is not accepted by Spark SQL). After this PR, the APIs still return the corresponding Table without the description and tableType)How was this patch tested?
Added a test case