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


##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckViews.scala:
##########
@@ -36,6 +38,9 @@ object CheckViews extends (LogicalPlan => Unit) {
         verifyColumnCount(ident, columnAliases, query)
         SchemaUtils.checkColumnNameDuplication(query.schema.fieldNames, 
SQLConf.get.resolver)
 
+        case AlterViewAs(ResolvedV2View(_, _, _), _, query) =>
+          SchemaUtils.checkColumnNameDuplication(query.schema.fieldNames, 
SQLConf.get.resolver)

Review Comment:
   To summarize this topic, we discussed this offline and decided that we 
should not support `ALTER VIEW ... AS` for now and rather throw an exception 
(indicating to use `CREATE OR REPLACE VIEW`), as it leads to surprising 
behaviors that column aliases/comments are lost after updating the underlying 
SQL.



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