cloud-fan commented on code in PR #36983:
URL: https://github.com/apache/spark/pull/36983#discussion_r906997943
##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -647,15 +647,15 @@ class CatalogImpl(sparkSession: SparkSession) extends
Catalog {
* @since 2.0.0
*/
override def refreshTable(tableName: String): Unit = {
- val tableIdent =
sparkSession.sessionState.sqlParser.parseTableIdentifier(tableName)
- val relation = sparkSession.table(tableIdent).queryExecution.analyzed
+ val relation = sparkSession.table(tableName).queryExecution.analyzed
relation.refresh()
+ val ident =
sparkSession.sessionState.sqlParser.parseMultipartIdentifier(tableName)
// Temporary and global temporary views are not supposed to be put into
the relation cache
// since they are tracked separately.
- if (!sessionCatalog.isTempView(tableIdent)) {
- sessionCatalog.invalidateCachedTable(tableIdent)
+ if (!sessionCatalog.isTempView(ident)) {
+ sessionCatalog.invalidateCachedTable(makeTableIdentifier(ident))
Review Comment:
the idea LGTM, to fully support refresh table in any catalog.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]