You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/19 23:00:46 UTC

[GitHub] [spark] imback82 commented on a change in pull request #31906: [SPARK-34700][SQL] SessionCatalog's temporary view related APIs should take/return more concrete types

imback82 commented on a change in pull request #31906:
URL: https://github.com/apache/spark/pull/31906#discussion_r598013914



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -834,21 +819,9 @@ class SessionCatalog(
     }
   }
 
-  private def getTempViewPlan(plan: LogicalPlan): LogicalPlan = {
-    plan match {
-      case TemporaryViewRelation(tableMeta, None) =>
-        fromCatalogTable(tableMeta, isTempView = true)
-      case TemporaryViewRelation(tableMeta, Some(plan)) =>
-        View(desc = tableMeta, isTempView = true, child = plan)
-      case other => other
-    }
-  }
-
-  def getTempViewSchema(plan: LogicalPlan): StructType = {

Review comment:
       This is only called from `SparkGetColumnsOperation.scala` and now that a raw temp plan always has `CatalogTable`, the caller can just directly get the schema from the raw plan, and I don't see a reason to expose this as a `def`. Check `SparkGetColumnsOperation.scala` changes below.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org