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

Function evaluate_bounds_between

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

Source from the content-addressed store, hash-verified

489
490 #[test]
491 fn evaluate_bounds_between() {
492 let null = lit(ScalarValue::Null);
493 let zero = lit(0);
494
495 #[rustfmt::skip]
496 let cases = vec![
497 (zero.clone().between(zero.clone(), zero.clone()), NullableInterval::TRUE_OR_FALSE),
498 (null.clone().between(zero.clone(), zero.clone()), NullableInterval::UNKNOWN),
499 (zero.clone().between(null.clone(), zero.clone()), NullableInterval::ANY_TRUTH_VALUE),
500 (zero.clone().between(zero.clone(), null.clone()), NullableInterval::ANY_TRUTH_VALUE),
501 (zero.clone().between(null.clone(), null.clone()), NullableInterval::UNKNOWN),
502 (null.clone().between(null.clone(), null.clone()), NullableInterval::UNKNOWN),
503 ];
504
505 for case in cases {
506 assert_eq!(
507 eval_bounds(&case.0).unwrap(),
508 case.1,
509 "Failed for {}",
510 case.0
511 );
512 }
513 }
514
515 #[test]
516 fn evaluate_bounds_binary_op() {

Callers

nothing calls this directly

Calls 1

litFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…