ganeshashree commented on code in PR #52315:
URL: https://github.com/apache/spark/pull/52315#discussion_r2342954055


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala:
##########
@@ -359,8 +359,12 @@ class V2SessionCatalog(catalog: SessionCatalog)
     if (tableExists(newIdent)) {
       throw QueryCompilationErrors.tableAlreadyExistsError(newIdent)
     }
-
-    catalog.renameTable(oldIdent.asTableIdentifier, newIdent.asTableIdentifier)
+    try {
+      catalog.renameTable(oldIdent.asTableIdentifier, 
newIdent.asTableIdentifier)
+    } catch {
+      case _: NoSuchTableException =>

Review Comment:
   Same reason. `NoSuchTableException` thrown here doesn't appear to originate 
from `QueryCompilationErrors.noSuchTableError(..)`, and it doesn't include the 
fully qualified table name. So, I handled it  here. 



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

Reply via email to