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_r374346923
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DDLParserSuite.scala
 ##########
 @@ -646,19 +646,6 @@ class DDLParserSuite extends AnalysisTest {
         Some(first())))
   }
 
-  test("alter table: update column type, comment and position") {
-    comparePlans(
-      parsePlan("ALTER TABLE table_name CHANGE COLUMN a.b.c " +
-        "TYPE bigint COMMENT 'new comment' AFTER d"),
 
 Review comment:
   Note that this now matches HIVE style alter column:
   ```
   ALTER TABLE table [PARTITION partition_spec]
      CHANGE [COLUMN] column_old_name column_new_name column_dataType
      [COMMENT column_comment]
      [FIRST | AFTER column_name];
   ```
   And reports `ParseException: Renaming column is not supported in Hive-style 
ALTER COLUMN, please run RENAME COLUMN instead.` because `TYPE` is parsed as a 
new name.
   
   So I changed `CHANGE COLUMN` to `ALTER COLUMN` for testing invalid parsing.

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