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

Method leaf

crates/paimon/src/spec/predicate.rs:656–669  ·  view source on GitHub ↗

Resolve field name to index + type, validate literals, and build a leaf predicate.

(&self, field: &str, op: PredicateOperator, literals: Vec<Datum>)

Source from the content-addressed store, hash-verified

654
655 /// Resolve field name to index + type, validate literals, and build a leaf predicate.
656 fn leaf(&self, field: &str, op: PredicateOperator, literals: Vec<Datum>) -> Result<Predicate> {
657 let (index, data_type) = self.resolve_field(field)?;
658 Self::validate_literal_count(op, &literals)?;
659 for lit in &literals {
660 validate_datum_matches_type(lit, &data_type)?;
661 }
662 Ok(Predicate::Leaf {
663 column: field.to_string(),
664 index,
665 data_type,
666 op,
667 literals,
668 })
669 }
670
671 /// Look up a field name, returning its (index, DataType) or an error.
672 fn resolve_field(&self, field: &str) -> Result<(usize, DataType)> {

Callers 10

equalMethod · 0.80
not_equalMethod · 0.80
less_thanMethod · 0.80
less_or_equalMethod · 0.80
greater_thanMethod · 0.80
greater_or_equalMethod · 0.80
is_nullMethod · 0.80
is_not_nullMethod · 0.80
is_inMethod · 0.80
is_not_inMethod · 0.80

Calls 2

resolve_fieldMethod · 0.45

Tested by

no test coverage detected