Skip to content

Commit

Permalink
fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordworms committed Nov 14, 2024
1 parent 002be84 commit ca627a0
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions datafusion/physical-plan/src/joins/dynamic_filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,24 +205,27 @@ impl DynamicFilterInfo {
None,
)) as Arc<dyn PhysicalExpr>
} else {
let (min_value, max_value) =
value_range.clone().ok_or_else(|| {
DataFusionError::Internal("Missing range values".to_string())
})?;

Arc::new(BinaryExpr::new(
Arc::new(BinaryExpr::new(
Arc::new(Literal::new(min_value)),
Operator::LtEq,
Arc::<Column>::clone(column),
)),
Operator::And,
Arc::new(BinaryExpr::new(
Arc::<Column>::clone(column),
Operator::LtEq,
Arc::new(Literal::new(max_value)),
)),
)) as Arc<dyn PhysicalExpr>
match value_range {
Some((min_value, max_value)) => Arc::new(BinaryExpr::new(
Arc::new(BinaryExpr::new(
Arc::new(Literal::new(min_value.clone())),
Operator::LtEq,
Arc::<Column>::clone(column),
)),
Operator::And,
Arc::new(BinaryExpr::new(
Arc::<Column>::clone(column),
Operator::LtEq,
Arc::new(Literal::new(max_value.clone())),
)),
))
as Arc<dyn PhysicalExpr>,
None => Arc::new(BinaryExpr::new(
Arc::new(Literal::new(ScalarValue::Boolean(Some(true)))),
Operator::Eq,
Arc::new(Literal::new(ScalarValue::Boolean(Some(true)))),
)) as Arc<dyn PhysicalExpr>,
}
};

match acc {
Expand Down

0 comments on commit ca627a0

Please sign in to comment.