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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlreadyExistException.scala:
##########
@@ -56,7 +56,10 @@ class NamespaceAlreadyExistsException private(
   }
 
   def this(message: String) = {
-    this(message, errorClass = None, messageParameters = Map.empty[String, 
String])
+    this(
+      message,
+      errorClass = Some("SCHEMA_ALREADY_EXISTS"),

Review Comment:
   It is a bit unfortunate we have to use the same string literal in multiple 
places. Adding a constant would require a companion object and an import as 
these values are accessed in constructors. I was not sure it would be worth it 
so kept as is.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to