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

Function evaluate_bounds_not

datafusion/expr/src/predicate_bounds.rs:364–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

362
363 #[test]
364 fn evaluate_bounds_not() {
365 let null = lit(ScalarValue::Null);
366 let zero = lit(0);
367 let one = lit(1);
368 let t = lit(true);
369 let f = lit(false);
370 let func = make_scalar_func_expr();
371
372 #[rustfmt::skip]
373 let cases = vec![
374 (not(null.clone()), NullableInterval::UNKNOWN),
375 (not(one.clone()), NullableInterval::FALSE),
376 (not(zero.clone()), NullableInterval::TRUE),
377 (not(t.clone()), NullableInterval::FALSE),
378 (not(f.clone()), NullableInterval::TRUE),
379 (not(func.clone()), NullableInterval::ANY_TRUTH_VALUE),
380 ];
381
382 for case in cases {
383 assert_eq!(
384 eval_bounds(&case.0).unwrap(),
385 case.1,
386 "Failed for {}",
387 case.0
388 );
389 }
390 }
391
392 #[test]
393 fn evaluate_bounds_is() {

Callers

nothing calls this directly

Calls 2

make_scalar_func_exprFunction · 0.85
litFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…