You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/04 03:15:48 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27444: [SPARK-30614][SQL] The native ALTER COLUMN syntax should change one property at a time

cloud-fan 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_r374455848
 
 

 ##########
 File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -160,7 +160,13 @@ statement
         UNSET TBLPROPERTIES (IF EXISTS)? tablePropertyList             #unsetTableProperties
     | ALTER TABLE table=multipartIdentifier
         (ALTER | CHANGE) COLUMN? column=multipartIdentifier
-        (TYPE dataType)? commentSpec? colPosition?                     #alterTableColumn
+        TYPE dataType                                                  #alterTableColumnType
+    | ALTER TABLE table=multipartIdentifier
 
 Review comment:
   I'd like to make the syntax rule cleaner
   ```
   ALTER TABLE table=multipartIdentifier
     (ALTER | CHANGE) COLUMN? column=multipartIdentifier
     alterColumnAction
   
   alterColumnAction
     : TYPE dataType
     | commentSpec
     | colPosition
     | setOrDrop=(SET | DROP) NOT NULL
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org