Skip to content

Commit de35320

Browse files
committed
fix sqllogictest
1 parent f55a332 commit de35320

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

datafusion/physical-optimizer/src/limited_distinct_aggregation.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::sync::Arc;
2222

2323
use datafusion_physical_plan::aggregates::AggregateExec;
2424
use datafusion_physical_plan::limit::{GlobalLimitExec, LocalLimitExec};
25+
use datafusion_physical_plan::projection::ProjectionExec;
2526
use datafusion_physical_plan::{ExecutionPlan, ExecutionPlanProperties};
2627

2728
use datafusion_common::config::ConfigOptions;
@@ -136,7 +137,9 @@ impl LimitedDistinctAggregation {
136137
}
137138
}
138139
}
139-
rewrite_applicable = false;
140+
if matches!(plan.as_any().downcast_ref::<ProjectionExec>(), None) {
141+
rewrite_applicable = false;
142+
}
140143
Ok(Transformed::no(plan))
141144
};
142145
let child = child.to_owned().transform_down(closure).data().ok()?;

0 commit comments

Comments
 (0)