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

Method duplicate_fields

crates/paimon/src/spec/schema.rs:521–530  ·  view source on GitHub ↗

Returns the set of names that appear more than once.

(names: &[String])

Source from the content-addressed store, hash-verified

519
520 /// Returns the set of names that appear more than once.
521 pub fn duplicate_fields(names: &[String]) -> HashSet<String> {
522 let mut seen = HashMap::new();
523 for n in names {
524 *seen.entry(n.clone()).or_insert(0) += 1;
525 }
526 seen.into_iter()
527 .filter(|(_, count)| *count > 1)
528 .map(|(name, _)| name)
529 .collect()
530 }
531
532 /// Row type with these fields (nullable = false for table row).
533 pub fn row_type(&self) -> RowType {

Callers

nothing calls this directly

Calls 1

entryMethod · 0.80

Tested by

no test coverage detected