rdblue commented on code in PR #9423: URL: https://github.com/apache/iceberg/pull/9423#discussion_r1466925935
########## spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteViewCommands.scala: ########## @@ -40,6 +46,19 @@ case class RewriteViewCommands(spark: SparkSession) extends Rule[LogicalPlan] wi override def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperatorsUp { case DropView(ResolvedView(resolved), ifExists) => DropIcebergView(resolved, ifExists) + + case CreateView(ResolvedView(resolved), userSpecifiedColumns, comment, properties, + Some(queryText), query, allowExisting, replace) => + verifyTemporaryObjectsDontExist(resolved.identifier, query) Review Comment: I think the query needs to have CTE substitution run before running the temporary object check. Otherwise, there could be conflicts between CTE substitution and temporary names. If there is a conflict, the CTE should be used. -- 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. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org