rdblue commented on code in PR #9510:
URL: https://github.com/apache/iceberg/pull/9510#discussion_r1468936762


##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteViewCommands.scala:
##########
@@ -60,17 +63,23 @@ case class RewriteViewCommands(spark: SparkSession) extends 
Rule[LogicalPlan] wi
         properties = properties,
         allowExisting = allowExisting,
         replace = replace)
+
+    case a@AlterViewAs(ResolvedV2View(_, ident, _), _, query) =>

Review Comment:
   I don't like that this depends on the next case running before this one. I 
think that I would combine the two.
   
   I think this should be:
   
   ```scala
       case a@AlterViewAs(ResolvedView(resolved), _, query) =>
         val q = CTESubstitution.apply(query)
         verifyTemporaryObjectsDontExist(ident, q)
         a.copy(child=resolved, query = q)
   ```



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

Reply via email to