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

Function test_builder_equal

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

Source from the content-addressed store, hash-verified

947
948 #[test]
949 fn test_builder_equal() {
950 let pb = PredicateBuilder::new(&test_fields());
951 let pred = pb.equal("id", Datum::Int(42)).unwrap();
952
953 match &pred {
954 Predicate::Leaf {
955 column,
956 index,
957 op,
958 literals,
959 ..
960 } => {
961 assert_eq!(column, "id");
962 assert_eq!(*index, 0);
963 assert_eq!(*op, PredicateOperator::Eq);
964 assert_eq!(literals, &[Datum::Int(42)]);
965 }
966 other => panic!("expected Leaf, got {other:?}"),
967 }
968 }
969
970 #[test]
971 fn test_builder_comparison_ops() {

Callers

nothing calls this directly

Calls 2

equalMethod · 0.80
test_fieldsFunction · 0.70

Tested by

no test coverage detected