mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-15 08:19:08 +00:00
MySQL: Support EXPLAIN ANALYZE
format variants (#1945)
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
This commit is contained in:
parent
40bbcc9834
commit
23f40cdc40
3 changed files with 47 additions and 7 deletions
|
@ -5674,6 +5674,14 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn parse_analyze_format_kind(&mut self) -> Result<AnalyzeFormatKind, ParserError> {
|
||||
if self.consume_token(&Token::Eq) {
|
||||
Ok(AnalyzeFormatKind::Assignment(self.parse_analyze_format()?))
|
||||
} else {
|
||||
Ok(AnalyzeFormatKind::Keyword(self.parse_analyze_format()?))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_analyze_format(&mut self) -> Result<AnalyzeFormat, ParserError> {
|
||||
let next_token = self.next_token();
|
||||
match &next_token.token {
|
||||
|
@ -11074,7 +11082,7 @@ impl<'a> Parser<'a> {
|
|||
analyze = self.parse_keyword(Keyword::ANALYZE);
|
||||
verbose = self.parse_keyword(Keyword::VERBOSE);
|
||||
if self.parse_keyword(Keyword::FORMAT) {
|
||||
format = Some(self.parse_analyze_format()?);
|
||||
format = Some(self.parse_analyze_format_kind()?);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue