Description
Spark's CSVFileFormat data source uses inefficient methods for reading files during schema inference and does not benefit from file listing / IO performance improvements made in Spark 2.0. In order to fix this performance problem, we should re-implement those read paths in terms of TextFileFormat.