alamb commented on a change in pull request #759:
URL: https://github.com/apache/arrow-datafusion/pull/759#discussion_r673280244
##########
File path: datafusion/src/optimizer/limit_push_down.rs
##########
@@ -43,25 +42,6 @@ fn limit_push_down(
execution_props: &ExecutionProps,
) -> Result<LogicalPlan> {
match (plan, upper_limit) {
- (
- LogicalPlan::Explain {
- verbose,
- schema,
- plan,
- stringified_plans,
- },
- _,
- ) => {
- let schema = schema.as_ref().to_owned().into();
- optimize_explain(
Review comment:
this is the old style "explain" implementation that needed to be done
for each optimizer for it to correctly show explain plans (and it was missing
from several)
##########
File path: datafusion/src/physical_plan/explain.rs
##########
@@ -115,9 +115,20 @@ impl ExecutionPlan for ExplainExec {
.iter()
.filter(|s| s.should_display(self.verbose));
+ // Identify plans that are not changed
+ let mut prev: Option<&StringifiedPlan> = None;
+
for p in plans_to_print {
type_builder.append_value(p.plan_type.to_string())?;
- plan_builder.append_value(&*p.plan)?;
+ match prev {
+ Some(prev) if !should_show(prev, p) => {
+ plan_builder.append_value("SAME TEXT AS ABOVE")?;
Review comment:
Once I started dumping out all the explain plans, the mount of
replication was enormous, so I also added code to avoid duplication if the
optimizer pass did not make any changes
--
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]