Skip to content

Commit f1bcd9b

Browse files
committed
Fix clippy
Signed-off-by: Adam Gutglick <[email protected]>
1 parent 5c851c7 commit f1bcd9b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

vortex-datafusion/src/convert/exprs.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ pub(crate) fn make_vortex_predicate(
3232
.iter()
3333
.filter_map(|e| {
3434
if is_dynamic_physical_expr(e) {
35-
let e = snapshot_physical_expr(e.clone()).expect("do");
36-
match Expression::try_from_df(e.as_ref()) {
37-
Ok(e) => Some(Ok(e)),
38-
Err(_) => {
39-
// If we fail to convert the expression to Vortex, its safe
40-
// to drop it as we don't declare it as pushed down
41-
None
35+
snapshot_physical_expr(e.clone()).ok().and_then(|e| {
36+
match Expression::try_from_df(e.as_ref()) {
37+
Ok(e) => Some(Ok(e)),
38+
Err(_) => {
39+
// If we fail to convert the expression to Vortex, its safe
40+
// to drop it as we don't declare it as pushed down
41+
None
42+
}
4243
}
43-
}
44+
})
4445
} else {
4546
Some(Expression::try_from_df(e.as_ref()))
4647
}

vortex-datafusion/src/persistent/opener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ impl FileOpener for VortexOpener {
295295
.and_then(|f| {
296296
let exprs = split_conjunction(&f)
297297
.into_iter()
298-
.cloned()
299298
.filter(|expr| {
300299
is_dynamic_physical_expr(expr)
301300
|| can_be_pushed_down(expr, &predicate_file_schema)
302301
})
302+
.cloned()
303303
.collect::<Vec<_>>();
304304

305305
make_vortex_predicate(&exprs).transpose()

0 commit comments

Comments
 (0)