cloud-fan commented on a change in pull request #31594:
URL: https://github.com/apache/spark/pull/31594#discussion_r579980038



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/RenameTableExec.scala
##########
@@ -43,12 +43,20 @@ case class RenameTableExec(
     val optOldStorageLevel = invalidateCache()
     catalog.invalidateTable(oldIdent)
 
-    catalog.renameTable(oldIdent, newIdent)
+    // If new identifier consists of a table name only, the table should be 
renamed in place.
+    // Such behavior matches to the v1 implementation of table renaming in 
Spark and other DBMSs.

Review comment:
       shall we do it in the analysis phase?




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

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