()
| 996 | |
| 997 | #[test] |
| 998 | fn test_builder_null_ops() { |
| 999 | let pb = PredicateBuilder::new(&test_fields()); |
| 1000 | |
| 1001 | let is_null = pb.is_null("name").unwrap(); |
| 1002 | match &is_null { |
| 1003 | Predicate::Leaf { |
| 1004 | column, |
| 1005 | op, |
| 1006 | literals, |
| 1007 | .. |
| 1008 | } => { |
| 1009 | assert_eq!(column, "name"); |
| 1010 | assert_eq!(*op, PredicateOperator::IsNull); |
| 1011 | assert!(literals.is_empty()); |
| 1012 | } |
| 1013 | other => panic!("expected Leaf, got {other:?}"), |
| 1014 | } |
| 1015 | |
| 1016 | let is_not_null = pb.is_not_null("name").unwrap(); |
| 1017 | match &is_not_null { |
| 1018 | Predicate::Leaf { op, .. } => assert_eq!(*op, PredicateOperator::IsNotNull), |
| 1019 | other => panic!("expected Leaf, got {other:?}"), |
| 1020 | } |
| 1021 | } |
| 1022 | |
| 1023 | #[test] |
| 1024 | fn test_builder_in_ops() { |
nothing calls this directly
no test coverage detected