You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/07/24 07:54:16 UTC

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

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlreadyExistException.scala:
##########
@@ -97,10 +161,29 @@ class PartitionAlreadyExistsException(errorClass: String, messageParameters: Map
         .map( kv => quoteIdentifier(s"${kv._2}") + s" = ${kv._1}").mkString(", ") + ")"),
         "tableName" -> quoteNameParts(UnresolvedAttribute.parseAttributeName(tableName))))
   }
+
+  def this(message: String) = {
+    this(message, errorClass = None, messageParameters = Map.empty[String, String])
+  }
 }
 
-class PartitionsAlreadyExistException(errorClass: String, messageParameters: Map[String, String])
-  extends AnalysisException(errorClass, messageParameters) {
+// any changes to this class should be backward compatible as it may be used by external connectors
+class PartitionsAlreadyExistException private(

Review Comment:
   @aokolnychyi 
   
   It seems that in Spark, `PartitionAlreadyExistsException` is only defined and not used. Is this an exception that will be used by external connectors? May we remove this definition in Spark 4.0?
   
    
   



-- 
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