cloud-fan commented on a change in pull request #26589: [SPARK-29947][SQL]
Improve ResolveRelations performance
URL: https://github.com/apache/spark/pull/26589#discussion_r370086560
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -870,7 +874,9 @@ class Analyzer(
case SessionCatalogAndIdentifier(catalog, ident) =>
CatalogV2Util.loadTable(catalog, ident).map {
case v1Table: V1Table =>
- v1SessionCatalog.getRelation(v1Table.v1Table)
+ val key = catalog.name +: ident.namespace :+ ident.name
+ AnalysisContext.get.relationCache.getOrElseUpdate(
Review comment:
This doesn't work. The table is already loaded and it's too late to use the
cache. I've sent https://github.com/apache/spark/pull/27341 to fix it.
----------------------------------------------------------------
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]