File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
vortex-datafusion/src/persistent Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -244,22 +244,23 @@ impl FileSource for VortexSource {
244244 . collect :: < Vec < _ > > ( ) ;
245245
246246 // We keep expressions we can push down dynamic expression that will be evaluated on a best-effort basis.
247- let filters = filters
248- . into_iter ( )
247+ let saved_filters = filters
248+ . iter ( )
249249 . filter ( |expr| can_be_pushed_down ( expr, schema) || is_dynamic_physical_expr ( expr) )
250+ . cloned ( )
250251 . collect :: < Vec < _ > > ( ) ;
251252
252253 // If we don't push down any filter, we don't need to update the plan's node.
253- if filters . is_empty ( ) {
254+ if saved_filters . is_empty ( ) {
254255 return Ok ( FilterPushdownPropagation :: with_parent_pushdown_result (
255256 vec ! [ PushedDown :: No ; filters. len( ) ] ,
256257 ) ) ;
257258 }
258259
259260 // Combine new filters with existing predicate. We keep the whole original expression
260261 source. predicate = match source. predicate {
261- Some ( predicate) => Some ( conjunction ( std:: iter:: once ( predicate) . chain ( filters ) ) ) ,
262- None => Some ( conjunction ( filters ) ) ,
262+ Some ( predicate) => Some ( conjunction ( std:: iter:: once ( predicate) . chain ( saved_filters ) ) ) ,
263+ None => Some ( conjunction ( saved_filters ) ) ,
263264 } ;
264265
265266 Ok (
You can’t perform that action at this time.
0 commit comments