You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "aokolnychyi (via GitHub)" <gi...@apache.org> on 2023/04/05 20:22:27 UTC

[GitHub] [spark] aokolnychyi commented on a diff in pull request #40679: [SPARK-43041][SQL] Restore constructors of exceptions for compatibility in connector API

aokolnychyi commented on code in PR #40679:
URL: https://github.com/apache/spark/pull/40679#discussion_r1158972976


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlreadyExistException.scala:
##########
@@ -61,6 +61,11 @@ class TableAlreadyExistsException(errorClass: String, messageParameters: Map[Str
     this(errorClass = "TABLE_OR_VIEW_ALREADY_EXISTS",
       messageParameters = Map("relationName" -> quoteNameParts(table)))
   }
+
+  def this(tableIdent: Identifier) = {

Review Comment:
   Here is the definition used in 3.3.
   
   ```
   class TableAlreadyExistsException(message: String, cause: Option[Throwable] = None)
     extends AnalysisException(message, cause = cause) {
     def this(db: String, table: String) = {
       this(s"Table or view '$table' already exists in database '$db'")
     }
   
     def this(tableIdent: Identifier) = {
       this(s"Table ${tableIdent.quoted} already exists")
     }
   }
   ```
   
   Technically, there was another constructor accepting `message`. Shall we restore it too?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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