cloud-fan commented on code in PR #47272:
URL: https://github.com/apache/spark/pull/47272#discussion_r1681168219
##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -251,26 +258,29 @@ statement
| (MSCK)? REPAIR TABLE identifierReference
(option=(ADD|DROP|SYNC) PARTITIONS)?
#repairTable
| op=(ADD | LIST) identifier .*?
#manageResource
- | SET COLLATION collationName=identifier
#setCollation
- | SET ROLE .*?
#failNativeCommand
+ | CREATE INDEX (IF errorCapturingNot EXISTS)? identifier ON TABLE?
+ identifierReference (USING indexType=identifier)?
+ LEFT_PAREN columns=multipartIdentifierPropertyList RIGHT_PAREN
+ (OPTIONS options=propertyList)?
#createIndex
+ | DROP INDEX (IF EXISTS)? identifier ON TABLE? identifierReference
#dropIndex
+ | unsupportedHiveNativeCommands .*?
#failNativeCommand
+ ;
+
+setResetStatement
+ : SET COLLATION collationName=identifier
#setCollation
+ | SET ROLE .*?
#failSetRole
| SET TIME ZONE interval
#setTimeZone
| SET TIME ZONE timezone
#setTimeZone
| SET TIME ZONE .*?
#setTimeZone
| SET (VARIABLE | VAR) assignmentList
#setVariable
| SET (VARIABLE | VAR) LEFT_PAREN multipartIdentifierList RIGHT_PAREN EQ
- LEFT_PAREN query RIGHT_PAREN
#setVariable
+ LEFT_PAREN query RIGHT_PAREN
#setVariable
Review Comment:
Sorry I take it back. The first option isn't valid as once we fail in the
`AstBuilder`, we can't go to the next parser rule.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]