mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-19 22:40:40 +00:00
fix: box Explain node in Statement to reduce stack size (#6661)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -31,7 +31,9 @@ impl ParserContext<'_> {
|
||||
actual: self.peek_token_as_string(),
|
||||
})?;
|
||||
|
||||
Ok(Statement::Explain(Explain::try_from(explain_statement)?))
|
||||
Ok(Statement::Explain(Box::new(Explain::try_from(
|
||||
explain_statement,
|
||||
)?)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +120,6 @@ mod tests {
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(stmts[0], Statement::Explain(explain))
|
||||
assert_eq!(stmts[0], Statement::Explain(Box::new(explain)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ pub enum Statement {
|
||||
// DESCRIBE TABLE
|
||||
DescribeTable(DescribeTable),
|
||||
// EXPLAIN QUERY
|
||||
Explain(Explain),
|
||||
Explain(Box<Explain>),
|
||||
// COPY
|
||||
Copy(Copy),
|
||||
// Telemetry Query Language
|
||||
|
||||
Reference in New Issue
Block a user