dgd-contributor commented on a change in pull request #33836:
URL: https://github.com/apache/spark/pull/33836#discussion_r714860025



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -341,94 +342,94 @@ object QueryExecutionErrors {
 
   def unableToCreateDatabaseAsFailedToCreateDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to create database ${dbDefinition.name} as 
failed " +
-      s"to create its directory ${dbDefinition.locationUri}", e)
+    new SparkException("CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString), 
e)
   }
 
   def unableToDropDatabaseAsFailedToDeleteDirectoryError(
       dbDefinition: CatalogDatabase, e: IOException): Throwable = {
-    new SparkException(s"Unable to drop database ${dbDefinition.name} as 
failed " +
-      s"to delete its directory ${dbDefinition.locationUri}", e)
+    new SparkException("CANNOT_DROP_OBJECT_DUE_TO_FAILED_DIRECTORY_DELETION",
+      Array("DATABASE", dbDefinition.name, dbDefinition.locationUri.toString), 
e)
   }
 
   def unableToCreateTableAsFailedToCreateDirectoryError(
       table: String, defaultTableLocation: Path, e: IOException): Throwable = {
-    new SparkException(s"Unable to create table $table as failed " +
-      s"to create its directory $defaultTableLocation", e)
+    new SparkException("CANNOT_CREATE_OBJECT_DUE_TO_FAILED_DIRECTORY_CREATION",
+      Array("TABLE", table, defaultTableLocation.toString), e)
   }
 
   def unableToDeletePartitionPathError(partitionPath: Path, e: IOException): 
Throwable = {
-    new SparkException(s"Unable to delete partition path $partitionPath", e)
+    new SparkException("UNABLE_DELETE_PARTITION", 
Array(partitionPath.toString), e)

Review comment:
       thank you! I checked and updated the mistake. Please take another look 
when you have time!




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