MCPcopy Create free account
hub / github.com/apache/datafusion / ensure_unique_column_names

Method ensure_unique_column_names

datafusion/core/src/execution/context/mod.rs:974–987  ·  view source on GitHub ↗
(schema: &DFSchema)

Source from the content-addressed store, hash-verified

972 }
973
974 fn ensure_unique_column_names(schema: &DFSchema) -> Result<()> {
975 // DFSchema name checks allow duplicate unqualified names as long as their
976 // qualifiers differ. DDL persistence drops qualifiers, so this helper must
977 // enforce uniqueness on the final unqualified names instead.
978 let mut seen = HashSet::with_capacity(schema.fields().len());
979 for field in schema.fields() {
980 if !seen.insert(field.name().as_str()) {
981 return schema_err!(SchemaError::DuplicateUnqualifiedField {
982 name: field.name().to_string(),
983 });
984 }
985 }
986 Ok(())
987 }
988
989 async fn create_catalog_schema(&self, cmd: CreateCatalogSchema) -> Result<DataFrame> {
990 let CreateCatalogSchema {

Callers

nothing calls this directly

Calls 5

lenMethod · 0.45
fieldsMethod · 0.45
insertMethod · 0.45
as_strMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected