Skip to content

Commit

Permalink
simply expr
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted-Jiang committed Apr 13, 2024
1 parent b2d3641 commit f66cce3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,14 +1261,12 @@ fn build_is_null_column_expr(
required_columns
.null_count_column_expr(col, expr, null_count_field)
.map(|null_count_column_expr| {
// IsNotNull(column) => null_count == row_count
// but use false to prune the whole unit so need add the negate
let equal_expr = Arc::new(phys_expr::BinaryExpr::new(
// IsNotNull(column) => null_count != row_count
Arc::new(phys_expr::BinaryExpr::new(
null_count_column_expr,
Operator::Eq,
Operator::NotEq,
row_count_expr,
));
Arc::new(phys_expr::NotExpr::new(equal_expr)) as _
)) as _
})
.ok()
} else {
Expand Down

0 comments on commit f66cce3

Please sign in to comment.