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_r362441777
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -91,10 +91,14 @@ object FakeV2SessionCatalog extends TableCatalog {
* current catalog database.
* @param nestedViewDepth The nested depth in the view resolution, this
enables us to limit the
* depth of nested views.
+ * @param relationToLogicalPlanMaps The UnresolvedRelation to LogicalPlan
mapping, this can ensure
+ * that the table is resolved only once if a
table is used
+ * multiple times in a query.
*/
case class AnalysisContext(
defaultDatabase: Option[String] = None,
- nestedViewDepth: Int = 0)
+ nestedViewDepth: Int = 0,
+ relationToLogicalPlanMaps: mutable.Map[UnresolvedRelation, LogicalPlan] =
mutable.Map.empty)
Review comment:
and it's simpler to use `Seq[String]` as key.
----------------------------------------------------------------
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]