Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12314#discussion_r59606712
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/NoSuchItemException.scala
 ---
    @@ -17,36 +17,21 @@
     
     package org.apache.spark.sql.catalyst.analysis
     
    +import org.apache.spark.sql.AnalysisException
     import 
org.apache.spark.sql.catalyst.catalog.ExternalCatalog.TablePartitionSpec
     
     
     /**
      * Thrown by a catalog when an item cannot be found. The analyzer will 
rethrow the exception
      * as an [[org.apache.spark.sql.AnalysisException]] with the correct 
position information.
      */
    -abstract class NoSuchItemException extends Exception {
    -  override def getMessage: String
    -}
    +class NoSuchDatabaseException(db: String) extends 
AnalysisException(s"Database $db not found")
     
    -class NoSuchDatabaseException(db: String) extends NoSuchItemException {
    -  override def getMessage: String = s"Database $db not found"
    -}
    +class NoSuchTableException(db: String, table: String)
    +  extends AnalysisException(s"Table or View $table not found in database 
$db")
     
    -class NoSuchTableException(db: String, table: String) extends 
NoSuchItemException {
    -  override def getMessage: String = s"Table or View $table not found in 
database $db"
    -}
    +class NoSuchPartitionException(db: String, table: String, spec: 
TablePartitionSpec) extends
    +    AnalysisException(s"Partition not found in table $table database 
$db:\n" + spec.mkString("\n"))
    --- End diff --
    
    it's OK I'll fix these later.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to