viirya commented on a change in pull request #25570: [SPARK-23519][SQL] create 
view should work from query with duplicate output columns
URL: https://github.com/apache/spark/pull/25570#discussion_r317339763
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
 ##########
 @@ -363,11 +374,6 @@ object ViewHelper {
       analyzedPlan: LogicalPlan): Map[String, String] = {
     val queryOutput = analyzedPlan.schema.fieldNames
 
-    // Generate the query column names, throw an AnalysisException if there 
exists duplicate column
-    // names.
-    SchemaUtils.checkColumnNameDuplication(
-      queryOutput, "in the view definition", 
session.sessionState.conf.resolver)
 
 Review comment:
   Why not make change here? Let checkColumnNameDuplication check the output of 
aliasedPlan?

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

Reply via email to