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 2021/10/24 09:11:11 UTC

[GitHub] [spark] ulysses-you commented on a change in pull request #34365: [SPARK-37098][SQL] Alter table properties should invalidate cache

ulysses-you commented on a change in pull request #34365:
URL: https://github.com/apache/spark/pull/34365#discussion_r735088713



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -276,6 +276,7 @@ case class AlterTableSetPropertiesCommand(
       properties = table.properties ++ properties,
       comment = properties.get(TableCatalog.PROP_COMMENT).orElse(table.comment))
     catalog.alterTable(newTable)
+    catalog.invalidateCachedTable(tableName)

Review comment:
       thank you @sunchao . I think it's a code improvement, and if we decide to do that, it should consider more methods include `alterTableDataSchema`, `alterPartition`, etc. So for now in this PR, I prefer do the simple fix which is straightforward.




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