ulysses-you commented on a change in pull request #26627: [SPARK-29987][SQL] 
Add CatalogTable cache in SessionCatalog to improve performance
URL: https://github.com/apache/spark/pull/26627#discussion_r349381340
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
 ##########
 @@ -1484,6 +1511,26 @@ class SessionCatalog(
       require(functionBuilder.isDefined, s"built-in function '$f' is missing 
function builder")
       functionRegistry.registerFunction(f, expressionInfo.get, 
functionBuilder.get)
     }
+    invalidateAllCachedCatalogTable()
+  }
+
+  private[sql] def getCachedCatalogTable(qtn: QualifiedTableName): 
Option[CatalogTable] = {
+    cachedCatalogTable.getIfPresent(qtn) match {
+      case null => None
+      case catalogTable => Some(catalogTable)
+    }
+  }
+
+  private[sql] def cacheCatalogTable(qtn: QualifiedTableName, catalogTable: 
CatalogTable): Unit = {
 
 Review comment:
   OK, fix these.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to