GitHub user koertkuipers opened a pull request:

    https://github.com/apache/spark/pull/23173

    [SPARK-26208][SQL] add headers to empty csv files when header=true

    ## What changes were proposed in this pull request?
    
    Add headers to empty csv files when header=true, because otherwise these 
files are invalid when reading.
    
    ## How was this patch tested?
    
    Added test for roundtrip of empty dataframe to csv file with headers and 
back in CSVSuite
    
    Please review http://spark.apache.org/contributing.html before opening a 
pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tresata-opensource/spark 
feat-empty-csv-with-header

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/23173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #23173
    
----
commit 3192656ad91d326824360f4d4890dc1f6c3f6393
Author: Koert Kuipers <koert@...>
Date:   2018-11-28T19:03:20Z

    write headers to empty csv files when header=true

commit aad5f09710d4b6d4aafa810307b3cae9c965babf
Author: Koert Kuipers <koert@...>
Date:   2018-11-28T20:00:22Z

    Merge branch 'master' into feat-empty-csv-with-header

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to