MCPcopy Create free account
hub / github.com/apache/paimon-rust / test_builder_null_ops

Function test_builder_null_ops

crates/paimon/src/spec/predicate.rs:998–1021  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

is_nullMethod · 0.80
is_not_nullMethod · 0.80
test_fieldsFunction · 0.70

Tested by

no test coverage detected