MCPcopy Create free account
hub / github.com/apache/datafusion / assert_not_simplify

Function assert_not_simplify

datafusion/physical-expr/src/simplifier/mod.rs:133–143  ·  view source on GitHub ↗

Assert that simplifying `input` produces `expected`

(
        simplifier: &PhysicalExprSimplifier,
        input: Arc<dyn PhysicalExpr>,
        expected: Arc<dyn PhysicalExpr>,
    )

Source from the content-addressed store, hash-verified

131
132 /// Assert that simplifying `input` produces `expected`
133 fn assert_not_simplify(
134 simplifier: &PhysicalExprSimplifier,
135 input: Arc<dyn PhysicalExpr>,
136 expected: Arc<dyn PhysicalExpr>,
137 ) {
138 let result = simplifier.simplify(Arc::clone(&input)).unwrap();
139 assert_eq!(
140 &result, &expected,
141 "Simplification should transform:\n input: {input}\n to: {expected}\n got: {result}"
142 );
143 }
144
145 #[test]
146 fn test_simplify() {

Callers 11

test_not_literalFunction · 0.85
test_negate_comparisonFunction · 0.85
test_demorgans_law_andFunction · 0.85
test_demorgans_law_orFunction · 0.85
test_not_of_not_and_notFunction · 0.85
test_not_in_listFunction · 0.85
test_not_not_in_listFunction · 0.85
test_double_not_in_listFunction · 0.85
test_deeply_nested_notFunction · 0.85

Calls 1

simplifyMethod · 0.45

Tested by 11

test_not_literalFunction · 0.68
test_negate_comparisonFunction · 0.68
test_demorgans_law_andFunction · 0.68
test_demorgans_law_orFunction · 0.68
test_not_of_not_and_notFunction · 0.68
test_not_in_listFunction · 0.68
test_not_not_in_listFunction · 0.68
test_double_not_in_listFunction · 0.68
test_deeply_nested_notFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…