cloud-fan commented on a change in pull request #30666:
URL: https://github.com/apache/spark/pull/30666#discussion_r540157241



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -810,21 +825,36 @@ class SessionCatalog(
       // The relation is a view, so we wrap the relation by:
       // 1. Add a [[View]] operator over the relation to keep track of the 
view desc;
       // 2. Wrap the logical plan in a [[SubqueryAlias]] which tracks the name 
of the view.
-      val child = View.fromCatalogTable(metadata, isTempView = false, parser)
+      val child = fromCatalogTable(metadata, isTempView = false, parser)
       SubqueryAlias(multiParts, child)
     } else {
       SubqueryAlias(multiParts, UnresolvedCatalogRelation(metadata, options))
     }
   }
 
-  def getTempViewPlan(plan: LogicalPlan): LogicalPlan = {
+  private def getTempViewPlan(plan: LogicalPlan): LogicalPlan = {
     plan match {
       case viewInfo: TemporaryViewRelation =>
-        View.fromCatalogTable(viewInfo.tableMeta, isTempView = true, parser)
+        fromCatalogTable(viewInfo.tableMeta, isTempView = true, parser)
       case v => v
     }
   }
 
+  private def fromCatalogTable(
+      metadata: CatalogTable, isTempView: Boolean, parser: ParserInterface): 
View = {

Review comment:
       nit: we don't need to pass `parser` now.




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

Reply via email to