szehon-ho opened a new pull request, #51107: URL: https://github.com/apache/spark/pull/51107
### What changes were proposed in this pull request? When a View is created, ex CREATE VIEW v (a1 INT, a2 STRING) AS select c1, c2, it needs to save both set of columns (alias and query output). 1. Alias is saved as View Schema (a1 INT, b2 STRING). 2. Query output is saved as Table property w/index (c1, 0) (c2, 1) In the new Schema Evolution mode, we never allow alias, so view schema == view query output schema. Every time we detect the output view schema changes, we sync the view's schema with view query schema, keeping the invariant. So we can simplify the update in Schema Evolution mode to not update the table properties, and instead rely on the View Schema all the time. ### Why are the changes needed? View Schema evolution is a useful mode. However, it requires a lot of permissions on the user querying the view, because that user needs to update the View definition. It will simplify auth if we do not have to update the properties too (which could be admin-level properties), and reduce the update to only the schema. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing unit test ### Was this patch authored or co-authored using generative AI tooling? No -- 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]
