imback82 commented on a change in pull request #27444: [SPARK-30614][SQL] The 
native ALTER COLUMN syntax should change one property at a time
URL: https://github.com/apache/spark/pull/27444#discussion_r375024492
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -89,20 +85,23 @@ class ResolveSessionCatalog(
             throw new AnalysisException("" +
               "ALTER COLUMN ... FIRST | ALTER is only supported with v2 
tables.")
           }
+
+          val colName = a.column(0)
+          val dataType = a.dataType.getOrElse(v1Table.schema(colName).dataType)
 
 Review comment:
   Sure.
   
   I noticed that we are not considering case sensitivities in v2 tables 
either: 
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala#L432.
 I can do a follow up PR for this  if needed. 

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