LuciferYang commented on code in PR #38490: URL: https://github.com/apache/spark/pull/38490#discussion_r1013555153
########## 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: Got it ~ -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org