Skip to content

Commit f2519a0

Browse files
feat: remove deprecated suppors_filter_pushdown and impl supports_filters_pushdown
Deprecated function removed in apache/datafusion#9923
1 parent 366c092 commit f2519a0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/dataset.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,16 @@ impl TableProvider for Dataset {
117117

118118
/// Tests whether the table provider can make use of a filter expression
119119
/// to optimise data retrieval.
120-
fn supports_filter_pushdown(&self, filter: &Expr) -> DFResult<TableProviderFilterPushDown> {
121-
match PyArrowFilterExpression::try_from(filter) {
122-
Ok(_) => Ok(TableProviderFilterPushDown::Exact),
123-
_ => Ok(TableProviderFilterPushDown::Unsupported),
124-
}
120+
fn supports_filters_pushdown(
121+
&self,
122+
filter: &[&Expr],
123+
) -> DFResult<Vec<TableProviderFilterPushDown>> {
124+
filter
125+
.iter()
126+
.map(|&f| match PyArrowFilterExpression::try_from(f) {
127+
Ok(_) => Ok(TableProviderFilterPushDown::Exact),
128+
_ => Ok(TableProviderFilterPushDown::Unsupported),
129+
})
130+
.collect()
125131
}
126132
}

0 commit comments

Comments
 (0)