You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/03 17:48:33 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #38490: [SPARK-41009][SQL] Rename the error class `_LEGACY_ERROR_TEMP_1070` to `LOCATION_ALREADY_EXISTS`

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2750,4 +2750,26 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
       errorClass = "UNSUPPORTED_EMPTY_LOCATION",
       messageParameters = Map.empty)
   }
+
+  def locationAlreadyExistsInCreate(
+      tableId: TableIdentifier,
+      location: Path): Throwable = {
+    new SparkRuntimeException(
+      errorClass = "LOCATION_ALREADY_EXISTS.CREATE_MANAGED_TABLE",
+      messageParameters = Map(
+        "location" -> toSQLValue(location.toString, StringType),
+        "table" -> toSQLId(tableId.nameParts)))
+  }
+
+  def locationAlreadyExistsInRename(
+      tableId: TableIdentifier,
+      newTableId: TableIdentifier,
+      location: Path): Throwable = {
+    new SparkRuntimeException(
+      errorClass = "LOCATION_ALREADY_EXISTS.RENAME_MANAGED_TABLE",
+      messageParameters = Map(
+        "location" -> toSQLValue(location.toString, StringType),
+        "table" -> toSQLId(tableId.nameParts),

Review Comment:
   No longer print possible `catalog` and `database`?
   
   



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