szehon-ho commented on code in PR #51107:
URL: https://github.com/apache/spark/pull/51107#discussion_r2133422167


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala:
##########
@@ -727,9 +716,16 @@ object ViewSyncSchemaToMetaStore extends (LogicalPlan => 
Unit) {
           }
           
SchemaUtils.checkColumnNameDuplication(fieldNames.toImmutableArraySeq,
             session.sessionState.conf.resolver)
-          val updatedViewMeta = metaData.copy(
-            properties = newProperties,
-            schema = newSchema)
+          val updatedViewMeta =
+            if (viewSchemaMode == SchemaEvolution) {
+              metaData.copy(

Review Comment:
   Note:  we already seem to use the ViewSchema directly in the table 
resolution for SchemaEvolution mode:  
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala#L991
  iiuc



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to