imback82 commented on a change in pull request #31652:
URL: https://github.com/apache/spark/pull/31652#discussion_r589544449
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -268,30 +268,32 @@ case class AlterViewAsCommand(
name: TableIdentifier,
originalText: String,
query: LogicalPlan) extends RunnableCommand {
+ require(query.resolved)
import ViewHelper._
override def innerChildren: Seq[QueryPlan[_]] = Seq(query)
override def run(session: SparkSession): Seq[Row] = {
- // If the plan cannot be analyzed, throw an exception and don't proceed.
- val qe = session.sessionState.executePlan(query)
- qe.assertAnalyzed()
- val analyzedPlan = qe.analyzed
Review comment:
We cannot yet because of the following:
https://github.com/apache/spark/blob/f340857757034ac955862b34e60322ca5ee81758/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CacheTableExec.scala#L96-L105
Here, `query` is not resolved yet. I will get to this though.
----------------------------------------------------------------
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]