Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Sep 25, 2024
1 parent c32a632 commit b04d8cd
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3465,21 +3465,18 @@ mod tests {
if let Some(column) =
left.as_any().downcast_ref::<phys_expr::Column>()
{
if column.name() == "b" {
if right
if column.name() == "b" && right
.as_any()
.downcast_ref::<phys_expr::Literal>()
.is_some()
{
let new_column =
Arc::new(phys_expr::Column::new("c", column.index()))
as _;
return Arc::new(phys_expr::BinaryExpr::new(
new_column,
*expr.op(),
right.clone(),
));
}
.is_some() {
let new_column =
Arc::new(phys_expr::Column::new("c", column.index()))
as _;
return Arc::new(phys_expr::BinaryExpr::new(
new_column,
*expr.op(),
right.clone(),
));
}
}
}
Expand Down

0 comments on commit b04d8cd

Please sign in to comment.