cloud-fan commented on a change in pull request #31933:
URL: https://github.com/apache/spark/pull/31933#discussion_r602063863
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -96,11 +96,6 @@ case class CreateViewCommand(
}
override def run(sparkSession: SparkSession): Seq[Row] = {
- // If the plan cannot be analyzed, throw an exception and don't proceed.
- val qe = sparkSession.sessionState.executePlan(child)
- qe.assertAnalyzed()
- val analyzedPlan = qe.analyzed
Review comment:
Actually this is a regression. `CreateViewCommand` can be created from
`CreateViewStatement` in `ResolveSessionCatalog`. However,
`ResolveSessionCatalog` is inside `extendedResolutionRules`, which means the
`analyzedPlan` doesn't go through `postHocResolutionRules`.
I think we need to make `CreateViewCommand.analyzedPlan` a real child, so
that it can go through all the analyzer rules.
--
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]