pub fn mark_container_columns(
profiles: Vec<ColumnProfile>,
container_counts: &HashMap<String, usize>,
) -> Vec<ColumnProfile>Expand description
Report every column whose non-null values were all containers as
DataType::Nested, counts only (#637).
For text-based inputs that know which of their values were containers, as
the JSON readers do. container_counts holds, per column name, how many of
the analyzed values were an object or an array.
This matches what a typed source reports for the same records: Parquet and Arrow carry a struct or list type, and profile such a column the same way. A column that mixes containers with scalars has no typed twin, and stays the text column its values make it.
The comparison runs against the profile’s own counts, so a container is weighed against exactly the values the null rule left standing. A container always renders with a bracket, which the null rule never matches.