wangyum commented on a change in pull request #29893:
URL: https://github.com/apache/spark/pull/29893#discussion_r502146835
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -337,8 +337,8 @@ query
;
insertInto
- : INSERT OVERWRITE TABLE? multipartIdentifier (partitionSpec (IF NOT
EXISTS)?)? #insertOverwriteTable
- | INSERT INTO TABLE? multipartIdentifier partitionSpec? (IF NOT EXISTS)?
#insertIntoTable
+ : INSERT OVERWRITE TABLE? multipartIdentifier identifierList?
(partitionSpec (IF NOT EXISTS)?)? #insertOverwriteTable
+ | INSERT INTO TABLE? multipartIdentifier identifierList? partitionSpec?
(IF NOT EXISTS)? #insertIntoTable
Review comment:
Move `identifierList?` to the end? This is the order of Hive:
```sql
hive> SELECT version();
2.3.7 rcb213d88304034393d68cc31a95be24f5aac62b6
hive> CREATE TABLE spark_32976(id int, name string) PARTITIONED BY (part
string);
hive> INSERT INTO spark_32976 PARTITION (part = '1') (name) SELECT 'name1';
hive> SELECT * FROM spark_32976;
NULL name1 1
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]