diff options
author | hyukjinkwon <gurwls223@gmail.com> | 2016-02-21 13:21:59 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-02-21 13:21:59 -0800 |
commit | 7eb83fefd19e137d80a23b5174b66b14831c291a (patch) | |
tree | ad57156e0eaff85aea164b14cc9de7fcbc65de91 /sql/core/src/test | |
parent | b6a873d6d4682796f55dbafadd0b5cad881f96ea (diff) | |
download | spark-7eb83fefd19e137d80a23b5174b66b14831c291a.tar.gz spark-7eb83fefd19e137d80a23b5174b66b14831c291a.tar.bz2 spark-7eb83fefd19e137d80a23b5174b66b14831c291a.zip |
[SPARK-13137][SQL] NullPoingException in schema inference for CSV when the first line is empty
https://issues.apache.org/jira/browse/SPARK-13137
This PR adds a filter in schema inference so that it does not emit NullPointException.
Also, I removed `MAX_COMMENT_LINES_IN_HEADER `but instead used a monad chaining with `filter()` and `first()`.
Lastly, I simply added a newline rather than adding a new file for this so that this is covered with the original tests.
Author: hyukjinkwon <gurwls223@gmail.com>
Closes #11023 from HyukjinKwon/SPARK-13137.
Diffstat (limited to 'sql/core/src/test')
-rw-r--r-- | sql/core/src/test/resources/cars.csv | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/core/src/test/resources/cars.csv b/sql/core/src/test/resources/cars.csv index 2b9d74ca60..40ded573ad 100644 --- a/sql/core/src/test/resources/cars.csv +++ b/sql/core/src/test/resources/cars.csv @@ -1,3 +1,4 @@ + year,make,model,comment,blank "2012","Tesla","S","No comment", |