()
| 252 | |
| 253 | #[test] |
| 254 | fn test_negate_comparison() -> Result<()> { |
| 255 | let schema = not_test_schema(); |
| 256 | let simplifier = PhysicalExprSimplifier::new(&schema); |
| 257 | |
| 258 | // NOT(c = 5) -> c != 5 |
| 259 | let not_eq = Arc::new(NotExpr::new(Arc::new(BinaryExpr::new( |
| 260 | col("c", &schema)?, |
| 261 | Operator::Eq, |
| 262 | lit(ScalarValue::Int32(Some(5))), |
| 263 | )))); |
| 264 | let expected = Arc::new(BinaryExpr::new( |
| 265 | col("c", &schema)?, |
| 266 | Operator::NotEq, |
| 267 | lit(ScalarValue::Int32(Some(5))), |
| 268 | )); |
| 269 | assert_not_simplify(&simplifier, not_eq, expected); |
| 270 | |
| 271 | Ok(()) |
| 272 | } |
| 273 | |
| 274 | #[test] |
| 275 | fn test_demorgans_law_and() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…