spark-csv
spark-csv copied to clipboard
#60 provide type for custom columns
If you are not using userSchema by default all fields in csv file are assumed to be StringType. This commit adds possibility to setup types for fields which are not supposed to be as StringType.
Usage:
TestSQLContext.csvFile(carsTypedColumnsFile, fieldsTypeMap = Map("price" -> DoubleType, "new" -> BooleanType))
+1
@kostjas thanks for submitting this. Would you please rebase this? Also please add unit tests for CsvFastSuite
as well.
@falaki I rebased @kostjas branch and added a unit test to CsvFastSuite at andrewrothstein/spark-csv:master. Should I raise a separate pull request?
If @kostjas is not interested in following up or does not have time for it, by all means. @kspitsyn What is your input?
I rebased and squashed my commits into one. However if @andrewrothstein would like to accumulate fixes of several issues and push them simultaneously into master, I do not have objections.
As I see pull request for #107 is ready :+1: