-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: display the content of debug explain #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -329,11 +329,11 @@ impl LogicalPlan { | |
| LogicalPlan::Limit { input, .. } => vec![input], | ||
| LogicalPlan::Extension { node } => node.inputs(), | ||
| LogicalPlan::Union { inputs, .. } => inputs.iter().collect(), | ||
| LogicalPlan::Explain { plan, .. } => vec![plan], | ||
| // plans without inputs | ||
| LogicalPlan::TableScan { .. } | ||
| | LogicalPlan::EmptyRelation { .. } | ||
| | LogicalPlan::CreateExternalTable { .. } | ||
| | LogicalPlan::Explain { .. } => vec![], | ||
| | LogicalPlan::CreateExternalTable { .. } => vec![], | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -438,11 +438,11 @@ impl LogicalPlan { | |
| } | ||
| true | ||
| } | ||
| LogicalPlan::Explain { plan, .. } => plan.accept(visitor)?, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the fix that enables LogicalPlan's |
||
| // plans without inputs | ||
| LogicalPlan::TableScan { .. } | ||
| | LogicalPlan::EmptyRelation { .. } | ||
| | LogicalPlan::CreateExternalTable { .. } | ||
| | LogicalPlan::Explain { .. } => true, | ||
| | LogicalPlan::CreateExternalTable { .. } => true, | ||
| }; | ||
| if !recurse { | ||
| return Ok(false); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,6 +234,10 @@ fn split_members<'a>(predicate: &'a Expr, predicates: &mut Vec<&'a Expr>) { | |
|
|
||
| fn optimize(plan: &LogicalPlan, mut state: State) -> Result<LogicalPlan> { | ||
| match plan { | ||
| LogicalPlan::Explain { .. } => { | ||
| // push the optimization to the plan of this explain | ||
| push_down(&state, plan) | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is related to the fix to propagate the optimization down |
||
| LogicalPlan::Filter { input, predicate } => { | ||
| let mut predicates = vec![]; | ||
| split_members(predicate, &mut predicates); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fix that progpagates the optimization down the plan explain