cloud-fan commented on a change in pull request #31206: URL: https://github.com/apache/spark/pull/31206#discussion_r560631515
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ########## @@ -170,6 +170,13 @@ class SessionCatalog( tableRelationCache.invalidate(key) } + /** Discards any cached table relation plans for the given table identifier. */ + private[sql] def invalidateCachedTable(name: TableIdentifier): Unit = { + val dbName = formatDatabaseName(name.database.getOrElse(currentDb)) + val tableName = formatTableName(name.table) + invalidateCachedTable(QualifiedTableName(dbName, tableName)) Review comment: if the `name` refers to a temp view, we shouldn't call `invalidateCachedTable` here which may accidentally invalid cache for a table with the same name as the temp view. ---------------------------------------------------------------- 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