aharpervc commented on code in PR #1810: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1810#discussion_r2063813313
########## src/parser/mod.rs: ########## @@ -5256,14 +5256,19 @@ impl<'a> Parser<'a> { pub fn parse_create_trigger( &mut self, + or_alter: bool, or_replace: bool, is_constraint: bool, ) -> Result<Statement, ParserError> { - if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect) { + if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect | MsSqlDialect) { self.prev_token(); return self.expected("an object type after CREATE", self.peek_token()); } + if dialect_of!(self is MsSqlDialect) { + return self.parse_mssql_create_trigger(or_alter, or_replace, is_constraint); + } Review Comment: That seems tricky. Can you help me understand what that code would look like? parse_create_trigger is happening inside a complicated branch of parse_create, so it seems like that logic from src/parser/mod.rs would need to be copy/pasted to src/dialect/mssql.rs which seems unfortunate. Otherwise I don't know how to have the dialect's parse_statement implement custom logic only for "create trigger" but not for all the other "create xxx"'s -- 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