You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_ => internal_err!("Interval arithmetic does not support the operator {op}"),
}
Seems like this should just be added?
To Reproduce
#[test]fntest_evaluate_bounds_bool() -> Result<()>{let schema = Schema::new(vec![Field::new("a",DataType::Boolean,false),Field::new("b",DataType::Boolean,false),]);let a = Arc::new(Column::new("a",0))as_;let b = Arc::new(Column::new("b",1))as_;// Test OR bounds - currently not workinglet or_expr = binary_expr(Arc::clone(&a),Operator::Or,Arc::clone(&b),&schema)?;let or_bounds = or_expr.evaluate_bounds(&[&Interval::make(Some(true),Some(true))?,&Interval::make(Some(false),Some(false))?,])?;assert_eq!(or_bounds,Interval::make(Some(true),Some(true))?);// Test AND bounds - working finelet and_expr =
binary_expr(Arc::clone(&a),Operator::And,Arc::clone(&b),&schema)?;let and_bounds = and_expr.evaluate_bounds(&[&Interval::make(Some(true),Some(true))?,&Interval::make(Some(false),Some(false))?,])?;assert_eq!(and_bounds,Interval::make(Some(false),Some(false))?);Ok(())}
Expected behavior
Looks like this test should pass.
Additional context
I have a PR to fix, will submit shortly.
The text was updated successfully, but these errors were encountered:
Describe the bug
Originally requested in #7883, which got closed by #8276
Looks like that PR added support to
OR
topropagate_constraints
but missed OR out ofapply_operator
(which is used byevaluate_bounds
) -datafusion/datafusion/expr/src/interval_arithmetic.rs
Lines 773 to 787 in e9b9645
Seems like this should just be added?
To Reproduce
Expected behavior
Looks like this test should pass.
Additional context
I have a PR to fix, will submit shortly.
The text was updated successfully, but these errors were encountered: