iffyio commented on code in PR #2037: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2037#discussion_r2378344880
########## src/parser/mod.rs: ########## @@ -5605,14 +5609,24 @@ impl<'a> Parser<'a> { } } - self.expect_keyword_is(Keyword::FOR)?; - let include_each = self.parse_keyword(Keyword::EACH); - let trigger_object = - match self.expect_one_of_keywords(&[Keyword::ROW, Keyword::STATEMENT])? { - Keyword::ROW => TriggerObject::Row, - Keyword::STATEMENT => TriggerObject::Statement, - _ => unreachable!(), - }; + let (include_each, trigger_object) = if self.parse_keyword(Keyword::FOR) { + ( + self.parse_keyword(Keyword::EACH), + Some( + match self.expect_one_of_keywords(&[Keyword::ROW, Keyword::STATEMENT])? { + Keyword::ROW => TriggerObject::Row, + Keyword::STATEMENT => TriggerObject::Statement, + _ => unreachable!(), + }, + ), + ) + } else { + if !dialect_of!(self is SQLiteDialect ) { + self.expect_keyword_is(Keyword::FOR)?; + } Review Comment: Seems this comment is unresolved? ideally we want to skip dialect_of checks where possible -- 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