pub fn validate_unique_column_names(
names: &[String],
source: &str,
) -> Result<(), DataProfilerError>Expand description
Reject repeated names in an ordered column-name list, before any per-column state is built.
Every engine keys its per-column accumulators by name, so a repeated name is
otherwise silently merged (file/Arrow paths) or shadowed at mapping access
(columnar path), yielding a report where total_count can exceed the row
count or a column simply disappears. Rejecting up front is the only behavior
all engines can share.
names is the final list each engine uses as profile keys, so the check runs
on already-normalized names (the caller’s stringification is the normalization
step). source is a short transport label — e.g. "CSV header", "CSV bytes",
"Arrow/Parquet schema" — surfaced to the user. Duplicates are reported in
first-seen order, deduped; no cell values are ever embedded.