MaxGekk commented on a change in pull request #31524:
URL: https://github.com/apache/spark/pull/31524#discussion_r572041366
##########
File path: docs/sql-ref-syntax-ddl-alter-table.md
##########
@@ -27,6 +27,9 @@ license: |
`ALTER TABLE RENAME TO` statement changes the table name of an existing table
in the database.
+If the table is cached, the commands clear cached data of the table and all
its dependents that refer to it. The cache will be lazily filled when the next
time the table or the dependents are accessed.
+The partition rename command keeps table dependents as cached but the table
rename does not. In this way dependents should be re-cached explicitly after
table renaming.
Review comment:
Look at the implementation
https://github.com/apache/spark/blob/2c243c93d9b107ed19fa21002d54deccd17ce50a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala#L201-L210
It uncaches tables (and its dependents), and caches ONLY the table back.
----------------------------------------------------------------
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]