wangyum commented on a change in pull request #22721: URL: https://github.com/apache/spark/pull/22721#discussion_r554667173
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/CommandUtils.scala ########## @@ -50,6 +50,9 @@ object CommandUtils extends Logging { catalog.alterTableStats(table.identifier, Some(newStats)) } else if (table.stats.nonEmpty) { catalog.alterTableStats(table.identifier, None) + } else { + // In other cases, we still need to invalidate the table relation cache. Review comment: Not all commands have refresh table logic, such as `AlterTableSetLocationCommand`: https://github.com/apache/spark/blob/b77d11dfd942ee2164dde2f5c25c6aaed65c444c/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala#L836-L837 ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org