invm commented on code in PR #1734: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1734#discussion_r1965349013
########## src/parser/mod.rs: ########## @@ -4970,14 +4970,19 @@ impl<'a> Parser<'a> { /// DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ] /// ``` pub fn parse_drop_trigger(&mut self) -> Result<Statement, ParserError> { - if !dialect_of!(self is PostgreSqlDialect | GenericDialect) { + if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect) { self.prev_token(); return self.expected("an object type after DROP", self.peek_token()); } let if_exists = self.parse_keywords(&[Keyword::IF, Keyword::EXISTS]); let trigger_name = self.parse_object_name(false)?; - self.expect_keyword_is(Keyword::ON)?; - let table_name = self.parse_object_name(false)?; + let table_name = match dialect_of!(self is PostgreSqlDialect | GenericDialect) { + true => { + self.expect_keyword_is(Keyword::ON)?; + Some(self.parse_object_name(false)?) + } + false => None, + }; Review Comment: Hiya! Yes, it does conflict, thats why the `ON` keyword is skipped for mysql. This is the definition from their docs: `DROP TRIGGER [IF EXISTS] [schema_name.]trigger_name` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org