iffyio commented on code in PR #1614: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1614#discussion_r1896659962
########## src/parser/mod.rs: ########## @@ -9604,7 +9604,13 @@ impl<'a> Parser<'a> { top = Some(self.parse_top()?); } - let projection = self.parse_projection()?; + let projection = if dialect_of!(self is PostgreSqlDialect | GenericDialect) + && self.peek_keyword(Keyword::FROM) + { + vec![] + } else { + self.parse_projection()? + }; Review Comment: ah yeah we could probably use an enum to represent the variants, something like? ```rust enum LockTableKind { TABLE TABLES } Statement::LockTable { table_kind: Option<LockTableKind> } ``` see [TableSampleKind](https://github.com/apache/datafusion-sqlparser-rs/blob/main/src/ast/query.rs#L1009) for example -- 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