File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
datafusion/physical-optimizer/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ use std::sync::Arc;
2222
2323use datafusion_physical_plan:: aggregates:: AggregateExec ;
2424use datafusion_physical_plan:: limit:: { GlobalLimitExec , LocalLimitExec } ;
25+ use datafusion_physical_plan:: projection:: ProjectionExec ;
2526use datafusion_physical_plan:: { ExecutionPlan , ExecutionPlanProperties } ;
2627
2728use 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 ( ) ?;
You can’t perform that action at this time.
0 commit comments