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/01/06 17:35:47 UTC
[GitHub] [spark] sunchao commented on a change in pull request #31066: [SPARK-34027][SQL] Refresh cache in `ALTER TABLE .. RECOVER PARTITIONS`
sunchao commented on a change in pull request #31066:
URL: https://github.com/apache/spark/pull/31066#discussion_r552842255
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -675,7 +675,7 @@ case class AlterTableRecoverPartitionsCommand(
// This is always the case for Hive format tables, but is not true for Datasource tables created
// before Spark 2.1 unless they are converted via `msck repair table`.
spark.sessionState.catalog.alterTable(table.copy(tracksPartitionsInCatalog = true))
- catalog.refreshTable(tableName)
+ spark.catalog.refreshTable(tableIdentWithDB)
Review comment:
I think the former calls the latter which only refreshes metadata cache and is used in multiple other places.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org