iffyio commented on code in PR #1599:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1599#discussion_r1887260634
##########
src/parser/mod.rs:
##########
@@ -851,7 +851,9 @@ impl<'a> Parser<'a> {
}
pub fn parse_analyze(&mut self) -> Result<Statement, ParserError> {
- self.expect_keyword(Keyword::TABLE)?;
+ if dialect_of!(self is MySqlDialect | DatabricksDialect | HiveDialect
| SnowflakeDialect) {
+ self.expect_keyword(Keyword::TABLE)?;
+ }
Review Comment:
We can add a test case like this one to demonstrate the behavior:
```rust
#[test]
fn parse_analyze() {
verified_stmt("ANALYZE TABLE test_table");
verified_stmt("ANALYZE test_table");
}
```
we can add it to the [sqlparse_common.rs file
here](https://github.com/apache/datafusion-sqlparser-rs/blob/main/tests/sqlparser_common.rs)
--
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]