Description
PartitionStatistics uses foldLeft and list concatenation to flatten an iterator of lists, but this is extremely inefficient compared to simply doing flatMap/flatten because it performs many unnecessary object allocations. Simply replacing this foldLeft by a flatMap results in fair performance gains when constructing PartitionStatistics instances for tables with many columns.