File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ impl FileSource for ParquetSource {
613
613
614
614
let mut source = self . clone ( ) ;
615
615
let filters = PredicateSupports :: new_with_supported_check ( filters, |filter| {
616
- pushdown_filters && can_expr_be_pushed_down_with_schemas ( filter, & file_schema)
616
+ can_expr_be_pushed_down_with_schemas ( filter, & file_schema)
617
617
} ) ;
618
618
if filters. is_all_unsupported ( ) {
619
619
// No filters can be pushed down, so we can just return the remaining filters
@@ -629,6 +629,12 @@ impl FileSource for ParquetSource {
629
629
} ;
630
630
source. predicate = Some ( predicate) ;
631
631
let source = Arc :: new ( source) ;
632
+ // If pushdown_filters is false we tell our parents that they still have to handle the filters,
633
+ // even if we updated the predicate to include the filters (they will only be used for stats pruning).
634
+ if !pushdown_filters {
635
+ return Ok ( FilterPushdownPropagation :: with_filters ( filters. make_unsupported ( ) )
636
+ . with_updated_node ( source) ) ;
637
+ }
632
638
Ok ( FilterPushdownPropagation :: with_filters ( filters) . with_updated_node ( source) )
633
639
}
634
640
}
Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ pub enum PredicateSupport {
31
31
Unsupported ( Arc < dyn PhysicalExpr > ) ,
32
32
}
33
33
34
+ impl PredicateSupport {
35
+ pub fn into_inner ( self ) -> Arc < dyn PhysicalExpr > {
36
+ match self {
37
+ PredicateSupport :: Supported ( expr) | PredicateSupport :: Unsupported ( expr) => expr,
38
+ }
39
+ }
40
+ }
41
+
34
42
/// A thin wrapper around [`PredicateSupport`]s that allows for easy collection of
35
43
/// supported and unsupported filters. Inner vector stores each predicate for one node.
36
44
#[ derive( Debug , Clone ) ]
You can’t perform that action at this time.
0 commit comments