GitHub user HyukjinKwon opened a pull request:

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

    [SPARK-15143][SPARK-15144][SQL] Add CSV tests with HadoopFsRelationTest and 
support for nullValue for other types

    ## What changes were proposed in this pull request?
    
    Currently,  `nullValue` option does not work for some types, `BooleanType`, 
`TimestampType`, `DateType` and `StringType`. So, currently there is no way to 
read null for those types. This PR adds the support just like the other types.
    
    Also, CSV data source is not being tested with `HadoopFsRelationTest` as a 
`HadoopFsRelation`. `HadoopFsRelationTest` includes 50 more tests (eg. 
partitioned table tests).
    
    This PR adds two variables, `extraReadOptions` and `extraWriteOptions` in 
`HadoopFsRelationTest` so that the child class gives some options for reading 
and writing. In order to get the tests in `HadoopFsRelationTest` passed, CSV 
data source needs to give options `header` and `inferSchema` as `true` for 
reading and `header` as `true` for writing.
    
    
    ## How was this patch tested?
    
    Unittests in `CSVHadoopFsRelationTest` and edited tests in `CSVSuite`

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

    $ git pull https://github.com/HyukjinKwon/spark SPARK-15143-15144

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

    https://github.com/apache/spark/pull/12921.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 #12921
    
----
commit ef71599130291aa6bb684afb47e88307b38238f1
Author: hyukjinkwon <gurwls...@gmail.com>
Date:   2016-05-05T05:47:07Z

    Add CSV tests with HadoopFsRelationTest and support for nullValue for other 
types

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to