hem1891 opened a new pull request #25733: [SPARK-23519][SQL] Backporting to 2.4. Create view should work from query with duplicate output columns URL: https://github.com/apache/spark/pull/25733 **What changes were proposed in this pull request?** Backporting the pullrequest [25570](https://github.com/apache/spark/pull/25570) to branch-2.4 Moving the call for checkColumnNameDuplication out of generateViewProperties. This way we can choose ifcheckColumnNameDuplication will be performed on analyzed or aliased plan without having to pass an additional argument(aliasedPlan) to generateViewProperties. Before the pr column name duplication was performed on the query output of below sql(c1, c1) and the pr makes it perform check on the user provided schema of view definition(c1, c2) **Why are the changes needed?** Changes are to fix SPARK-23519 bug. Below queries would cause an exception. This pr fixes them and also added a test case. `CREATE TABLE t23519 AS SELECT 1 AS c1 CREATE VIEW v23519 (c1, c2) AS SELECT c1, c1 FROM t23519` Does this PR introduce any user-facing change? No **How was this patch tested?** new unit test added in SQLViewSuite
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
