Skip to content

Commit 09f679d

Browse files
committed
fix(collapsible-if): collapse nested if in substitute_oeq_class per clippy
1 parent 84175a8 commit 09f679d

File tree

1 file changed

+4
-13
lines changed
  • datafusion/physical-expr/src/equivalence/properties

1 file changed

+4
-13
lines changed

datafusion/physical-expr/src/equivalence/properties/mod.rs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -853,20 +853,11 @@ impl EquivalenceProperties {
853853
sort_expr.options,
854854
));
855855
}
856-
} else if let Some(cast_col) =
857-
r_expr.as_any().downcast_ref::<CastColumnExpr>()
856+
} else if let Some(cast_col) = r_expr.as_any().downcast_ref::<CastColumnExpr>()
857+
&& cast_col.expr().eq(&sort_expr.expr)
858+
&& CastExpr::check_bigger_cast(cast_col.target_field().data_type(), &expr_type)
858859
{
859-
if cast_col.expr().eq(&sort_expr.expr)
860-
&& CastExpr::check_bigger_cast(
861-
cast_col.target_field().data_type(),
862-
&expr_type,
863-
)
864-
{
865-
result.push(PhysicalSortExpr::new(
866-
r_expr,
867-
sort_expr.options,
868-
));
869-
}
860+
result.push(PhysicalSortExpr::new(r_expr, sort_expr.options));
870861
}
871862
}
872863
result.push(sort_expr);

0 commit comments

Comments
 (0)