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



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CacheTableExec.scala
##########
@@ -86,12 +88,26 @@ case class CacheTableExec(
 case class CacheTableAsSelectExec(
     tempViewName: String,
     query: LogicalPlan,
+    originalText: Option[String],
     override val isLazy: Boolean,
     override val options: Map[String, String]) extends BaseCacheTableExec {
   override lazy val relationName: String = tempViewName
 
   override lazy val planToCache: LogicalPlan = {
-    Dataset.ofRows(sparkSession, query).createTempView(tempViewName)
+    val viewIdent = 
sparkSession.sessionState.sqlParser.parseTableIdentifier(tempViewName)

Review comment:
       The `tempViewName` is already a single-part name produced by the parser, 
 and we shouldn't reparse it. We can just pass in 
`TableIdentifier(tempViewName)`.




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