@@ -70,6 +70,7 @@ impl ChildPushdownState {
7070 }
7171}
7272
73+ /// See [`pushdown_filters`] for more details.
7374fn push_down_into_children (
7475 node : & Arc < dyn ExecutionPlan > ,
7576 filters : & [ Arc < dyn PhysicalExpr > ] ,
@@ -78,7 +79,7 @@ fn push_down_into_children(
7879 let mut new_children = Vec :: with_capacity ( children. len ( ) ) ;
7980 let mut filter_pushdown_result = vec ! [ ChildPushdownState :: NoChild ; filters. len( ) ] ;
8081 for child in children {
81- if let Some ( result) = pushdown_filters ( child, & filters) ? {
82+ if let Some ( result) = pushdown_filters ( child, filters) ? {
8283 new_children. push ( result. inner ) ;
8384 for ( idx, support) in result. support . iter ( ) . enumerate ( ) {
8485 filter_pushdown_result[ idx] =
@@ -126,7 +127,7 @@ fn pushdown_filters(
126127 // These are the filters the current node "owns" or "produces" and wants to push down.
127128 let node_filters = node. filters_for_pushdown ( ) ?;
128129 // Check which nodes from parents this node is okay with us trying to push down to it's children.
129- let parent_pushdown_request_result = node. filter_pushdown_request ( & parent_filters) ?;
130+ let parent_pushdown_request_result = node. filter_pushdown_request ( parent_filters) ?;
130131 // Do some index masking so that we only ever call nodes with the filters relevant to them / that they're allowed to touch.
131132 // But we still need to reconstruct the full result for our caller.
132133 let parent_filter_for_pushdown_indices = parent_pushdown_request_result
@@ -147,7 +148,7 @@ fn pushdown_filters(
147148 let all_filters_to_push_down = node_filters
148149 . iter ( )
149150 . chain ( parent_filters_to_push_down. iter ( ) )
150- . map ( |f| Arc :: clone ( f ) )
151+ . map ( Arc :: clone)
151152 . collect :: < Vec < _ > > ( ) ;
152153 // Push down into children
153154 let child_pushdown_result = push_down_into_children ( node, & all_filters_to_push_down) ?;
@@ -484,7 +485,6 @@ impl PhysicalOptimizerRule for FilterPushdown {
484485 _config : & ConfigOptions ,
485486 ) -> Result < Arc < dyn ExecutionPlan > > {
486487 if let Some ( result) = pushdown_filters ( & plan, & [ ] ) ? {
487- println ! ( "new plan: {:?}" , result. inner) ;
488488 Ok ( result. inner )
489489 } else {
490490 Ok ( plan)
0 commit comments