mrnov
New Contributor II

the same problem here (similar code and the same behavior with Spark 2.4.0, running with spark submit on Win and on Lin)

dataset.coalesce(1)
        .write()
        .option("charset", "UTF-8")
        .option("header", "true")
        .mode(SaveMode.Overwrite)
        .csv(outputDirPath);