imback82 commented on a change in pull request #32032:
URL: https://github.com/apache/spark/pull/32032#discussion_r609213767
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CacheTableExec.scala
##########
@@ -94,19 +94,19 @@ case class CacheTableAsSelectExec(
override lazy val relationName: String = tempViewName
override lazy val planToCache: LogicalPlan = {
- Dataset.ofRows(sparkSession,
- CreateViewCommand(
- name = TableIdentifier(tempViewName),
- userSpecifiedColumns = Nil,
- comment = None,
- properties = Map.empty,
- originalText = Some(originalText),
- child = query,
- allowExisting = false,
- replace = false,
- viewType = LocalTempView
- )
- )
+ CreateViewCommand(
+ name = TableIdentifier(tempViewName),
+ userSpecifiedColumns = Nil,
+ comment = None,
+ properties = Map.empty,
+ originalText = Some(originalText),
+ plan = query,
+ allowExisting = false,
+ replace = false,
+ viewType = LocalTempView,
+ isAnalyzed = true
+ ).run(sparkSession)
Review comment:
We can just call `run` now that the `plan` is analyzed; no need to go
thru `Dataset.ofRows`.
--
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]