From b0b160997f0899fd4c3f1911be05b32a3bbba06e Mon Sep 17 00:00:00 2001 From: jayzhan211 Date: Sat, 18 May 2024 14:41:14 +0800 Subject: [PATCH] rm test Signed-off-by: jayzhan211 --- .../src/simplify_expressions/guarantees.rs | 66 ------------------- 1 file changed, 66 deletions(-) diff --git a/datafusion/optimizer/src/simplify_expressions/guarantees.rs b/datafusion/optimizer/src/simplify_expressions/guarantees.rs index c14ea1d1da03c..2ccf93e2d5b32 100644 --- a/datafusion/optimizer/src/simplify_expressions/guarantees.rs +++ b/datafusion/optimizer/src/simplify_expressions/guarantees.rs @@ -261,72 +261,6 @@ mod tests { } } - #[test] - fn test_inequalities_non_null_bounded() { - let guarantees = vec![ - // x ∈ [1, 3] (not null) - ( - col("x"), - NullableInterval::NotNull { - values: Interval::make(Some(1_i32), Some(3_i32)).unwrap(), - }, - ), - // s.y ∈ [1, 3] (not null) - ( - col("s").field("y"), - NullableInterval::NotNull { - values: Interval::make(Some(1_i32), Some(3_i32)).unwrap(), - }, - ), - ]; - - let mut rewriter = GuaranteeRewriter::new(guarantees.iter()); - - // (original_expr, expected_simplification) - let simplified_cases = &[ - (col("x").lt(lit(0)), false), - (col("s").field("y").lt(lit(0)), false), - (col("x").lt_eq(lit(3)), true), - (col("x").gt(lit(3)), false), - (col("x").gt(lit(0)), true), - (col("x").eq(lit(0)), false), - (col("x").not_eq(lit(0)), true), - (col("x").between(lit(0), lit(5)), true), - (col("x").between(lit(5), lit(10)), false), - (col("x").not_between(lit(0), lit(5)), false), - (col("x").not_between(lit(5), lit(10)), true), - ( - Expr::BinaryExpr(BinaryExpr { - left: Box::new(col("x")), - op: Operator::IsDistinctFrom, - right: Box::new(lit(ScalarValue::Null)), - }), - true, - ), - ( - Expr::BinaryExpr(BinaryExpr { - left: Box::new(col("x")), - op: Operator::IsDistinctFrom, - right: Box::new(lit(5)), - }), - true, - ), - ]; - - validate_simplified_cases(&mut rewriter, simplified_cases); - - let unchanged_cases = &[ - col("x").gt(lit(2)), - col("x").lt_eq(lit(2)), - col("x").eq(lit(2)), - col("x").not_eq(lit(2)), - col("x").between(lit(3), lit(5)), - col("x").not_between(lit(3), lit(10)), - ]; - - validate_unchanged_cases(&mut rewriter, unchanged_cases); - } - #[test] fn test_inequalities_non_null_unbounded() { let guarantees = vec![