Support parsing EXPLAIN ESTIMATE of Clickhouse (#1605)

Co-authored-by: Kermit <chenjiawei1@xiaohongshu.com>
This commit is contained in:
cjw 2024-12-17 23:03:12 +08:00 committed by GitHub
parent c69839102a
commit 8fcdf48e5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 0 deletions

View file

@ -3239,6 +3239,9 @@ pub enum Statement {
///
/// [SQLite](https://sqlite.org/lang_explain.html)
query_plan: bool,
/// `EXPLAIN ESTIMATE`
/// [Clickhouse](https://clickhouse.com/docs/en/sql-reference/statements/explain#explain-estimate)
estimate: bool,
/// A SQL query that specifies what to explain
statement: Box<Statement>,
/// Optional output format of explain
@ -3471,6 +3474,7 @@ impl fmt::Display for Statement {
verbose,
analyze,
query_plan,
estimate,
statement,
format,
options,
@ -3483,6 +3487,9 @@ impl fmt::Display for Statement {
if *analyze {
write!(f, "ANALYZE ")?;
}
if *estimate {
write!(f, "ESTIMATE ")?;
}
if *verbose {
write!(f, "VERBOSE ")?;