brkyvz commented on a change in pull request #28717:
URL: https://github.com/apache/spark/pull/28717#discussion_r434794716
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1024,7 +1024,12 @@ class Analyzer(
DataSourceV2Relation.create(table, Some(catalog), Some(ident)))
}
val key = catalog.name +: ident.namespace :+ ident.name
- Option(AnalysisContext.get.relationCache.getOrElseUpdate(key,
loaded.orNull))
Review comment:
that is correct, but IMO it's a little cleaner. Creating new attributes
should be super cheap, and not worth having a orElses and foreachs.
----------------------------------------------------------------
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]