@@ -85,7 +85,7 @@ statement
85
85
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName) KW_SET KW_TBLPROPERTIES propertyList # setTableProperties
86
86
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName) KW_UNSET KW_TBLPROPERTIES (ifExists)? propertyList # unsetTableProperties
87
87
| KW_ALTER KW_TABLE table=tableName (KW_ALTER | KW_CHANGE ) KW_COLUMN ? column=columnName alterColumnAction? # alterTableAlterColumn
88
- | KW_ALTER KW_TABLE table=tableName partitionSpec? KW_CHANGE KW_COLUMN ? colName=columnName colType colPosition? # hiveChangeColumn
88
+ | KW_ALTER KW_TABLE table=tableName partitionSpec? KW_CHANGE KW_COLUMN ? colName=columnName columnType colPosition? # hiveChangeColumn
89
89
| KW_ALTER KW_TABLE table=tableName partitionSpec? KW_REPLACE KW_COLUMNS LEFT_PAREN qualifiedColTypeWithPositionSeqForReplace RIGHT_PAREN #
90
90
hiveReplaceColumns
91
91
| KW_ALTER KW_TABLE tableName (partitionSpec)? KW_SET KW_SERDE stringLit (
@@ -153,8 +153,8 @@ statement
153
153
| (KW_DESC | KW_DESCRIBE) KW_DATABASE KW_EXTENDED? namespaceName # describeNamespace
154
154
| (KW_DESC | KW_DESCRIBE) KW_TABLE? option=(KW_EXTENDED | KW_FORMATTED)? tableName partitionSpec? describeColName? # describeRelation
155
155
| (KW_DESC | KW_DESCRIBE) KW_QUERY? query # describeQuery
156
- | KW_COMMENT KW_ON namespace namespaceName KW_IS comment # commentNamespace
157
- | KW_COMMENT KW_ON KW_TABLE tableName KW_IS comment # commentTable
156
+ | KW_COMMENT KW_ON namespace namespaceName KW_IS commentStr # commentNamespace
157
+ | KW_COMMENT KW_ON KW_TABLE tableName KW_IS commentStr # commentTable
158
158
| KW_REFRESH KW_TABLE tableName # refreshTable
159
159
| KW_REFRESH KW_FUNCTION functionName # refreshFunction
160
160
| KW_REFRESH (stringLit | .*?) # refreshResource
@@ -269,7 +269,7 @@ locationSpec
269
269
;
270
270
271
271
commentSpec
272
- : KW_COMMENT stringLit
272
+ : KW_COMMENT comment= stringLit
273
273
;
274
274
275
275
query
@@ -851,7 +851,7 @@ functionTable
851
851
;
852
852
853
853
tableAlias
854
- : (KW_AS ? strictIdentifier identifierList?)?
854
+ : (KW_AS ? alias= strictIdentifier identifierList?)?
855
855
;
856
856
857
857
rowFormat
@@ -905,7 +905,7 @@ partitionFieldList
905
905
906
906
partitionField
907
907
: transform
908
- | colType
908
+ | columnType
909
909
;
910
910
911
911
transform
@@ -1227,10 +1227,10 @@ variableDefaultExpression
1227
1227
;
1228
1228
1229
1229
colTypeList
1230
- : colType (COMMA colType )*
1230
+ : columnType (COMMA columnType )*
1231
1231
;
1232
1232
1233
- colType
1233
+ columnType
1234
1234
: colName=errorCapturingIdentifier dataType (KW_NOT KW_NULL)? commentSpec?
1235
1235
;
1236
1236
@@ -1239,7 +1239,7 @@ createOrReplaceTableColTypeList
1239
1239
;
1240
1240
1241
1241
createOrReplaceTableColType
1242
- : colName=columnNameCreate dataType colDefinitionOption*
1242
+ : colName=columnNameCreate colType= dataType colDefinitionOption*
1243
1243
;
1244
1244
1245
1245
colDefinitionOption
@@ -1388,7 +1388,7 @@ stringLit
1388
1388
| DOUBLEQUOTED_STRING
1389
1389
;
1390
1390
1391
- comment
1391
+ commentStr
1392
1392
: stringLit
1393
1393
| KW_NULL
1394
1394
;
0 commit comments