alamb commented on code in PR #7291:
URL: https://github.com/apache/arrow-datafusion/pull/7291#discussion_r1298663755
##########
datafusion/sql/src/statement.rs:
##########
@@ -706,13 +713,18 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
/// Generate a plan for EXPLAIN ... that will print out a plan
///
- fn explain_statement_to_plan(
+ /// Note this is the sqlparser explain statement, not the
+ /// datafusion `EXPLAIN` statement.
+ fn explain_to_plan(
&self,
verbose: bool,
analyze: bool,
- statement: Statement,
+ statement: DFStatement,
) -> Result<LogicalPlan> {
- let plan = self.sql_statement_to_plan(statement)?;
+ let plan = self.statement_to_plan(statement)?;
+ if matches!(plan, LogicalPlan::Explain(_)) {
+ return plan_err!("Nested explain not supported");
Review Comment:
👍 in 5c46949ea
##########
datafusion/sql/src/statement.rs:
##########
@@ -706,13 +713,18 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
/// Generate a plan for EXPLAIN ... that will print out a plan
///
- fn explain_statement_to_plan(
+ /// Note this is the sqlparser explain statement, not the
+ /// datafusion `EXPLAIN` statement.
+ fn explain_to_plan(
&self,
verbose: bool,
analyze: bool,
- statement: Statement,
+ statement: DFStatement,
) -> Result<LogicalPlan> {
- let plan = self.sql_statement_to_plan(statement)?;
+ let plan = self.statement_to_plan(statement)?;
+ if matches!(plan, LogicalPlan::Explain(_)) {
+ return plan_err!("Nested explain not supported");
Review Comment:
👍 in 5c46949ea
--
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]