cloud-fan commented on a change in pull request #30403:
URL: https://github.com/apache/spark/pull/30403#discussion_r530759305
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala
##########
@@ -471,8 +471,11 @@ class CatalogImpl(sparkSession: SparkSession) extends
Catalog {
* @since 2.0.0
*/
override def uncacheTable(tableName: String): Unit = {
- val tableIdent =
sparkSession.sessionState.sqlParser.parseTableIdentifier(tableName)
- val cascade = !sessionCatalog.isTemporaryTable(tableIdent)
+ import
org.apache.spark.sql.connector.catalog.CatalogV2Implicits.MultipartIdentifierHelper
+ val multipartIdentifier =
+ sparkSession.sessionState.sqlParser.parseMultipartIdentifier(tableName)
+ val cascade = (multipartIdentifier.length <= 2) &&
+ !sessionCatalog.isTemporaryTable(multipartIdentifier.asTableIdentifier)
Review comment:
can we add an overload of `isTemporaryTable` that takes `Seq[String]`?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]