Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17730#discussion_r112854341
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala ---
    @@ -197,7 +211,11 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
        * `AnalysisException` when no `Table` can be found.
        */
       override def getTable(dbName: String, tableName: String): Table = {
    -    makeTable(TableIdentifier(tableName, Option(dbName)))
    +    if (tableExists(dbName, tableName)) {
    +      makeTable(TableIdentifier(tableName, Option(dbName)))
    +    } else {
    +      throw new AnalysisException(s"Table or view '$tableName' not found 
in database '$dbName'")
    --- End diff --
    
    The doc says `This throws an AnalysisException when no Table can be 
found.`, I think we should not change this behavior


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to